Skip to content

(MOT-4326) feat(console): session chip slot in the chat header for injectable UI - #684

Merged
rohitg00 merged 3 commits into
mainfrom
feat/console-session-chip-slot
Aug 6, 2026
Merged

(MOT-4326) feat(console): session chip slot in the chat header for injectable UI#684
rohitg00 merged 3 commits into
mainfrom
feat/console-session-chip-slot

Conversation

@rohitg00

@rohitg00 rohitg00 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What

A fourth injectable-UI slot: host.chat.registerSessionChip({ id, render }). Worker-shipped chips render in the chat header's right cluster beside the export button and status dot, receiving { sessionId, modelId?, contextWindow? } and fetching their own data over host.iii.

  • Duplicate ids last-win (same rule as pages).
  • The id context supersedes the built-in estimate-based ContextUsage meter, which now renders only as a fallback. A worker with real per-turn numbers owns the surface; consoles without such a worker keep today's estimate.
  • Mirrored in @iii-dev/console-ui (packages/console-ui/index.d.ts); worker scripts feature-detect with host.chat?.registerSessionChip on older consoles.

Why

Workers had no way to put a small live per-session affordance in chat without forking the console. First consumer is the harness context chip (MOT-4327).

Testing

  • Slot registry unit test (registration order, last-wins dedupe, unregister restores the shadowed chip, idempotent removal).
  • Playground story Playground/SessionChips renders a demo context chip in the live ChatView harness and demonstrates the supersede rule.
  • tsc, biome, vitest (1093), vite build all clean.

Docs updated: docs/sops/injectable-console-ui.md (new slot section, status table row) and console/SKILL.md. Part of MOT-4324.

…jectable UI

Fourth injectable slot: host.chat.registerSessionChip({ id, render })
renders worker-owned per-session chips in the chat header's right
cluster. Chips receive session id, resolved model id, and the model's
context window; they fetch their own data over host.iii. Duplicate ids
last-win, and a chip with id context supersedes the built-in
estimate-based ContextUsage meter so workers with real per-turn numbers
own the surface. Mirrored in @iii-dev/console-ui, covered by a slot
registry test and a playground story, documented in the SOP and SKILL.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 6, 2026 11:54am
workers-tech-spec Ready Ready Preview Aug 6, 2026 11:54am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@rohitg00, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8290faab-4f3c-40bf-b470-b97a8d9c88a1

📥 Commits

Reviewing files that changed from the base of the PR and between 5b0ffa9 and f4dcc64.

📒 Files selected for processing (9)
  • console/SKILL.md
  • console/web/src/components/chat/ChatView.tsx
  • console/web/src/lib/ui-loader.tsx
  • console/web/src/lib/ui-slots.test.ts
  • console/web/src/lib/ui-slots.ts
  • console/web/src/stories/playground/SessionChips.stories.tsx
  • console/web/src/types/injectable-ui.ts
  • docs/sops/injectable-console-ui.md
  • packages/console-ui/index.d.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 54 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

…hat namespace

Review cleanups. useExtSessionChips memoizes the dedupe on the store
snapshot so ChatView's chip memo actually holds between registrations
instead of rebuilding per streamed token. The published Host type
declares chat optional, matching the feature-detection story workers
are told to follow. The SOP status table no longer lists a shipped slot
under the not-shipped heading.
@rohitg00
rohitg00 merged commit 6634356 into main Aug 6, 2026
17 checks passed
@rohitg00
rohitg00 deleted the feat/console-session-chip-slot branch August 6, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant