cloud tree: workspace rows derive the unread dot from their terminals - #12301
cloud tree: workspace rows derive the unread dot from their terminals#12301lawrencecchen wants to merge 1 commit into
Conversation
The blue dot only sat on terminal rows, so a collapsed workspace in the right sidebar hid it. CloudTreeNode.hasUnreadNotification is computed from the terminal rows on every read (no stored flag on the workspace), and the workspace and local-workspace rows render the same CloudTreeUnreadDot the terminal rows use. Claude-Session: https://claude.ai/code/session_015VUYpjo5ryiivbnAheYQXk
|
All contributors have signed the CLA ✍️ ✅ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change derives unread terminal notification state through the cloud tree and displays a shared unread dot on workspace, local-workspace, and terminal rows. It adds localized workspace help text and regression coverage for propagation and clearing. ChangesUnread notification indicators
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Unread indicators are derived from terminal notification state and remain visible on collapsed workspace rows, with localized help text and regression coverage for propagation and clearing. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 errors, 1 warning)
✅ Passed checks (22 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (1 skipped: 1 unsupported.) Full details: Cmux Algorithmic ComplexityExplanation The PR adds a recursive full-collection scan in production row rendering. Resolution Compute unread state once while building each snapshot. Use the existing unread-terminal Full details: Cmux Full InternationalizationExplanation The PR adds the user-facing key
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
The blue unread dot from #12112 sat on terminal rows only, so a collapsed workspace in the right sidebar hid it.
CloudTreeNode.hasUnreadNotificationis computed on every read from the terminal rows beneath a node (no stored flag on workspace or machine rows), and the workspace and local-workspace rows render the sameCloudTreeUnreadDotthe terminal rows use. The dot stays in the layout with opacity toggled, so the in-place row refresh repaints it. New stringcloudTree.workspace.unread.help(en, ja).Test:
CloudTreeOneMachineManyWorkspacesTests/workspaceUnreadDerivesFromItsTerminals(unread on one terminal marks only its workspace and the machine; reading clears both;adopt(from:)carries the derived value). Hosted run: https://github.com/manaflow-ai/cmux/actions/runs/34556707400 (success).Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
UI-only cloud sidebar indicator with derived state and a focused unit test; terminal unread storage is unchanged.
Overview
Workspace rows in the cloud tree now show the same blue unread attention dot as terminal rows, so a collapsed workspace still signals unread terminal notifications on this Mac (previously the dot lived only on terminal rows).
CloudTreeNode.hasUnreadNotificationis computed on read from terminalhasUnreadNotificationflags under each node—no separate stored state on workspace or machine rows.CloudTreeCellViewpasses that intoCloudTreeRowContentViewashasUnreadDescendantfor remote and local workspace rows.Unread UI is centralized in
CloudTreeUnreadDot(opacity toggling, help, accessibility); terminal rows use it instead of an inline circle. New copycloudTree.workspace.unread.help(en/ja).Test
workspaceUnreadDerivesFromItsTerminalschecks workspace/machine derivation, clearing on read, andadopt(from:).Reviewed by Cursor Bugbot for commit d882e49. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Workspace rows now show the unread notification dot based on their terminal rows, so a collapsed workspace in the right sidebar no longer hides it. Previously only terminal rows had the dot; now
CloudTreeNode.hasUnreadNotificationis computed from descendant terminals on every read, and workspace rows use the same opacity-toggledCloudTreeUnreadDotas terminals, with a new help string for workspace unread state.Written for commit d882e49. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes