Repository navigation
fix(web): effort bars fill the right way for high-to-low levels - #43509
Closed
iamshadmantaqi wants to merge 2 commits into
Closed
iamshadmantaqi wants to merge 2 commits into
iamshadmantaqi wants to merge 2 commits into
Conversation
Member
|
Thanks for this. #43511 makes the same change and is the one being kept. #43511 fixes the same reported inversion with a smaller change: it reverses the scale when None or Off comes last, without introducing a separate ranking heuristic. Your additional coverage for descending lists without an off level remains useful, but it extends beyond the reported case. That behavior can be considered separately from the focused fix. Closing as a duplicate. |
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.
Problem
When a provider advertises its reasoning levels high to low with the off level last (an ACP Registry agent listing
["xhigh", "high", "low", "none"]), the composer's effort bars are inverted: Extra High shows 1 of 4 bars filled and None shows 4 of 4.resolveEffortGlyphreads both the bar count and the fill from array position, so it assumes the list rises and that an off level, if any, comes first. The selected effort is applied correctly; only the glyph is wrong.Change
resolveEffortGlyphnow checks whether the levels are listed high to low (the off level is last, or the known idsminimal < low < medium < high < xhighfall from first to last) and, if so, works on the reversed list. Everything after that is unchanged, so lists that already rise behave exactly as before.For
["xhigh", "high", "low", "none"]this gives 3 bars: Extra High 3 filled, High 2, Low 1, None 0. That follows the existing convention that an off level is not a bar (the current test for["off", "low", "high"]expectscount: 2), rather than the 4-of-4 table in the issue.Scope
Fixes #43496
Only the glyph in
apps/web/src/components/chat/EffortGlyph.tsxchanges. The picker menu still shows levels in the order the provider advertises them; the issue's second suggestion (normalising the advertised order for ACP providers) is left out to keep this to the indicator bug.Verification
Added two cases to
apps/web/src/components/chat/EffortGlyph.test.ts: the descending list above (plus a descending list with no off level), and an ascending list that starts atnone, which must keep its current fill.Without the fix (test commit only):
With the fix:
vp run check:changed: format, lint, knip, typecheck (2 packages), tests (1 file) and the React compiler check (1 file) all pass.Not verified: I did not run an ACP Registry agent that advertises descending levels, so the bars were not checked in the running app; the fix is covered by the unit tests on
resolveEffortGlyphonly.Model: Claude Opus 5.5. Harness: Claude Code in T3 Code.