Skip to content

refactor(wizard): share select prompt requests - #157607

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/wizard-selection-requests-20260924
Sep 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/wizard-selection-requests-20260924

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The wizard constructs the same selection request separately for searchable and ordinary prompts, leaving shared request behavior duplicated.

User Impact

No user-visible change. Selection values, search filtering, navigation, styles, output streams, cancellation and listener cleanup retain their existing behavior. No configuration, stored-data, migration or operator-action changes.

Why This Change Was Made

This specific private wizard request consolidation is a requested active deliverable in my authorized maintainer cleanup campaign, and I accept its standalone scope. Each existing navigation callback chooses its backend and constructs one request. Production code decreases by 12 lines; tests increase by 75 lines. The generic prompt backends and public interfaces remain unchanged.

Evidence

  • The same expanded clack-prompter.test.ts passed 51 tests against baseline production and 51 against the candidate. Eight routing cases cover select/multiselect, searchable/ordinary and navigation present/absent, including navigation with both moves disabled; they preserve option/value identity, initial values, exact request fields, styles, output, abort and cancellation.
  • Complete candidate sibling suites passed: navigation prompts 3, navigation prompter 7, styled terminal select 1. Zero failures or skipped cases.
  • All 31 selected canonical changed-file stages passed, including core production types, all 25 test-type graphs, formatting, lint and source guards. Source substitution/restoration, all 49,293 tracked input bindings, terminal exit, stream closure and remote lease cleanup were verified.
  • Complete owner/caller/sibling review and direct Clack 1.8.1/core 1.5.1 implementation/type inspection found no behavior change. Fresh signed-commit structured review found no actionable findings; independent source, proof and commit/review-integrity checks passed.
  • Linux x64, Node 24.19, pnpm 12.4.2, one worker: whole-command walls were baseline owner 2.098s, candidate owner 1.447s; the three sibling commands were 1.379s, 1.721s and 1.559s. These include process startup/setup and exclude provisioning/install. Sequential cache history differs; these are neither speedup measurements nor incremental hosted-CI cost estimates.
  • Remote proof reported a portal timeout/staging warning; this is not a portal-success or staging-cleanup claim. No interactive terminal session or live external service was exercised. No build/module boundary changed.
  • The commit uses the documented targeted-validation hook-skip exception after equivalent scoped proof; no claim that commit hooks ran. Hosted CI, exact-head Claw review and native landing gates remain required.

Named follow-up, outside this patch: ordinary Clack autocomplete checks initialValue by truthiness, while the navigation implementation checks for undefined. This is an inspected source difference, not a runtime-proven bug; this refactor preserves both implementations.

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 24, 2026 21:43
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 5:51 PM ET / 21:51 UTC.

ClawSweeper review

What this changes

The CLI wizard now builds one request per select or multiselect call after choosing the searchable, ordinary, or navigation-aware terminal prompt, with tests covering each route.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still has the duplicated request paths, and this active MEMBER-authored PR has no concrete correctness finding.

Priority: P3
Reviewed head: da78607ba777adb82ddb4a40c35ae68e711c6d8c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The refactor is focused, preserves the inspected request paths, and adds route coverage without an actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The changed owner is the CLI wizard selection adapter. The PR reports passing mocked request-boundary tests but no interactive terminal run; this MEMBER-authored refactor has no applicable contributor proof gate or stored-data contract change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed owner is the CLI wizard selection adapter. The PR reports passing mocked request-boundary tests but no interactive terminal run; this MEMBER-authored refactor has no applicable contributor proof gate or stored-data contract change.
Evidence reviewed 8 items Introduced production change: The pinned PR delta replaces separate searchable and ordinary request blocks with one backend choice and one request per selection method.
Current-main necessity: The affected files have no changes between the PR merge base and fetched main; current main retains the separate request blocks shown in the pre-PR source.
Request coverage: The added table exercises eight combinations across select and multiselect, searchable and ordinary backends, and navigation present or absent. It asserts the request fields at mocked backend boundaries.
Findings None None.
Security None None.

How this fits together

Onboarding and setup send selection requests to the CLI wizard. The wizard styles choices, passes them to a terminal prompt, and returns a selection or cancellation to the calling flow.

flowchart LR
A[Onboarding and setup] --> B[Wizard selection request]
B --> C[Style choices]
C --> D{Searchable or navigation aware?}
D --> E[Terminal prompt backend]
E --> F[Selection or cancellation]
F --> G[Calling flow]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -12, Tests +75. Total +63 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 15 27 -12
Tests 1 75 0 +75
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 90 27 +63

Review metrics

Metric Value Why it matters
Production versus test LOC production -12; tests +75 Runtime code shrinks while the new cases cover eight selection routes.

Technical review

Best possible solution:

Keep request construction in the existing CLI wizard adapter while preserving backend choice, option identity, and cancellation behavior.

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

Not applicable: this is a behavior-preserving cleanup, and current-main source establishes the duplicated request construction.

Is this the best way to solve the issue?

Yes: the private wizard adapter is the narrow owner for this consolidation, and the diff preserves the fields passed to each backend.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7a052255f8d6.

Labels

Label changes:

  • add P3: This is a bounded internal wizard cleanup with no claimed user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a bounded internal wizard cleanup with no claimed user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

  • Introduced production change: The pinned PR delta replaces separate searchable and ordinary request blocks with one backend choice and one request per selection method. (src/wizard/clack-prompter.ts:217, da78607ba777)
  • Current-main necessity: The affected files have no changes between the PR merge base and fetched main; current main retains the separate request blocks shown in the pre-PR source. (src/wizard/clack-prompter.ts:217, 7a052255f8d6)
  • Request coverage: The added table exercises eight combinations across select and multiselect, searchable and ordinary backends, and navigation present or absent. It asserts the request fields at mocked backend boundaries. (src/wizard/clack-prompter.test.ts:434, da78607ba777)
  • Navigation backend contract: The local navigation-aware select and autocomplete adapters accept the same selection options, signals, and output passed by the wizard. The PR does not change these adapters. (src/wizard/clack-navigation-prompts.ts:120, da78607ba777)
  • Clack dependency signal: The changed adapter directly imports Clack prompts; the repository pins @clack/core 1.5.1 and @clack/prompts 1.8.1. Installed dependency source was unavailable in this read-only checkout, so its internals were not independently rechecked. (package.json:2252, da78607ba777)
  • Release comparison: The latest identified release, v2026.9.6, also has the separate searchable and ordinary branches; this PR's consolidation is not present there. (src/wizard/clack-prompter.ts:217, eb377ac59e6c)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit 58c4dfe into main Sep 24, 2026
263 checks passed
@vincentkoc
vincentkoc deleted the refactor/wizard-selection-requests-20260924 branch September 24, 2026 22:53
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  docs(gateway): show how we build OpenClaw on Team (openclaw#157675)
  refactor: verify IRC surrogate chunking over loopback (openclaw#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant