Repository navigation
feat(onboarding): offer detected Claude Code/Codex/Hermes memory imports across CLI, macOS, and Linux onboarding - #108977
Conversation
Visual evidenceLinux companion app, genuine first-run flow (Ubuntu 25.10 arm64 VM: in-app Development-channel install of this branch → gateway start → dashboard opened in onboarding mode): Offer dialog (all three sources detected from synthetic Import running (per-provider progress, controls locked): CLI classic wizard (real interactive run against a fixture All six files verified on disk under |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2475fa3077
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ${this.onboarding | ||
| ? html`<openclaw-onboarding-memory-import | ||
| .active=${true} | ||
| .context=${context} | ||
| ></openclaw-onboarding-memory-import>` |
There was a problem hiding this comment.
Restore normal shell after onboarding memory import
When the Linux first-run flow opens the dashboard with onboarding=1, resolveOnboardingMode() pins the shell in onboarding mode for the lifetime of the page. This mounted dialog only closes itself via its own closed/sessionStorage state; it never notifies the host or removes the query flag. In the common no-offers path, or after Skip/Continue, .shell--onboarding keeps hiding the topbar/sidebar and blocking native new-session, leaving first-run users in a chromeless dashboard until they manually reload without the flag.
Useful? React with 👍 / 👎.
ba0ba07 to
7d668e0
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 10:46 AM ET / 14:46 UTC. Summary Reproducibility: yes. for the blocking review issue: open the Linux first-run dashboard with Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep one shared memory-only migration engine, but make onboarding mode an explicit host-owned lifecycle that exits to the normal dashboard in-product after empty, Skip, Continue, success, or advisory failure; then rebase and prove completed CLI, Linux, and macOS first-run flows on the exact head. Do we have a high-confidence way to reproduce the issue? Yes for the blocking review issue: open the Linux first-run dashboard with Is this the best way to solve the issue? No, not at the current head. Reusing the existing migration engine is the right layer, but the onboarding shell must own and complete its lifecycle instead of relying on dialog-local state. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a0d6cd724ab6. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
…guided onboarding
…i and native locales
7d668e0 to
6d74cec
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d74cecc79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result = await client.request<MigrationsMemoryApplyResult>( | ||
| "migrations.memory.apply", | ||
| { | ||
| idempotencyKey: createIdempotencyKey(), |
There was a problem hiding this comment.
Reuse keys for ambiguous onboarding applies
When a migrations.memory.apply request reaches the Gateway but the response is lost (for example a WebSocket reconnect during the backup/copy), this dialog generates a fresh idempotency key inline and then marks the batch done on error, so it can never recover the Gateway's cached result for the attempted import. The settings page preserves an attempted key for this exact case; the onboarding dialog should keep a per-provider attempted key until a definitive response is received, otherwise users can be told the import failed/zero migrated even though files were already copied and subsequent plans only show conflicts.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…rts across CLI, macOS, and Linux onboarding (openclaw#108977) * feat(migrate): add Hermes memory-only import and a shared memory-import core * feat(onboarding): offer detected memory imports during CLI setup and guided onboarding * feat(ui): show a first-run memory-import offer in Control UI onboarding mode * feat(linux-app): open the first-run dashboard in onboarding mode * feat(macos): add the onboarding memory-import page * docs: document the onboarding memory-import page across surfaces * chore(i18n): translate onboarding memory-import strings for control-ui and native locales * refactor: keep memory-import internals unexported for deadcode gates * fix(ci): resolve lint findings in onboarding memory import * chore(i18n): refresh native inventory after lint refactor * fix(ci): skip updater artifacts in the unsigned Linux companion PR lane * chore(i18n): reconcile locale artifacts after rebase
…rts across CLI, macOS, and Linux onboarding (openclaw#108977) * feat(migrate): add Hermes memory-only import and a shared memory-import core * feat(onboarding): offer detected memory imports during CLI setup and guided onboarding * feat(ui): show a first-run memory-import offer in Control UI onboarding mode * feat(linux-app): open the first-run dashboard in onboarding mode * feat(macos): add the onboarding memory-import page * docs: document the onboarding memory-import page across surfaces * chore(i18n): translate onboarding memory-import strings for control-ui and native locales * refactor: keep memory-import internals unexported for deadcode gates * fix(ci): resolve lint findings in onboarding memory import * chore(i18n): refresh native inventory after lint refactor * fix(ci): skip updater artifacts in the unsigned Linux companion PR lane * chore(i18n): reconcile locale artifacts after rebase


What Problem This Solves
Users switching to OpenClaw from Claude Code, Codex, or Hermes already have memories on their machine, but onboarding never offered to bring them over. The memory-migration engine and the
migrations.memory.plan/applygateway RPCs existed, and the Control UI had a settings page, yet none of the onboarding flows (CLI wizard, guided CLI flow, macOS app, Linux companion app) surfaced them. Hermes additionally could not participate in memory-only import at all: its provider declared nosupportedItemKindsand only emittedappendactions, which the memory RPC rejects.Why This Change Was Made
One detection-gated "import your memories" page in every onboarding surface, reusing the existing reviewed engine:
extensions/migrate-hermes): the provider now declaressupportedItemKinds: ["memory"]; in memory-only scope it detectsmemories/MEMORY.md/memories/USER.md, planscopyitems into<workspace>/memory/imports/hermes/, and applies them through the shared fs-safe copy path. The full append-based migration is unchanged.src/commands/migrate/memory-import.ts): the memory-only policy (provider filter, copy-only shaping, item cap, negative-detection short-circuit, source-revision binding, silent apply runtime) moved out of the gateway handler into one canonical module; the gateway handler keeps only wire mapping, fingerprints, and idempotency.src/wizard/setup.memory-import.ts): one page after workspace bootstrap in the classic wizard and after the inference check in the guided flow. Detection-gated (absent when nothing to import), confirm + per-source multiselect, conflicts reported as already imported/incomplete, per-provider failures advisory and never abort onboarding. Remote-gateway guided onboarding skips it (local files would not belong to the remote host).apps/macos): new onboarding page 4 for local-mode setups. Plans via the shared gateway connection once AI setup connects, per-source toggles, sequential applies with fresh/reused idempotency keys mirroring the gateway dedupe contract, conflict-bearing results treated as incomplete, auto-advance when the plan resolves empty, cursor-stable page-order updates.apps/linux,ui/): the Tauri app appends a one-shotonboarding=1to its first post-install dashboard navigation (fragment auth preserved; flag restored on navigation failure). In onboarding mode the Control UI shows a one-page memory-import offer dialog backed by the same RPCs, with a sessionStorage guard, stale-binding invalidation, and mid-batch connection-change aborts.--import-source/--import-secretsunless--import-fromwas also passed (non-interactive already treated them as import intent). Interactive now routes them to the import flow too.User Impact
Fresh installs that already have Claude Code, Codex, or Hermes state get one onboarding page (CLI classic + guided, macOS app, Linux app) offering to copy those memories into the agent workspace under
memory/imports/for indexed recall. Skipping is always safe; the Control UI Memory import settings page remains the later entry point with per-file control. Reruns stay silent once everything is imported. No new config surface or CLI flags.Evidence
node scripts/run-vitest.mjs extensions/migrate-hermes src/gateway/server-methods/migrations.test.ts src/wizard/setup.memory-import.test.ts src/wizard/setup.test.ts src/wizard/setup.migration-import.test.ts src/commands/onboard-guided.test.ts ui/src/components/onboarding-memory-import.test.ts ui/src/pages/memory-import/...— all shards green (≈180 tests incl. new coverage).swift test --package-path apps/macos --parallel: 1221 tests green (22 new OnboardingMemoryImportTests).cargo test(apps/linux): 21 green incl. new onboarding-URL tests.pnpm ui:i18n:baselineclean; fullpnpm buildgreen with noINEFFECTIVE_DYNAMIC_IMPORTand plugin-sdk export check OK.$HOMEwith synthetic~/.codex,~/.claudeauto-memory,~/.hermes): classic wizard showed the page listing all three sources with counts, imported 6/6 files intoworkspace/memory/imports/{codex,claude-code/<collection>,hermes}/, correct summary; instruction files (CLAUDE.md) correctly excluded; a rerun of onboarding stayed silent (all conflicts → no offer).onboarding=1→ offer dialog listed Claude/Codex/Hermes with paths + counts → Import ran per-provider with progress UI (screenshots attached). The apply then hit a pre-existing backup hang unrelated to this PR (see below).migrations.memory.plandetected Claude + Hermes with fingerprints;migrations.memory.applymigrated 2+2 with verified backup, files verified on disk incl. fixture markers — the exact RPC sequence the new onboarding page issues. The native page itself is covered by the Swift suite (page order, cursor rules, apply payloads, lease/idempotency semantics); a full GUI walk was blocked by VM input restrictions (no Accessibility grants available headlessly).gpt-5.6-sol, 4 rounds on the working tree): 5 findings accepted and fixed (silent apply runtime, memory-only retry hint copy, stale-binding invalidation + mid-batch abort in the web dialog, conflict-bearing results treated as incomplete on macOS/CLI, negative-detection plan short-circuit); 1 finding rejected with proof (closedis@state()-reactive and the dismissal test passes).extensions/*/node_modulesis filtered today).