Repository navigation
fix(web): import Claude Code and Codex sessions after onboarding - #22411
Open
ahmetaydin35 wants to merge 1 commit into
Open
ahmetaydin35 wants to merge 1 commit into
ahmetaydin35 wants to merge 1 commit into
Conversation
Session import was only reachable from the /welcome wizard, so sessions started after onboarding had no way into T3 Code (pingdotgg#10961). Settings > General now has "Import from Claude Code and Codex". It opens the wizard's project import step in a dialog. The step moves unchanged to ProjectImportStep.tsx so Settings does not load the whole wizard. The dialog scans the environments selected in Settings, rescans when it opens so new sessions show up, and stays open while an import runs. The server already skips conversations that were imported before, so there are no server or contract changes. The server's import count includes conversations imported on an earlier run. That was invisible during onboarding but would overstate a second import, so the result toast now says how many threads are in T3 Code instead of how many were imported. Fixes pingdotgg#10961 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10961
Session import only runs from the
/welcomewizard, and nothing leads back there once onboarding is done. A Claude Code or Codex session started in a terminal after setup can't be imported. That includes sessions in projects T3 Code already has, and projects that were deleted and added again. On desktop there is no address bar, so the only way back is DevTools. The welcome wizard guide also says "Run import again to continue a large batch", but there was nowhere to run it.Settings → General → Projects & threads now has Import from Claude Code and Codex. It opens the same project list as the wizard's import step, in a dialog, and runs the same
agentSessions.scanandagentSessions.importcalls.onboarding/ProjectImportStep.tsxunchanged, apart from a configurable dismiss label, a shared result toast, and the toast copy described below. Settings imports it without pulling in the rest of the wizard. Git shows this as a new file; the rest of the moved block matches the old code line for line.projectIdthe scan already returns, and the server skips conversations it imported before, so running it again only adds new ones. No server or contract changes.importedCountalso counts conversations imported on an earlier run (AgentSessionImporterand its retry test treat that as intended). During onboarding that was invisible, but a second import from Settings said "Imported 14 threads" when 3 were new. The result toast and warnings now read "N threads are in T3 Code", which is true for both first and repeat imports. The wizard tests are updated for the new copy.Scope and approval
This makes the existing onboarding import reachable after onboarding. It does not add a new workflow. Same scan, same import, same eligibility rules, same 30-day window. Picking a single session (#6873, #18025) and refreshing already-imported threads are out of scope.
#13510 took a similar approach from project settings and was closed for missing before/after evidence and a recording of the import. This PR includes both. Unlike #13510, it also covers folders that are not projects yet, because it reuses the wizard's project list instead of importing into one existing project.
Surfaces: web and desktop share this UI. Mobile has no session import UI today and is unchanged. Remote environments work through the same RPCs; the dialog lists each selected environment separately, as the wizard does.
Verification
vp test run src/components/settings/AgentSessionImportDialog.browser.test.tsx: 3 new tests, written with the disposablerenderhelper from test(web): disposable render helper and lint rule for browser tests #22187. Importing into a project that already exists uses its ID without creating a project and shows the result toast. The dialog stays open until a running import finishes; this test fails if the guard is removed. Opening with a cached scan rescans.vp test run src/components/onboarding/WelcomeWizard.import.browser.test.tsx src/components/onboarding/WelcomeWizard.browser.test.tsx src/components/settings/settingsSearch.test.ts: the existing wizard and settings search tests still pass after the move. 84 tests across the four files.tsc-rs --noEmitforapps/web, plusvp lintandvp fmt --checkon the changed directories, all pass.CLAUDE_CONFIG_DIRandCODEX_HOME. After onboarding, the first import from Settings brought in 10 threads across 3 projects. Adding a session to an existing project and running it again imported only that one. Sessions in a folder that was not a project yet showed up at the top of the list and imported as a new project. Each reopen of the dialog listed the session added since the last scan.Not checked: the packaged desktop app, and an environment connected over relay or T3 Connect.
Before
Settings → General → Projects & threads has no way back to the import.
After
Recording
Reopening the import after a new Codex session in
docs-site: the list shows it, the import adds it, and it appears in the sidebar.import-after-onboarding.mp4
Claude Opus 5.5 in Claude Code, run through T3 Code.
🤖 Generated with Claude Code