feat(desktop): expose OAuth connection accounts - #4314
Conversation
jackwener
left a comment
There was a problem hiding this comment.
Reviewed exact head 8a3d3784e154ac9a9b8caa3a1a550e022f41096d. I found no blocking issue.
The production path identifies a connection by immutable connectionId; the slug remains only a checked hint, and both create completion and adoption verify the complete connection identity. The latest commit brings the two Storybook fixtures back into that contract without changing production behavior.
The focused Connection/OAuth and renderer-architecture suites passed 88/88. Exact-head hosted test is successful. Because this branch overlaps current main in four files, I also checked the synthetic merge: Desktop preload, main, renderer, and Storybook typechecks pass on that merge, and the production renderer-architecture check remains green.
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
Closes #4312
Parent tracking issue: #3852
Follows the Runtime Host OAuth entity binding in #3924.
What changed
connectionId + slug + providerType, then navigate to the exact newly created Connection.connectionId; retain slug only as a checked routing hint and a Desktop-local legacy AppShell seam.name · slug, restore focus to the created row on Back, expose live authorization status, and keep adoption/loading failures retryable without reopening the login action.Architecture boundary
This is a Desktop projection/adapter change. Runtime Host remains the canonical OAuth and Connection identity authority. It does not change Runtime Host protocol operations, storage schema, or
RUNTIME_HOST_COMPATIBILITY_EPOCH.UI evidence
Captured from deterministic Storybook fixtures in Chinese at 1440×900. The Before image is from
main@28bdbc634; the After images are from this PR head85f6695e7. Images are pinned to immutable asset commit3db0ddce3.Before — provider-wide OAuth state
The Catalog exposes one provider-level email/login state, which makes an existing OAuth account look like the provider's singleton account.
After — add intent and configured Connection counts
OAuth rows are enrollment actions and describe how many Connection entities already exist for that provider.
After — independently addressable accounts
Three same-provider Codex Connections remain distinguishable by
name · slug.After — exact Connection detail
Account state, re-login, logout, model, and Connection actions are presented on the selected immutable Connection entity.
Validation
git diff --checkA final Storybook static-build rerun reached the local host filesystem error
UNKNOWN: unknown error, write(errno -122). TypeScript Story checks passed, and preload/renderer production builds passed on the exact PR head.