For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Show disconnected SSH workspaces in the mobile Web remote-control task home and let the phone trigger the same reconnect path as the desktop sidebar.
Architecture: Desktop renderer remains the owner of remote reconnect because it already owns credentials, remote session registration, provider sync, and tab mutation. The mobile page sends a relay app payload to desktop main; main forwards the reconnect request to the renderer and returns the renderer result to mobile. Workspace list sync includes disconnected remote tabs with explicit connection state so mobile can render reconnect affordances without attempting a bridge.
Tech Stack: TypeScript, React, Electron IPC, existing Web remote-control relay app payloads, Zustand stores, Vitest.
Files:
packages/shared/src/web-remote-control.tspackages/shared/src/validation.tspackages/shared/src/platform.tspackages/shared/src/channels.tsTest: packages/shared/test/webRemoteControl.test.ts
[ ] Add failing shared tests for connectionState, reconnect request, reconnect response, and renderer IPC payload schemas.
[ ] Add connectionState?: "connected" | "disconnected" | "reconnecting" and lastConnectionError?: string to WebRemoteControlWorkspaceTarget.
[ ] Add relay payloads workspace-reconnect-request and workspace-reconnect-response.
[ ] Add platform IPC types for main-to-renderer reconnect request/result.
[ ] Run the shared tests and confirm they pass.
Files:
packages/desktop/src/preload/index.tspackages/desktop/src/renderer/src/main.tsxpackages/ui/src/root/useRemoteWorkspaceHistory.tspackages/ui/src/root/useRootPlatformEffects.tsTest: packages/ui/test/useRemoteWorkspaceHistory.test.ts
[ ] Add failing UI tests that a Web remote reconnect request calls the existing reconnect helper without forcing desktop activation or toast.
[ ] Expose onWebRemoteControlReconnectWorkspace on IPlatformService and preload.
[ ] In Root, register the platform callback and call handleReconnectRemoteWorkspace(workspaceKey, { activateWorkspaceBeforeReconnect: false, showErrorToast: false }).
[ ] Sync disconnected remote tabs to Web remote workspace list, including connectionState and error state.
[ ] Run focused UI tests and confirm they pass.
Files:
packages/desktop/src/main/webRemoteControlManager.tspackages/desktop/src/main/desktopMainIpcPlatform.tspackages/desktop/src/main/index.tsTest: packages/desktop/test/webRemoteControlManagerExternalRelay.test.ts
[ ] Add failing manager tests for forwarding workspace-reconnect-request to renderer and returning success/error payloads.
[ ] Add manager dependency reconnectWorkspace(windowId, workspaceKey).
[ ] Handle workspace-reconnect-request by forwarding to renderer and responding with workspace-reconnect-response.
[ ] Ensure connected-only bridge filtering remains unchanged: disconnected remote workspaces can list/reconnect but cannot bridge until reconnect succeeds.
[ ] Run focused desktop tests and confirm they pass.
Files:
packages/web/src/main.tsxpackages/ui/src/root/types.tspackages/ui/src/WebRemoteControlMobileTaskHome.tsxpackages/ui/src/lib/webRemoteControlMobileTaskHome.tsTest: packages/ui/test/webRemoteControlMobileTaskHome.test.tsx or nearest existing task-home tests
[ ] Add failing UI/model tests that disconnected SSH workspaces render in the mobile list with a reconnect button and do not attempt bridge when opening a task before reconnect.
[ ] Add reconnectWorkspace(workspaceKey) to the mobile switcher API.
[ ] Implement mobile relay requester for reconnect request/response.
[ ] Render reconnect button with loading/error states using existing Button variants and i18n strings.
[ ] Run focused UI/web tests and confirm they pass.
Files:
Modify docs only if behavior needs a short implementation note under docs/web-remote-control/.
[ ] Run pnpm typecheck.
[ ] Run pnpm lint.
[ ] Run focused tests for shared, desktop manager, and UI task home.
[ ] Summarize changed files and remaining limitations.