Repository navigation
Fix Compact usage notice focus and older-host compatibility - #26747
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe status-bar notice card now accepts rich descriptions and uses a notice key to associate its delay with the current notice. The compact usage notice includes a translated Detailed badge, and the percentage-change notice provides card props through a shared hook. Host-state normalization sets a default for the compact-notice dismissal field. Tests cover notice rendering, timing, focus, menu behavior, and state handling across host schemas. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The usage notice now restarts its delay when switching between notices and keeps the trigger, menu, and focus mounted. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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:
d6c08a07-9dfd-434d-a97b-ec67d113a9de
📒 Files selected for processing (13)
src/renderer/src/assets/main.csssrc/renderer/src/components/status-bar/StatusBarUsageChangeNoticeCard.tsxsrc/renderer/src/components/status-bar/StatusBarUsageChangeNotices.test.tsxsrc/renderer/src/components/status-bar/StatusBarUsageChangeNotices.tsxsrc/renderer/src/components/status-bar/UsagePercentageDisplayChangeNotice.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/web/preload-api/web-preference-normalization.tssrc/renderer/src/web/preload-api/web-ui-compact-notice.test.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.


ELI5
The Compact usage tip is easier to read and no longer disrupts the Usage menu. Changing the display mode also works when a browser reconnects to an older Orca host.
What Changed
Why
Switching between two notice wrapper components remounted the menu. A single stable card fixes that without special focus restoration. Taking the notice flag from the active host prevents stale cached eligibility from breaking older hosts' strict preference validation, without changing the wire contract.
Linked Issue
Follow-up to #26726.
Visual Proof
Before final visual refinements: user-provided screenshot. After: full hidden Electron window from a clean temporary profile. Screenshots attached below.
Testing
560 tests across 68 files passed: status-bar components, web preload APIs, and workspace-preference hydration.
pnpm tc:web,pnpm tc:node, andpnpm run check:code-quality:changedpassed after rebasing onto main. Commit hooks passed lint and formatting.macOS Electron CDP: inspected the rendered card and idle button; choosing Detailed keeps the same Usage trigger, open menu, and focus while dismissing the tip. Earlier checks covered Compact selection and Escape. Added regression tests for dismissal/menu identity and a newer-to-older host cache transition against the older strict schema.
Linux/Windows and a live older SSH host were not manually exercised. No platform-specific behavior or wire fields added. Full lint, packaged build, and broader test suite are left to CI.
Review
Self-reviewed: no remaining blocking findings. Reuses the existing card, Badge, Button, and theme tokens; no new derived-state effects or parallel notice implementation. Saved display-mode choices remain unchanged.
Agent skill upstream boundary
Notes
Mixed-version hosts covered by regression tests. Folder workspaces and git-provider behavior are unaffected. Screenshots use a clean profile rather than exposing personal terminal content.
Checklist