Skip to content

T9: Wizard pick phase (runWizardPick)#373

Merged
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T9
Jul 22, 2026
Merged

T9: Wizard pick phase (runWizardPick)#373
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T9

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Implements task T9 of install-experience-overhaul.

Adds runWizardPick(opts) in src/core/cli/wizard/pick.js: the wizard pick phase, keeping walkthrough.js's prompt/write/guard/overwrite-confirm shape but sourcing rows from catalog.pickerDescriptors (T2) instead of PICKER_SOURCES. Locked (central-layer) rows render disabled: true labeled · managed by your fleet and are filtered out of the returned sources before composition (LLP 0129 join-before-picker, LLP 0031 provenance). Composition reuses T6's composePickerConfig. Non-interactive callers (--yes/--dry-run/presets/--from-file) invoke it directly via the interactive = !opts.picks split.

Threads an optional disabled flag through the TUI multiselect (types/reducer/render) so locked rows are shown-but-not-toggleable. Exports the shared pick helpers from walkthrough.js for reuse.

Checks: npm test (only the 7 pre-existing leave-command failures remain, unrelated to this task) and tsc typecheck both green; new tests cover the pick phase and the disabled-row TUI behavior.

Task-Id: T9

Add `runWizardPick(opts)` in `src/core/cli/wizard/pick.js`, extracting the
pick/compose/guard/write shape from `runPickerWalkthrough` but sourcing rows
from `catalog.pickerDescriptors` (T2) instead of the retired `PICKER_SOURCES`
table. A row's checked state is `detected.has(id) || locked.includes(id)`; a
locked id renders `disabled: true` with the `· managed by your fleet` label
(LLP 0031 provenance vocabulary) and is filtered out of the returned sources
before composition, so a central-layer source is never re-composed into the
local layer (LLP 0129 join-before-picker). Composition itself reuses T6's
descriptor-driven `composePickerConfig`. Non-interactive callers set
`opts.picks` and skip prompting/detection, matching the existing
`interactive = !opts.picks` split.

Support the locked rendering by threading an optional `disabled` flag through
the TUI multiselect (types, reducer, render): a disabled row is context-only,
not toggleable by space or select-all, and renders dimmed. Export the shared
pick helpers from `walkthrough.js` for reuse rather than duplicating them.

Tests: pick-phase behavior (non-interactive compose, detection pre-check,
descriptor-sourced options, locked-row disable + filter, overwrite guard,
cancel) plus TUI reducer/render coverage for disabled rows.

Task-Id: T9
@philcunliffe
philcunliffe merged commit 7fc6777 into integration/install-experience-overhaul Jul 22, 2026
8 checks passed
@philcunliffe
philcunliffe deleted the task/install-experience-overhaul/T9 branch July 22, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant