Repository navigation
fix(web): import sessions from connected non-primary environments - #35131
ahmetaydin35 wants to merge 2 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
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