Repository navigation
feat(onboard): offer codex migration after harness install - #81192
Conversation
|
Codex review: found issues before merge. Summary Reproducibility: yes. from source inspection. The existing Codex install helper returns Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the feature on the PR branch, but make the onboarding caller persist and re-read config around accepted migrations and pass a true fresh-install signal before the migration helper sees a plugin id. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection. The existing Codex install helper returns Is this the best way to solve the issue? No. The direction is useful, but the implementation should flush and re-read config around Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0e4f2c53c71d. Re-review progress:
|
67047c0 to
27214bc
Compare
e3509d4 to
8a6f0f4
Compare
Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case.
8a6f0f4 to
7ff48cb
Compare
|
theres an edge case where we can't migrate plugins if you're logged in via api on your source codex account. currently, we emit a warning for that. could you check that this behavior is still preserved and doesn't break onboarding? |
…r Enter with rest of wizard Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in #81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. Selection-picker Enter behavior aligned with the rest of the wizard. The Codex selection prompt (`promptCodexMigrationSkillSelection`, `promptCodexMigrationPluginSelection`) previously installed a custom `key` handler in `skill-selection-prompt.ts` that, on Enter, mutated `prompt.value` based on the cursor row via `reconcileInteractiveMigrationEnterValues`. With the cursor at index 0 = "Skip for now" (the default), pressing Enter therefore wiped the pre-selected items and submitted `[MIGRATION_SELECTION_SKIP]` even though every item was visually checked. No other wizard multiselect (see `src/wizard/setup.official-plugins.ts`) does this: Enter submits whatever is currently selected, period. Drop the custom Enter handler. Enter now falls through to clack's default behavior — submit the current selection. The `reconcileInteractiveMigrationSkillToggleValues` space handler and the `a`/`i` shortcut handler are unchanged, so the sentinel rows ("Skip for now", "Toggle all on", "Toggle all off") still work via space-then-Enter (matching the official-plugins picker pattern for "Skip for now"). The now-unused `reconcileInteractiveMigrationEnterValues` function and its tests are removed. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - `pnpm test src/commands/migrate/skill-selection-prompt.test.ts` 6/6 - `pnpm test src/commands/migrate/selection.test.ts` 16/16 - `pnpm test src/wizard/setup.post-install-migration.test.ts` 10/10 - Live verified against the seeded fixture at `~/onboarding/codex_home` via `bash run.sh onboard-fast`: wizard prompt → no plan dump → selection picker (cursor wherever, Enter accepts the visual state) → "Apply this migration now?" → progress + post-apply summary.
…ed" affordance Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in #81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case. (cherry picked from commit 48529f1)
…ed" affordance (#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in #81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
* feat(migrate): suppress plan log on embedding + add "Accept recommended" affordance (#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in #81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10). (cherry picked from commit a197e31) * test(migrate): reconcile beta selection tests
…81192) Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case.
…ed" affordance (openclaw#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in openclaw#81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
…81192) Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case.
…ed" affordance (openclaw#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in openclaw#81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
…81192) Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case.
…ed" affordance (openclaw#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in openclaw#81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
…81192) Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case.
…ed" affordance (openclaw#81219) Two related improvements to the interactive `openclaw migrate <provider>` flow, both surfaced by the onboarding post-install migration prompt that landed in openclaw#81192. 1. `suppressPlanLog?: boolean` on `MigrateCommonOptions` (`src/commands/migrate/types.ts`). When set, `migratePlanCommand` skips the up-front `runtime.log(formatMigrationPlan(plan))` dump. The interactive Codex selection picker and the "Apply this migration now?" confirm still run. Wired from the wizard helper at `src/wizard/setup.post-install-migration.ts` so that path no longer shows the plan dump after the user has already confirmed at the wizard prompt. 2. New "Accept recommended" sentinel row at the top of both Codex selection pickers, with "Toggle all on" and "Toggle all off" moved to the bottom. The cursor starts on "Accept recommended" so pressing Enter at the default position submits the picker's `initialValues` (the recommended set) — matching the visual state of the checkboxes. Implemented in `skill-selection-prompt.ts`: - Enter on the Accept sentinel sets `prompt.value` to `opts.initialValues` and lets clack submit. - Space on the Accept sentinel snaps `prompt.value` to `opts.initialValues` so the visible checkboxes flip to the recommended state. The user can then Enter to commit or continue toggling individual rows. The Accept row itself is never persisted in the submitted value list. The existing Enter handler for "Toggle all on" / "Toggle all off" stays unchanged. 3. Removed the "Skip for now" sentinel entirely. It was a single- keystroke trap: with the picker cursor wrapping from Accept to Skip via up-arrow (or via accidental down-arrows), Enter on Skip wiped `prompt.value` to `[MIGRATION_SELECTION_SKIP]` and abandoned the whole migration — including any items the user had already confirmed in the previous picker. To exit without migrating, users now navigate to "Toggle all off" (or use the `a` / `i` keyboard shortcuts) to clear the selection; the apply phase then sees no planned work and skips itself via the existing `shouldSkipCodexApplyAfterInteractiveSelection` path. Cleanup spans `migrate/selection.ts` (constants, `{ action: "skip" }` variant, and the reconcile/resolve SKIP branches), `migrate.ts` (the picker option rows and the `if (selection.action === "skip")` handler blocks in both pickers), and the corresponding tests. 4. Plugin selection hint relabelled from "Activate every recommended plugin" to "Migrate every recommended plugin" so it matches the skill hint and the prompt's own verb ("Migrate ... into this agent now?"). Tests: - `src/commands/migrate/skill-selection-prompt.test.ts` — Accept sentinel cases (Enter and Space + Enter both submit initialValues); Skip-related test removed; Skip row dropped from the picker fixture. - `src/commands/migrate/selection.test.ts` — Skip-related sub- assertions trimmed from the resolve/reconcile tests; the "skip + toggle-off precedence" test renamed to "toggle-off precedence over toggle-on" and Skip cases removed. - `src/commands/migrate.test.ts` — four Skip-driven scenarios removed (plugin-only skip, both-pickers skip, skip-skills-continue-to-plugins, Codex subscription warning + skip). - `src/wizard/setup.post-install-migration.test.ts` — call-args assertion expects the new `suppressPlanLog` option. Verification: - `pnpm lint` clean - `pnpm tsgo:core` + `pnpm tsgo:core:test` clean - Touched test suites green (migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10).
…81192) Add a post-install seam so the wizard can prompt the user to import their existing Codex CLI state (skills, archived config/hooks, advisory cached plugins) through the existing `openclaw migrate codex` flow once the harness plugin is in place. Fires on both fresh installs and repair runs; the user can decline at any time. Trigger sites, both routing through one helper: - src/plugins/provider-auth-choice.ts: after `ensureCodexRuntimePluginForModelSelection` reports `installed: true`, dynamically import `offerPostInstallMigrations` and call it before the wizard moves on. - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts: same call shape with `nonInteractive: true`, so the helper emits a hint line only and never mutates state. Helper (src/wizard/setup.post-install-migration.ts) is generic, not Codex-hardcoded — it resolves migration providers via the manifest `migrationProviders` contract, filters to providers owned by plugins the caller flags as installed in this onboarding step, runs `provider.detect`, and on TTY hands accepted runs to `migrateDefaultCommand`. All detect, prompt, and migrate failures are swallowed so onboarding never aborts on this optional offer. Also harden the Codex app-server subprocess lifecycle now that `detect()` runs from a hotter onboarding path: isolate the plugin-install `plugin/read` call (extensions/codex/src/migration/apply.ts) and have the isolated request wait for child exit with a SIGKILL fallback (extensions/codex/src/app-server/request.ts) so parents are not held open by an orphaned codex binary. Tests: - src/wizard/setup.post-install-migration.test.ts (new, 10 cases) - src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts extended with hint-call assertions and a not-required-no-offer case. (cherry picked from commit 48529f1)






Summary
After the Codex harness plugin is installed during onboarding, prompt the user to import their personal Codex CLI state (skills, archived config/hooks, advisory cached plugins) via the existing `openclaw migrate codex` flow. The prompt is anchored to the install event so it only fires once per fresh install, not on repair passes.
Interactive
Screen.Recording.2026-05-12.at.16.08.03.mov
Non-interactive

Behavior
Trigger points — both call into a single helper:
Helper (`src/wizard/setup.post-install-migration.ts`):
Generic seam, not Codex-hardcoded. The helper is driven off the manifest `contracts.migrationProviders` ownership map, so when the Claude / Hermes plugins land via onboarding their providers get the same offer for free.
`freshlyInstalled` field on `CodexRuntimePluginInstallResult`. Upstream added a "plugin already on disk → repair" branch that returns `installed: true`. To avoid re-prompting every wizard run for users who already have the harness, the migration offer gates on a new `freshlyInstalled: boolean` flag instead:
Files
Verification
```
pnpm test src/wizard/setup.post-install-migration.test.ts \
src/wizard/setup.official-plugins.test.ts \
src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts
Test Files 3 passed (3)
Tests 24 passed (24)
```
`pnpm check:changed` exit 0 (lint, typecheck core, typecheck core tests, import cycles all clean).
Real behavior proof — dry-run against a fake CODEX_HOME
```
$ openclaw migrate codex --dry-run --from ~/onboarding/codex_home
Migration plan: codex
Source: /Users/sjf/onboarding/codex_home
Target: /Users/sjf/.openclaw/workspace
5 items, 0 conflicts, 0 sensitive items
Items:
```
Fixture layout exercises:
What was not tested
Notes / follow-ups