Add a Cloud Workspaces switcher button to the sidebar footer

Closed
LA
2mo ago
+309528-111853

Summary

Adds a Cloud button to the sidebar footer, left of Help. It opens the right sidebar's Cloud tab through the same reveal path as the shortcut and the command palette (focusRightSidebarInActiveMainWindow(mode: .machines), with the fileExplorerState fallback). The Cloud tab now lists This Mac first with every sidebar workspace on this computer (terminal or not), then each Cloud machine with its workspaces, terminals, ports, and displays.

  • CloudTreeNodeBuilder.nodes gains includeEmptyLocalWorkspaces; CloudTreeOutlineView exposes includesLocalMachine and includesEmptyLocalWorkspaces, and the Machines panel turns both on. The empty-state predicate uses the same local-machine setting, so an account with no Cloud machines still sees This Mac.
  • The button uses the 13pt medium cloud glyph so it sits visually with the account, phone, and help icons. It is gated by the Cloud Machines beta like every other Cloud entry point and follows the footer presentation policy.
  • Minimal presentation: the footer keeps only Upgrade, and hovering the footer row now reveals the other controls (SidebarFooterPresentationPolicy.isVisible(_:presentationMode:isHovered:)).
  • Local browsers are indexed by workspace once instead of scanned per workspace row.

Testing

Two commits open the PR: the first adds SidebarCloudWorkspacesSwitcherTests (red), the second the feature (green). The suite covers every sidebar workspace listed in order with selection and terminal counts, the terminal-only listing staying available, This Mac leading Cloud machines, and the footer policy (hidden in minimal mode, revealed on hover, Upgrade always visible).

Tagged fleet build cldbtn with the direct dev backend; preflight over the debug socket with screenshots of the footer and the Cloud tab.

Summary by CodeRabbit

  • New Features

    • Added a Cloud Workspaces button to the sidebar footer for opening the Cloud machines view.
    • Cloud Workspaces now displays all sidebar workspaces, including those without terminals.
    • The Machines panel now includes the local Mac and empty local workspaces.
    • Added localized Cloud Workspaces labels and signed-out messaging in English, Japanese, Korean, and Ukrainian.
    • Improved sidebar footer visibility and hover interactions.
  • Tests

    • Added coverage for workspace ordering, selection, terminal counts, local machine display, and footer behavior.