Repository navigation
fix(status-bar): fold agents into +N before status labels go icon-only - #23689
Conversation
On narrow windows the right-side status labels (update ready, memory, keep awake) went icon-only while every agent stayed in full, so the +N badge never appeared until much narrower. Add a density level that collapses calm agents into +N while the right side keeps its labels; it fits by the width with urgent agents pinned, and only when even that doesn't fit do the segments go icon-only.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe status bar now measures both natural usage width and width with calm usage chips collapsed. Density selection uses each level’s fit width and adds a level that collapses usage chips before segments become icon-only. Width-recording tests cover changes to natural and fit widths. Priority: ⬇️ Low Merge Risk: 🔵 Low · up to Status labels may remain icon-only after agent usage becomes calm, even when the labels would fit. This is a bounded visual regression that can be fixed before merge or accepted for follow-up. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 05d5862d-2e53-4062-8127-3730e2924077
📒 Files selected for processing (3)
src/renderer/src/components/status-bar/status-bar-density.test.tssrc/renderer/src/components/status-bar/status-bar-density.tssrc/renderer/src/components/status-bar/status-bar-usage-collapse.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- New density step —
STATUS_BAR_DENSITY_LEVELSgains a 4th entry (collapseUsagewith labels still shown) between "one percentage per agent" and the existing icon-only step, so usage folds into "+N" before right-side labels drop. - Collapsed width measurement —
measureUsageRowreportspinnedWidth, the row width with every calm chip folded into "+N"; the always-rendered hidden "+N" chip makes this measurable before anything collapses. - Fit-vs-natural split — density levels now track
{ natural, fit };fitdrives the picker (so a level counts as fitting whenever folding calm agents suffices), whilenaturalstill detects content changes for cache invalidation. Non-collapsing levels setfit === natural, preserving prior behavior. - Tests — ordering assertion that collapse precedes icon-only, a picker case proving a collapsing level is judged by its collapsed width, and a cache case proving a moved collapsed width alone doesn't invalidate sibling levels.
The width math and the picker change hold up: pinnedWidth correctly removes calm chips plus their gaps and adds back the "+N" chip and one gap, fit remains monotonic across the ladder, and the picker returns the roomiest fitting level, so level 3 is only reached when level 2 genuinely overflows. pinnedWidth has no direct DOM-level test (the existing suite never exercises measureUsageRow), but the derived picker behavior it feeds is covered. No blocking concerns.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
When the Orca window gets narrow, the status bar should fold extra agents into a small "+N" badge before it starts hiding the status labels on the right. It did the opposite: the labels (like "Update ready" or memory use) turned into bare icons first, while every agent stayed on screen and no badge appeared. Now the badge comes first.
What Changed
Before (v1.4.216, #23587): as the window narrowed, the bar stepped down in this order: full, then compact, then one percentage per agent, then right-side segments go icon-only and agents may collapse (both at once). Because both happened in one step, there was a width range (about 840 → 640px with a typical right side) where the status labels disappeared but every agent still fit, so no "+N" badge showed.
After: a new step sits between "one percentage per agent" and "icon-only segments". There, calm agents (under 80% used) fold into "+N" while the right side keeps its labels. Only when even the urgent agents plus "+N" don't fit do the segments go icon-only. At that point agents expand back into the room the icons free up.
Mechanism:
status-bar-usage-collapse.ts:measureUsageRowalso reportspinnedWidth, the row's width with every calm chip folded into "+N".status-bar-density.ts: each level now records{ natural, fit }.naturalis the width with every chip shown, and is still what detects content changes. A collapsing level is judged byfit(natural width with the usage row atpinnedWidth), so it counts as fitting whenever folding calm agents is enough. Non-collapsing levels use natural width as before.Why
Status labels on the right (update ready, chats to resume, memory) are live signals with no other home in the bar. Agent usage that folds into "+N" stays one click away in the Usage popover, and the badge says how many are hidden and turns yellow or red if one of them is getting close to its limit. So usage should give way first. The alternative, keeping all agents and hiding status labels, loses information you can't recover without hovering each icon.
Linked Issue
N/A (follow-up to #23587, reported by a maintainer after v1.4.216)
Visual Proof
Before (#23587): at 800px the right side is already icon-only while all 5 agents are shown, with no badge:
After (busier right side; widths 880, 840, 720, 640, 600, 440): "+2", "+3", "+4" appear while the labels stay. At 600px the segments go icon-only and agents come back:
+2+3+4+2+4Testing
status-bar-density.test.tsnow asserts that usage collapses before segments go icon-only, that a collapsing level fits by its collapsed width, and that a change in collapsed width alone doesn't clear the cached widths. All 58 status-bar test files (410 tests) pass.pnpm tc:weband the changed-code quality gate pass.Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)