Repository navigation
Description
Port the single-environment Projects/import step missing from CN-WELCOME (parent #81). The first welcome slice stops after Agents; this slice should let users discover existing Claude Code/Codex projects, select projects and import their history through the existing server APIs. Keep CN-WELCOME partial for the unrelated gaps.
Sources: apps/web/src/components/onboarding/WelcomeWizard.tsx (Projects/import step and handler), apps/web/src/onboarding/useProjectScans.ts, apps/web/src/onboarding/projectImport.logic.ts and its tests, apps/web/src/state/agentSessions.ts, and the corresponding contracts/server implementation (read-only references).
Scope and acceptance:
- Add the Projects stage after Agents for the currently connected environment. Show loading/error/retry, empty and scan-limit states; list/group scanned repositories and other projects, preserving the web's defaults and selection behavior. Large candidate lists must be virtualized.
- Port the pure grouping, recent/default selection, path/project matching and landing-selection rules, including old-server missing-git behavior, Windows/UNC paths, and environment-qualified candidate identities.
- Reuse matching projects; create selected missing projects with the web's existing command path, stable per-attempt command/project IDs, and
createWorkspaceRootIfMissing: false. Import selected Claude/Codex history with the existing agent-session import service. Do not start provider turns or create agent worktrees. - Preserve partial successes across retry without duplicate projects/imports. Show useful progress, skipped/imported counts and warnings. Finish/skip persists onboarding completion and navigates to the web-equivalent landing project when it appears.
- Check destination environment permissions at execution, cancel/invalidate demand on environment/step/wizard changes, and prevent stale results or revoked grants from causing later writes or completion against the wrong environment.
- Logic/protocol changes need focused failing-before regressions or ported cases, and a short runtime transcript. UI needs before/after offscreen evidence using isolated fixtures and the existing smoke server only. Never mutate real-data server 14700 or import into the live install.
Native ownership: crates/app/src/onboarding/ and crates/core/src/onboarding.rs plus an onboarding child module/tests, and the CN-WELCOME ledger row. Reuse the existing native RPC/permission paths; request any wider file scope from the orchestrator. Do not touch snapshot.rs while #111 owns it: the new stage is reachable by clicking Next from the existing --welcome agents entry.
Out of scope: T3 Connect/relay, multi-computer onboarding, Codex ChatGPT setup/accounts, embedded install/sign-in terminal, provider settings redesign, server/contract/web changes, and dependency patches. Remaining parent #81 gaps must stay explicit.
Activity
rynfar commentedon Nov 3, 2026
Implemented in #118 at
5b8e86dd96c9896b87cbef126c05bd9fd6179781for the connected environment. CN-WELCOME deliberately remains partial.Remaining parent #81 gaps: T3 Connect/relay and multi-computer onboarding, Codex ChatGPT accounts/setup, and the embedded install/sign-in terminal.
Verification covers the ported pure rules, rejected-receipt retry regression, isolated fake-server RPC/cancellation, and offscreen smoke-14658 fixtures (including 1,000 candidates). Real history imports and paid turns were not used. Local evidence:
/private/tmp/native116-before.png,/private/tmp/native116-after.png,/private/tmp/native116-large.png,/private/tmp/native116-{empty,error,pending,partial,permission}.png; transcript/private/tmp/native116-transcript.txt.rynfar commentedon Nov 3, 2026
Projects/history-import slice merged in #118 after independent fix-head re-review and fresh 1,108-test integration gate. CN-WELCOME remains partial; relay/multi-computer onboarding, ChatGPT setup/accounts and embedded terminal stay with parent #81. Primary merged offscreen verification follows; real imports/live grant mutations remain unverified.