fix(accounts): open provider login from remote-only windows
Accounts refused provider login when the front window had only remote panes or no local window existed. Reauthenticate, Sign Out, and setup-token now use the shared local-login route, searching other local windows and creating a local workspace when necessary. Provider key pages use the same local selection and workspace fallback.
Actions await workspace creation, terminal creation and command delivery before reporting success. Browser fallback waits for the created workspace to mount its local pane. A failed open restores the row's error state, and repeated clicks cannot start overlapping workspace creates for the same provider. Remote panes never receive the command.
Leo asked: “Also, we need to be fixing authentication issues, like the whole onboarding situation. Is that in? What does you improve? What does you fix? The edge cases, like you guys need to be comprehensively brainstorming all the onboarding edge cases: foot guns, paper cuts, snags, clips, whatever the f***.”
Observed / Not run
Static pre-push checks and git diff --check pass at 05fe49d7b4264c6ef96fb7fd43b1c4e969631037.
Focused regression command: scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext AccountsLocalLoginIntegrationTests.
-
Before fix:
e1432e1cce07ca22942ef058434fb762e4e88824, job520012c465a88e6b1a4af95b. Full app and test targets compiled; the integration test ran and failed because Accounts returnedopened == falsewith no local window. -
Predecessor head:
2719bbc166e0d5e32b76d3f5b7997863a4dfb766, job08f836b7fe7ac18edf63d163. Full app and test targets compiled in 352.66 seconds. All 4 focused suites passed: 23 tests acrossAccountsLocalLoginIntegrationTests,AccountsActionOutcomeTests,AccountsSignOutTests, andAccountsLocalPaneTests. Terminal and browser fallback both created a local workspace; the action registry accepted the no-main-window request; delayed success/failure, duplicate clicks, and refresh while opening passed. -
Current head:
05fe49d7b4264c6ef96fb7fd43b1c4e969631037, job5f6a11cea66dff331aead354is pending. Added actual command-output, rejected creation, disconnected pane and Classic-mode browser-tab assertions.
The before-fix test proves the service's no-local-window failure. The final registry assertion separately proves that palette/CLI requests reach the repaired model; no separate before-fix registry execution is claimed.
Independent review and the real behavior capture are pending. The capture depends on the isolated provider fixture; no ambient credentials are used by the integration test.
The pane-mount observation ends on arrival, window close, navigation or connection change, with a ten-second deadline. Its existing observation/deadline utility cancels the watcher and timer on completion.
Risk: async propagation across Accounts actions and local workspace/browser creation. No credential or callback trust changes.
Changelog
Fixed: Provider sign-in from Accounts can open a local workspace when only remote windows are available.
Agent session: agent session