Skip to content

fix(desktop): allow V1 and V2 to run concurrently - #12480

Merged
juliusmarminge merged 6 commits into
t3code/codex-turn-mappingfrom
fix/v2-concurrent-desktop-profile
Sep 18, 2026
Merged

juliusmarminge merged 6 commits into
t3code/codex-turn-mappingfrom
fix/v2-concurrent-desktop-profile

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Opening V2 while V1/nightly is running can leave the app with no environments because both desktop processes open the same Chromium profile. In a macOS two-process reproduction, the second process fails to open t3code:connection-runtime with an IndexedDB backing-store lock error.

Packaged V2 now uses its own t3code-v2 profile and never falls back to the V1 profile. On Windows, the new profile imports only Local State once to preserve the encryption keys used by saved connection credentials. All profile selection and Windows initialization now live in DesktopUserData.resolveUserDataPath, shared by startup and the Clerk bridge. Development profile handling stays unchanged. This profile is Electron storage under the OS application-data directory; the server T3 home and its databases stay where they are.

Targets #2829.

Validation:

  • 20 focused desktop tests pass. New coverage is limited to profile isolation and Windows credential preservation/error context.
  • Targeted lint and desktop typecheck pass.
  • Isolated macOS Electron reproduction: shared profile fails; separate V2 profile opens IndexedDB and commits a write while V1 stays running. This checks the storage failure directly, rather than launching the complete T3 app.

Before, shared profile:

Shared Electron profile fails to open IndexedDB

After, separate V2 profile:

Separate V2 profile opens IndexedDB and commits a write

Browser cookies and caches do not migrate, so websites opened inside V2 may require signing in again.

Prepared with Codex.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 18, 2026
Comment thread apps/desktop/src/app/initializeV2DesktopProfile.ts Outdated
@macroscopeapp

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: 7f1069e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces startup-time profile migration and changes the production Electron user-data default to t3code-v2, affecting concurrent operation, browser state, and Windows credential metadata. A reported fresh-install startup failure remains unresolved, so the cross-platform initialization behavior requires human validation.

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 18, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 3 times, most recently from bb072a5 to 1affc9a Compare September 18, 2026 20:19
@juliusmarminge
juliusmarminge force-pushed the fix/v2-concurrent-desktop-profile branch 2 times, most recently from e5a54ce to 451b93f Compare September 18, 2026 20:57
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from bbe3dd9 to 01c2162 Compare September 18, 2026 21:28
@juliusmarminge
juliusmarminge force-pushed the fix/v2-concurrent-desktop-profile branch from 451b93f to dafb1a0 Compare September 18, 2026 21:55
Comment thread apps/desktop/src/app/DesktopClerk.ts Outdated
Comment thread apps/desktop/src/app/DesktopAppIdentity.ts Outdated
@macroscopeapp

This comment has been minimized.

@macroscopeapp

This comment has been minimized.

@macroscopeapp

This comment has been minimized.

@macroscopeapp

This comment has been minimized.

Comment thread apps/desktop/src/app/DesktopUserData.ts Outdated
Comment thread apps/desktop/src/app/DesktopUserData.ts
@juliusmarminge
juliusmarminge merged commit 84afa46 into t3code/codex-turn-mapping Sep 18, 2026
23 checks passed
@juliusmarminge
juliusmarminge deleted the fix/v2-concurrent-desktop-profile branch September 18, 2026 22:10
astarktc added a commit to astarktc/t3code that referenced this pull request Sep 23, 2026
… bridge (QM-189)

On win32 resolveUserDataPath (from pingdotgg#12480) inspects the profile dirs through the async
Node FileSystem, which yields to the event loop; Electron emits ready first and
createClerkBridge's protocol.registerSchemesAsPrivileged throws, so every Windows launch
exits with DesktopClerkBridgeInitializationError. Provide a node:fs-backed synchronous
FileSystem for that one call. Windows-only deploy branch; macOS returns before any I/O.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant