cloud sidebar polish: hover, my devices copy and refresh, empty rows, tab switch glide
Summary
Closes #18498
polish for the cloud sidebar and the right sidebar's tab bar:
- hover: the team chip and banner close buttons get hover. the chip's menu anchor sat on top of the button and swallowed the pointer, so it now tracks hover itself
- my devices: the empty row says "no devices yet" (the catalog still said "no other macs yet"), and its refresh only refreshes devices instead of the whole fleet
- empty rows: "no cloud machines yet" and "no devices yet" get an 18 pt row instead of sitting centered in a 22 pt one, so they hug their header
- refresh icon: sits right after the count (~6 pt instead of ~10 pt)
- tab bar: one selection pill slides between tabs on a quick spring (0.28 / 0.9) and labels swap straight away. open as pane stays in place (disabled, with a tooltip) on dock and feed, so tab widths no longer jump
| Before (cloud sidebar) | After (cloud sidebar) |
|---|---|
Testing
scripts/verify-local.py --swift-changed origin/main: 8/8 passed; localization catalog completeCloudTeamPickerMenuTests(20) passed in hosted run 38041719063;CloudWorkspaceCreationRevealTests.closingTheWindowDuringShortcutReleasesItsManagerfails unchanged on main- built and checked by hand as tagged app
devcopyat360507cfe07
Changelog
Fixed: Cloud sidebar buttons highlight on hover, My Devices says "No devices yet" and refreshes on its own, and the right sidebar tabs switch with one sliding highlight
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Adds hover to the Cloud sidebar's team chip and banner close buttons, fixes the My Devices empty state and refresh, and gives the right sidebar's tab bar a sliding selection pill.
The team chip's menu anchor overlay takes the pointer, so it now owns hover tracking and hosts the chip itself; hover re-syncs when the menu closes, on window detach, and after reattachment or tracking-area rebuilds, with one lifecycle owner. Banner close buttons match the sidebar's icon-button hover. My Devices empty row now says "No devices yet" and refreshes only devices; Cloud Machines refreshes only the fleet. Empty rows use an 18 pt height in the compact sidebar, and the refresh icon sits right after the count. The right sidebar tabs share one sliding selection pill on a quick spring (0.28/0.9) with labels swapping immediately, and "Open as pane" stays in place (disabled, with a tooltip) on Dock and Feed so tab widths don't jump.
- Adds regression tests for team chip hover: enter/exit, stale tracking events, window detach/reattach, and menu-close reconciliation.
[!NOTE]
Low Risk
Localized macOS UI and AppKit overlay hover lifecycle; no auth, data, or networking changes.
Overview
Fixes missing hover on Cloud chrome where pointer handling blocked SwiftUI’s onHover.
Team picker chip: The AppKit menu anchor overlay now owns NSTrackingArea hover, hosts the visible chip in an NSHostingView via a makeChip closure, and keeps highlight in sync while the menu is open, after dismiss (re-reads pointer because menu tracking swallows exits), and across window detach/reattach and tracking-area rebuilds. CloudTeamPickerRow keeps a transparent SwiftUI button for size, keyboard, and accessibility while the anchor draws the chip with Invite-style row highlight fill and existing pill foreground rules.
Banner close: CloudBannerDismissButton adds hover (primary glyph + 6 pt primary fill at 0.06), aligned with sidebar icon buttons.
Tests: CloudTeamPickerMenuTests adds coverage for enter/exit, stale tracking events, window lifecycle, and post-menu hover reconciliation.
Reviewed by Cursor Bugbot for commit 2cbe04ead3db2d2c50c977bdbff292c4ccb3331c. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
- Style
- Cloud banner dismiss buttons show a subtle highlighted appearance on hover, with a brighter icon and faint background fill.
- The team picker trigger highlights on hover or while its menu is open, matching the app’s row highlight style. Highlighting is suppressed when the control is disabled.
- Tests
- Added coverage for team picker hover behavior, including pointer entry and exit, menu dismissal, and changes to the view’s window or tracking area.