Repository navigation
Give every Cloud sidebar row reachable hover text - #15225
teamleaderleo wants to merge 4 commits into
Conversation
Every Cloud row that kept secondary information "on hover" attached it with a SwiftUI `.help()` inside `CloudTreePassthroughHostingView`, whose `hitTest` returns nil so the outline owns pointer events. Nothing forwards that text to the cell, so terminal, display, port and browser rows have no reachable hover text at all. Workspace rows do set a cell tooltip for presence, then `configure` runs its own chain and resets it to nil; only a later `updatePresenceSubscription` on an in-window cell puts it back. `CloudTreeMachineRowContent` takes an injected `now` and hands it to its metrics, but `subtitle` measures the machine's age against `Date()`, so the two halves of one row can disagree. These tests fail on this commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`CloudTreeCellView` wrote `toolTip` and the accessibility label twice: once in `configureDisplayHost`, which is the only code that has resolved a workspace's presence heads, and again in `configure`, whose `else` branches reset both. A workspace row therefore lost its presence tooltip unless the cell happened to be in a window and a superview, where the trailing `updatePresenceSubscription` restored it. Fresh cells got nothing. The rows whose text lived in a SwiftUI `.help()` had a worse version of the same problem: the display host never hit-tests, so terminal, display, port, browser and machine-resource rows had no hover text a pointer could ever reach, even though the same strings were already mirrored into accessibility labels. `CloudTreeRowToolTip.describe` now computes hover text and the accessibility label for every row kind in one exhaustive switch, and the cell applies it in one place. Workspace rows gain the name, working directory and terminal count they never showed; ports gain their full link; an untitled browser row gains a label instead of the empty resource title. `CloudTreeMachineRowContent.subtitle` reads the injected `now` the row's metrics already use. Section headers keep no tooltip: their labels are fixed and never truncate. ## Changelog Fixed: Cloud sidebar rows show their details on hover again, and a workspace row names its directory, terminal count and collaborators. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 2 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
|
All contributors have signed the CLA ✍️ ✅ |
Review follow-up on the commit before this one. A tooltip that repeats the row's own title tells the pointer nothing and covers the rows under it, which is the rule the type's doc comment states and three arms broke. Workspace, local workspace, placeholder and resource rows now drop the tooltip when everything left in it is the title the row already reads. "0 terminals" is no longer a line at all: it is the absence of occupancy, not occupancy, and an empty workspace reads as empty already. This restores CloudWorkspacePresenceHeadsTests' contract that a workspace with no presence, no detail and no terminals has no hover text, which the previous commit broke. Also corrects the WHY on CloudTreeMachineRowContent.subtitle's clock: no shipping call site injects `now`, so the change makes the age pinnable by tests rather than fixing a disagreement a user could see. And moves the Cloud sidebar audit tour out of this PR; it belongs with the dogfood menu fix it needs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ReviewA review subagent went over Fixed:
Left:
Two new tests pin the rule directly: a bare workspace row and a placeholder row both have no hover text. |
Red and greenSame focused command both times: Red at Seven of the eight failed, each on its own assertion:
Green at After the review fix at Verification
|
|
CI receipt, as promised. Run 36399535425 at The
|
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
Closing this: the work already landed on main in #15326, so there is nothing left here to merge. #15326 ("say a machine's id and age in its accessibility label", The catch-up that produced it ran while the local clone still had a shallow graft, which made No behavior is lost by closing it. The tooltip coverage is on main. |
What
The Cloud tree hosts its row content in
CloudTreePassthroughHostingView, whosehitTestreturns nil so theNSOutlineViewowns every pointer event. Several rows put their secondary information in a SwiftUI.help()inside that host, which means no pointer can ever reach it. Terminal rows (directory, agent state, the detached explanation), display rows (transport and screen), machine-resource rows and port rows all had hover text that never appeared. The same strings were already mirrored into cell-level accessibility labels, so VoiceOver read them and the mouse did not.Workspace rows had a second, narrower version of the bug.
configureDisplayHostis the only code that has resolved a workspace's presence heads, so it set the cell tooltip there.configurethen ran its ownif casechain whoseelseresettoolTipto nil, and a second chain that overwrote the accessibility label. Only the trailingupdatePresenceSubscription()put them back, and only when the cell was already in a window with a superview. A freshly created cell kept neither.Separately,
CloudTreeMachineRowContenttakes an injectednowand passes it to its metrics, butsubtitlemeasured the machine's age againstDate(), so the two halves of one row could be read against different clocks.How
CloudTreeRowToolTip.describe(node:style:presenceHeads:)computes the hover text and the accessibility label for every row kind in one exhaustive switch, andCloudTreeCellViewapplies it in exactly one place. That removes the double write entirely rather than reordering it.Row kinds that gained hover text they never had:
CloudTreeTerminalRowContent.toolTipalready builtSection headers deliberately keep no tooltip: their labels are fixed strings that never truncate, and
CloudPortsVPNAffordanceTestsasserts that.An untitled browser row's
searchableTitleis the empty resource title, so its accessibility label was empty; it now falls back to the same placeholder the row draws.subtitlereadsnow.Verification
The tests are committed before the fix (e05a8bc) and fail there; the fix (6d120a1) turns them green. Focused CI runs for both SHAs are linked in a comment below.
Also adds
dogfood/scenarios/cloud-sidebar-audit-tour.json, the reusable tour that walks Files, Vault and Cloud in the right sidebar and opens the Cloud Sidebar Spacing Lab. It is a look, not a test.Part of the Cloud right sidebar audit (manaflow-ai/cmuxterm-hq#853).
Changelog
Fixed: Cloud sidebar rows show their details on hover again, and a workspace row names its directory, terminal count and collaborators.
🤖 Generated with Claude Code
Summary by cubic
Fixes Cloud sidebar hover text so every row shows its details on hover, and a workspace row names its directory, terminal count, and collaborators.
Row tooltips lived in SwiftUI
.help()inside a host that never hit-tests, so no pointer could reach them. Hover text and the accessibility label are now computed in one exhaustive switch and applied to the cell in exactly one place. Workspace rows previously had their tooltip written inconfigureDisplayHostand then reset byconfigure; they now keep it regardless of whether the cell is in a window.Tooltips drop when they would only repeat the row's own text, and a workspace with zero terminals shows no count line. Section headers keep no tooltip since their labels are fixed and never truncate. An untitled browser row no longer has an empty accessibility label. The machine row's age reads the injected clock instead of
Date(), making it pinnable by tests.Adds
CloudTreeRowToolTipTestscovering each row kind. Merges main, which brings a reworded fork-detach message.Written for commit 2416da9. Summary will update on new commits.