Add per-tab remote indicator and Disconnect SSH tab context action

Merged
AU
3mo ago
+126-10

Re-lands the never-merged ssh-pane-remote-indicator branch (f3b3658, built for manaflow-ai/cmux#5949), rebased onto current main:

  • Tab/TabItem gain showsRemoteIndicator (rendered as a small network glyph after the tab title, with accessibility text), threaded through createTab/updateTab/splitPane.
  • New TabContextAction.disconnectRemote, shown only when the host's tabContextDisconnectRemoteAvailabilityProvider returns true. Localized en + ja.

Rebase-specific integration on top of the original commit:

  • updateTab's no-op guard (#160) now also compares showsRemoteIndicator, so an indicator-only update is not skipped.
  • TabContextMenuState (post-#161 shape) carries canDisconnectRemote as a defaulted init parameter, and the @MainActor convenience init feeds it from the provider.

Consumed by pane-scoped cmux ssh --pane (manaflow-ai/cmux#7521). The cmux submodule pointer will reference this commit once it lands on main.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Add a per-tab remote connection indicator and an optional “Disconnect SSH” tab context action so hosts can signal remote tabs and let users disconnect from SSH.

  • New Features

    • Tabs support showsRemoteIndicator; shown as a small “network” icon next to the title with an accessibility label. Available via createTab, updateTab, and splitPane.
    • New context action disconnectRemote (“Disconnect SSH”), shown only when tabContextDisconnectRemoteAvailabilityProvider returns true. Localized in en and ja.
    • updateTab now updates when only showsRemoteIndicator changes.
  • Migration

    • Set showsRemoteIndicator when creating or updating tabs that are connected remotely.
    • Implement tabContextDisconnectRemoteAvailabilityProvider to surface the “Disconnect SSH” menu item.
    • Handle the new TabContextAction.disconnectRemote in your context menu action handler.

Summary by CodeRabbit

  • New Features

    • Tabs can now display a remote connection indicator when connected over SSH.
    • A new “Disconnect SSH” option appears in the tab menu when available.
  • Bug Fixes

    • Remote connection status now stays visible across tab updates and split-pane actions.
    • Existing content continues to load correctly even when older saved data doesn’t include the new status field.
  • Documentation / Localization

    • Added new user-facing text in English and Japanese for remote connection status and disconnect actions.