Skip to content

cherry-pick #81219 onto release/2026.5.12 for beta.5 - #81327

Merged
sjf merged 2 commits into
release/2026.5.12from
cherry/81219-on-2026.5.12
May 13, 2026
Merged

sjf merged 2 commits into
release/2026.5.12from
cherry/81219-on-2026.5.12

Conversation

@sjf

@sjf sjf commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of #81219 (a197e31abb) onto release/2026.5.12 to feed the next pre-release (v2026.5.12-beta.5).

Original commit covers two related improvements to the interactive openclaw migrate <provider> flow:

  • suppressPlanLog?: boolean on MigrateCommonOptions so the post-install wizard helper can skip the up-front plan dump it already showed at the wizard prompt.
  • "Accept recommended" sentinel at the top of both Codex selection pickers; Skip for now sentinel removed (it was a single-keystroke trap that abandoned the whole migration). "Migrate every recommended plugin" relabel for picker hint parity.

See #81219 for the full rationale.

Conflict resolution

The upstream patch conflicted only in src/commands/migrate.test.ts. The conflict and the cleanly-applied test changes both depend on a multiselectPrompt() test helper that does not exist on release/2026.5.12 (introduced after the release cut).

Resolution per maintainer guidance ("tests don't matter for the release"):

  • Reverted all four test files in the patch to release HEAD:
    • src/commands/migrate.test.ts
    • src/commands/migrate/selection.test.ts
    • src/commands/migrate/skill-selection-prompt.test.ts
    • src/wizard/setup.post-install-migration.test.ts
  • Re-added MIGRATION_SELECTION_SKIP and MIGRATION_SKILL_SELECTION_SKIP exports to src/commands/migrate/selection.ts so the reverted tests still typecheck. Production code does not reference them (the picker option rows now use …_ACCEPT).

Known consequence: the SKIP-driven test cases inherited from the release branch will compile but will fail at runtime if executed, because production code no longer drives that path. Acceptable for this release per maintainer call; the test-file changes from #81219 will land naturally when release/2026.5.12 next merges with main.

Production files in this PR match the upstream patch exactly:

 src/commands/migrate.ts                        | 56 ++++++++++++--------------
 src/commands/migrate/selection.ts              | 30 +++-----------
 src/commands/migrate/skill-selection-prompt.ts | 18 +++++++++
 src/commands/migrate/types.ts                  |  5 +++
 src/wizard/setup.post-install-migration.ts     |  5 ++-
 5 files changed, 59 insertions(+), 55 deletions(-)

Verification

Local, scoped to the touched surface (broad release-path proof belongs to Full Release Validation per docs/reference/RELEASING.md):

  • pnpm tsgo:core — pass
  • pnpm tsgo:core:test — pass
  • node scripts/run-oxlint.mjs <5 touched files> — 0 warnings, 0 errors
  • pnpm format:check <5 touched files> — clean

Not run locally (deliberate):

  • Full vitest suites — production behavior is exactly the upstream patch; upstream verification recorded "migrate 32/32, selection 17/17, skill-selection-prompt 6/6, setup.post-install-migration 10/10" on main. Release-branch tests still using SKIP will not pass; see Conflict resolution above.
  • pnpm check:changed and broader gates — for the maintainer / Full Release Validation umbrella.

Test plan

  • Maintainer reviews conflict resolution and the SKIP-tests-will-fail tradeoff
  • Merge / land onto release/2026.5.12
  • RELEASE_TAG=v2026.5.12-beta.5 pnpm release:fast-pretag-check
  • Tag v2026.5.12-beta.5 and run OpenClaw NPM Release (preflight_only=true)
  • Full Release Validation (--ref main -f ref=release/2026.5.12 -f release_profile=stable)
  • OpenClaw Release Publish (--ref release/2026.5.12 -f tag=v2026.5.12-beta.5 -f npm_dist_tag=beta)
  • pnpm release:verify-beta -- 2026.5.12-beta.5 …

…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).

(cherry picked from commit a197e31)
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels May 13, 2026
@clawsweeper

clawsweeper Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
This PR cherry-picks the merged migrate-flow UX update from #81219 onto release/2026.5.12 for beta.5.

Reproducibility: not applicable. this is a release-branch cherry-pick PR, not a bug report. The upstream PR includes real onboard-flow proof for the same production behavior, and current main source matches that intended behavior.

Real behavior proof
Sufficient (linked_artifact): The PR links the merged upstream change, whose body includes a GitHub-hosted artifact and step-by-step real onboard-fast proof showing no plan dump and the new picker flow; the release-specific delta is conflict/test handling.

Next step before merge
The protected maintainer label plus the explicit release-branch test tradeoff make this a release maintainer decision, not a ClawSweeper repair-lane candidate.

Security
Cleared: The diff only changes migrate CLI selection behavior and a wizard call option; it does not add dependencies, workflow execution, publishing metadata, or broader secret/permission handling.

Review details

Best possible solution:

Have the release maintainer either accept the release-only test conflict and land the cherry-pick with the normal beta validation, or cherry-pick/update the matching test helper and tests before beta.5 if green release-branch Vitest is required.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a release-branch cherry-pick PR, not a bug report. The upstream PR includes real onboard-flow proof for the same production behavior, and current main source matches that intended behavior.

Is this the best way to solve the issue?

Yes for the production behavior: the narrow backport matches the already-merged migrate UX change. The release-only test mismatch is a maintainer release decision, not something ClawSweeper should auto-close or auto-repair from this review.

What I checked:

Likely related people:

  • sjf: git show identifies Sarah Fortune as the author of merged commit a197e31abb, which introduced the upstream migrate picker and wizard behavior now being backported; the provided PR context also lists sjf as the release cherry-pick author. (role: current-main implementation author and release cherry-pick contributor; confidence: high; commits: a197e31abbf0, 03a1427990b6; files: src/commands/migrate.ts, src/commands/migrate/selection.ts, src/commands/migrate/skill-selection-prompt.ts)

Remaining risk / open question:

Codex review notes: model gpt-5.5, reasoning high; reviewed against 34ce85a83d89.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 13, 2026
@sjf
sjf merged commit daff6d8 into release/2026.5.12 May 13, 2026
112 of 114 checks passed
@sjf
sjf deleted the cherry/81219-on-2026.5.12 branch May 13, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR proof: sufficient ClawSweeper judged the real behavior proof convincing. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant