polish(studio): context meter in the composer toolbar, drop the approximate tag - #990
Closed
jtenniswood wants to merge 8 commits into
Closed
polish(studio): context meter in the composer toolbar, drop the approximate tag#990jtenniswood wants to merge 8 commits into
jtenniswood wants to merge 8 commits into
Conversation
The context strip leaves its floating spot above the composer and becomes the leftmost item in the toolbar row below the input, alongside the mode/ model/memory pills. The redundant 'approximate' tag goes — the ~ prefix on the percentage carries the approximation, and the doc comment keeps the full why. Typography now matches the toolbar: the pills' text size, colored like their value text (the On in Memory On). ChatInput takes the strip as a contextMeter slot, so the composer stays dumb and chat-view keeps ownership of the data. One consequence, deliberate: the toolbar row is hidden on phones (its controls live in the + sheet there), so the meter is desktop-only now. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three render cases on top of the existing math pins: the ~percentage shows without a standalone approximate tag, the strip uses the toolbar pills' value typography (text-sm, muted), and it stays quiet until the visit has counted tokens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…self The strip moves to the right end of the composer toolbar (ml-auto on the slot, rendered after the pills), drops the ~ prefix, and reads 'N% used'. The approximation caveat moves into a tooltip that also explains what a context window is — how much conversation the model can consider at once, and that the agent compacts older history as it fills. The bar graphic spans 40% of the toolbar's width (cqw against the row's existing @container). Render tests updated: plain 'N% used' with no tilde/of-context/approximate, right-docked with the 40cqw bar, quiet until the visit has counted tokens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The strip reads as just the short bar plus 'N% used' — the model name goes (the model pill next to it already says which model the chat runs on), and the bar returns to its fixed 64px width instead of 40% of the toolbar, which dominated the row on wide composers. Tests pinned accordingly (the strip's whole text content IS 'N% used'). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two short sentences in everyday words: roughly how much of the model's working memory this chat has used, and that older messages are summarized to make room when it fills. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The input panel loses its 768px cap in both the draft view and the open chat (kept identical so the draft-to-chat transition still doesn't move the input under your hands). The transcript column keeps its readable measure — only the composer stretches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One 'studio' configuration: npm --prefix studio run dev (managed mode — controller + supervised mecated) on port 3000, so the Claude Code browser pane can start and attach to Studio directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 22 — first change on top of the parity-verified port
Sits above #986 so the series' byte-parity proof stays intact: PRs 1–21 land #618 exactly; this is the first deliberate UX change on top.
~prefix on the percentage carries the approximation (the doc comment keeps the full why: the daemon's true trigger also counts the system prompt and tool schemas, and a reload loses the visit's running total).text-sm, coloredtext-muted-foregroundlike their value text (the On in Memory On).ChatInputgains acontextMeterslot prop rendered first in the toolbar;chat-viewkeeps ownership of the usage data. Deliberate consequence: the toolbar is hidden on phones (its controls live in the + sheet), so the meter is desktop-only now.Gates green: lint · typecheck · knip · vitest (439).
🤖 Generated with Claude Code