Repository navigation
fix(web): import sessions from connected non-primary environments - #35131
ahmetaydin35 wants to merge 5 commits into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds an explicit way to import session history from another connected environment. It reuses the existing environment-scoped import flow and permission checks without changing the default environment. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The Welcome page only scans the primary environment, so sessions on a connected non-primary environment could not be imported. Settings → Environments now has Import sessions… in each connected environment's menu, which opens the Welcome page for that environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e570d43 to
cea6dee
Compare
|
Note Written by Verified in a real dev environmentverified unchanged head on on the pr, settings → environments → import sessions opens welcome for the saved non-primary environment. a real codex session was created through the app in the first continuation correctly reported codex's active-writer lock because the source client still held the session. after releasing it with the source thread's "restart agent session" action, the imported thread resumed and recalled nearby checks passed: repeating the import added no duplicate; runtime transcript from the browser's real websocket traffic: before, on main: after, on the pr: import interaction and imported history, with idle time removed: successful continuation after releasing the source writer: Not verifiedpackaged electron, native ios/android, macos/windows, ssh or t3 connect routes, claude/pi imports, restricted-scope connections, and the chatgpt sign-in return. this pass exercised the linux web client and codex over a direct connection. no source changes were needed. |
…on-primary-environments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wraps the new menu label for main's i18n catalogs, translates it in every web locale, and drops a resolver test the fallback case already covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceSteps on both commits: connect History server; inspect its menu; Settings → About → Welcome page → Open → Review all; open Chromium, 1280×800, light theme; fresh isolated servers with identical synthetic native histories. Primary server contains primary-notes. History server contains build-api with one Claude Code, one Codex and one Pi session. Proven: scenarios:prove exited 0; base failed and head passed.
Before navigation recording · After matching navigation recording · After complete import recording. Pairing setup is trimmed. Fixture paths and transient sign-in details are redacted. Fixture-only sign-in banners were dismissed through the UI before transcript stills. All published captures were inspected. Scenario source · Reproduction bundle with seed/helpers and commands · Runner verdict and steps. |

















Reopens #22411 from current
main, as asked when it was closed for being open over 3 weeks. @juliusmarminge asked for this scope in his review, and the review changes were already pushed there. The code is the same, rebased onto currentmainas one commit.Problem
#33209 lets users reopen the Welcome page from Settings → About and re-import sessions on the primary environment. The page only scans the primary environment, so Claude Code, Codex and Pi sessions on a connected non-primary environment still cannot be imported.
Change
/welcomeaccepts anenvironmentIdsearch param. The Welcome page already works on one environment at a time and opens for a non-primary environment after a ChatGPT sign-in, so this only lets Settings ask for one. An id the catalog does not know falls back to the primary environment, as the sign-in hash already did.resolveWelcomeEnvironmentIdholds that choice.orchestration:operate, the scope the import needs.docs/user/welcome-page.mdsays where to find it.The Welcome page's scan, import and eligibility rules are reused as they are. No server or contract changes.
Scope
Requested by a maintainer in review on #22411: "Please cut this down to the remaining separate gap: importing sessions from connected non-primary environments, which the Welcome page does not scan." Follow-up to #10961.
Verification
Run on this branch, on top of current
main:vp test run src/onboarding/welcomePage.logic.test.ts: 14 tests pass, 5 of them new forresolveWelcomeEnvironmentId(default, requested environment, sign-in return wins, unknown id falls back, no primary environment as in the hosted app).vp test run --project browseronWelcomePage.import,AddEnvironmentDialogandEnvironmentRoutesList: 20 existing tests pass.effect-tsgo tsrs --noEmitforapps/webreports no errors.vp fmt,vp lintandknippass.Test Web 2fails onCommandPalette.browser.test.tsx:113, which this PR does not touch. The same test fails onmainat ee90bdc. It passes locally on this branch (3/3 runs).Manual check on #22411 with the same code, in the dev web app with isolated state. A second server on the same Mac, with its own
--base-dirand synthetic Claude Code and Codex transcripts, was paired as a remote environment named "Build Server". Its menu showed Import sessions…, which opened/welcome?environmentId=…. The page read "Setting up Build Server" and listed that server's 5 projects, with the 3 recent git repositories checked.Not checked: running the import itself from that page (the test server had no signed-in agent), an environment connected over SSH or T3 Connect, and the packaged desktop app. No browser test covers the environment row menu.
Before
Settings → Environments, menu of a connected environment: no way to import its sessions.
After
Claude Opus 5.5 in Claude Code, run through T3 Code.
🤖 Generated with Claude Code