Flip context window circle to represent context remaining#13097
Conversation
The context-window usage circle's solid (white) marks previously represented the amount of context *used*, while the tooltip already read "X% context remaining" — so a near-full context window showed a mostly white/full circle labeled with a low remaining %, which read as "used", not "remaining". Flip the color semantics so the white marks represent the context *remaining*: - empty conversation -> all-white circle, "100% context remaining" - full context window -> all-grey circle, "0% context remaining" The tooltip text is unchanged (it was already remaining-based). Both surfaces that show the circle (the agent input footer and the conversation usage footer) funnel through the pure `icon_for_context_window_usage`, so the single mapping change fixes both; the static placeholder icons default to the full-white (100% remaining) state. The >= 80%-used red warning tint is preserved. Co-Authored-By: Warp <agent@warp.dev>
|
@warp-dev-github-integration[bot] I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR flips the context-window circle so the bright segments represent context remaining, updates placeholder icons, and adds unit coverage for the icon mapping.
Concerns
- For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end. The description lists manual verification, but it does not attach visual evidence required for UI-impacting changes.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
Thanks for the review. Addressed the visual-evidence request: I've added before/after screenshots to the PR description (Screenshots / Videos section), captured live via computer-use verification on a locally built Warp — an empty conversation shows a full circle with "100% context remaining", and a near-full context window (90% used, temporarily forced) shows a mostly-grey circle with "10% context remaining". The images are hosted on a separate |
Per review feedback, align the asset and icon-enum names with how the
circle is displayed (context remaining). Rename the SVG assets
conversation-context-{0..100}.svg -> context-remaining-{0..100}.svg and
the Icon::ConversationContext{0..100} variants ->
Icon::ContextRemaining{0..100}, and update all references. The number
denotes the bright fill level, which now maps directly to the percentage
of context remaining (e.g. context-remaining-100 = full white circle on
an empty conversation). Pure rename — no behavior or rendering change.
Co-Authored-By: Warp <agent@warp.dev>
The previous approach flipped which icon was shown per state, which reversed the ring's sweep direction (it depleted the wrong way round). Per review feedback, keep the exact same icon / pattern / fill direction as the original and only invert the dark/light colors. Since the icon is rendered monochrome (per-segment luminance from the SVG's white fill-opacity acts as the mask), invert each segment's dark/light by swapping fill-opacity 0.4<->0.9 in the assets. Combined with the existing remaining-based selection, this renders the exact dark/light inverse of the original glyph at every state: empty conversation = full white ring, darkening in the same rotational direction the original filled, ending all-grey at 0% remaining. Verified by mapping bright segments to clock positions (each new asset is the precise color-inverse of the original at the same state) and on the running app via computer use. Co-Authored-By: Warp <agent@warp.dev>

Description
The context-window usage circle (the small segmented ring shown in the agent input footer and the conversation usage footer) used its solid/white marks to represent the context used, while the tooltip already read "X% context remaining". The result was confusing: a nearly-full context window showed a mostly-white/full circle even though little context remained, so the circle read as "used", not "remaining".
This flips the color semantics so the white marks represent the context remaining (the tooltip is unchanged):
Both surfaces that render the circle funnel through the pure
icon_for_context_window_usage(selected by remaining =1 - usage). To keep the exact original icon, pattern, and fill direction and invert only the dark/light colors, the segmented-ring SVG assets have their per-segmentfill-opacityswapped (0.4↔0.9); because the icon renders monochrome (per-segment luminance is the mask), this makes each state the precise dark/light inverse of the original glyph — same boundary and sweep direction, colors swapped. The static placeholder icons default to the full-white (100% remaining) state, and the>= 80%-used red warning tint is preserved.This implements the change agreed in the linked thread.
Linked Issue
Slack thread: https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782490201740159?thread_ts=1782490201.740159&cid=C0BCE7AELJ2
Testing
Added regression unit tests in
app/src/ai/blocklist/usage/mod_tests.rscovering the empty (→ContextRemaining100), full (→ContextRemaining0), and intermediate mappings, plus a monotonicity check (more usage never brightens the circle). All pass.cargo clippyclean on the affected crate;./script/formatapplied.Verified live with computer use on a locally built Warp (see screenshots below).
I have manually tested my changes locally
Screenshots / Videos
Captured live on a locally built Warp via computer-use verification.
Empty conversation → full (white) circle, tooltip "100% context remaining":
Partial context window (70% used, temporarily forced for verification) → ~30% white arc on the correct (far) side, tooltip "30% context remaining":
(Screenshots are hosted on the
factory/assets/context-window-circle-13097branch so they render here without adding binary files to this PR's code diff.)Agent Mode
Conversation: https://staging.warp.dev/conversation/d51f56ed-8dae-44f7-8184-cbb3e6a42dd3
Run: https://oz.staging.warp.dev/runs/019f04b2-049e-7e13-b025-45139520cac3
This PR was generated with Oz.