Use one workspace sign-in across Agent Native Desktop apps - #2290
Use one workspace sign-in across Agent Native Desktop apps#22903mdistal wants to merge 36 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes and found 1 potential issue 🔴
Review Details
Incremental Code Review Summary
The latest revision addresses all four previously reported issues: automatic sign-in is suppressed after workspace sign-out, ceremony generations invalidate queued and in-flight work, active cookie-copy operations are drained before clearing sessions, the canary now builds branding/native/extension resources, and Settings starts sign-in from an opted-in canonical target rather than Dispatch itself. I verified those fixes in the current source and resolved the four stale review threads.
Risk: High, because this remains authentication/session lifecycle code and release packaging. The updated broker now has substantially safer ordering and regression coverage, and the Dispatch primary-auth public-path consolidation remains sound.
New Finding
- 🔴 HIGH — The Desktop web-request interceptor cancels both ordinary logout and
logout-all. This prevents the server-side all-session revocation from running, so a user selecting “sign out everywhere” in a canonical app can remain authenticated in other browsers/devices. Only ordinary local logout should be intercepted, or the revocation must be performed before local cleanup.
🧪 Browser testing: Blocked — the dev server was healthy, but Chrome DevTools MCP remained unreachable across executor retries; the Electron-only flows are not browser-served.
|
@3mdistal should we merge this or drop it? |
@steve8708 testing it now. i got behind on other stuff, but finally coming back. it needed a human-driven test, and i hadn't had time to run it 'til now. |
…ce-sso # Conflicts: # packages/desktop-app/src/main/ipc/updates.spec.ts # packages/desktop-app/src/main/ipc/updates.ts # templates/dispatch/server/plugins/identity-sso.ts
|
Canary .21 acceptance failed; production restored (no merge). Exact Desktop artifact Independent native results:
The credential-safe Desktop log contains the sanitized completion diagnostic Rollback completed immediately in reverse order to current main |

Problem
Agent Native Desktop currently treats every app as a separate sign-in boundary. A person can authenticate in Mail and then still be asked to authenticate again in Clips, Calendar, or another first-party app. That makes the desktop workspace feel like a collection of unrelated websites instead of one product.
Approach
Use Dispatch as the workspace identity authority while preserving a separate, correctly scoped session inside each app. Desktop opens one contained sign-in ceremony, accepts only a short-lived signed exchange, and lets the destination app establish its own local session. Later first-party apps can repeat that exchange silently without copying provider credentials or sharing raw cookies across origins.
The ordinary app sign-in remains the front door: signing in from Mail, for example, establishes workspace identity and returns to Mail. Standalone browser use, self-hosted deployments, custom apps, and provider-consent boundaries remain separate.
What changed
Safety and operations
main@8385d4de38dc017c9915216228a31ca3cde4058a. Production-context Dispatch and Mail outputs are prebuilt and hashed so the supervised canonical window performs no build work.Verification
Current exact head:
af0c143c71e29ff594f5599fc171d14d2f3b2b6e.desktop-sso-canary-af0c143c71e29ff594f5599fc171d14d2f3b2b6e; digest:sha256:5bd93649267e56c9c23c5f7de483309ba13663745a129202f98ad728bab77f5c.6a70cf6e615f3500084baf44and Mail preview6a70cf6f055088000861d014are ready, unpublished, and bound to the exact head. Their production-credential routes remain absent in preview context as intended.10a9f3c46460444813c7b50bc0d7e0bed70d4b574134ce1f21e03d2bb9d294ebfor Dispatch and6101a82fdc5d4c5523701d85fdaa64851b4bfd9bbe8ea0f6b9974d568fc6c921for Mail. Output credential-pattern scans were clean.Review focus