Skip to content

feat(web): show context window usage in thread details panel - #1

Open
rgxdev wants to merge 2 commits into
mainfrom
feat/thread-details-context-usage
Open

rgxdev wants to merge 2 commits into
mainfrom
feat/thread-details-context-usage

Conversation

@rgxdev

@rgxdev rgxdev commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Context window usage is only visible through the small ring in the composer footer, and reading the number requires hovering it.

The thread details panel now shows a Context row under the workspace actions, e.g. 7% · 75k/1m. It reuses the snapshot ChatView already derives for the composer meter (activeContextWindow), so no new state or tracking is added. It follows the existing contextWindowMeterEnabled setting (Context window indicator), so it stays off by default and one switch controls both displays. The row is also hidden until the provider has reported token usage; the percentage and max are shown only when the model window is known.

Screenshots

Before After
before after

Verification

  • tsc-rs --noEmit (apps/web), vp lint and vp fmt --check on touched files
  • Unit: contextWindow.test.ts, ContextWindowMeter.logic.test.ts, threadDetailsCardLayout.test.ts (44 passed)
  • Browser: ThreadDetails*.browser.test.tsx (10 passed)
  • Manual: dev server with seeded data, on a thread with recorded usage: setting off hides the row, setting on shows 7% · 75k/1m; the build without this change shows no row

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