Skip to content

feat(011): wizard bug fixes — back-nav, resume, cursor, labels, summary, docs#114

Merged
jwill824 merged 17 commits into
mainfrom
011-wizard-bug-fixes
Apr 11, 2026
Merged

feat(011): wizard bug fixes — back-nav, resume, cursor, labels, summary, docs#114
jwill824 merged 17 commits into
mainfrom
011-wizard-bug-fixes

Conversation

@jwill824
Copy link
Copy Markdown
Owner

Summary

Resolves six P0–P1 wizard UX bugs and updates the Astro docs site to reflect the spec 010 wizard rewrite (13-step flow, merged Contexts step, new install methods).


Closes


What Changed

Bug Fixes

Bug Fix
Resume clamp (#92) Math.min(resumeStep + 1, LAST_STEP) prevents out-of-bounds blank screen; extractStepValues() pre-populates history frames from saved config
Cursor restore (#90) process.on('exit'|'SIGINT'|'SIGTERM') handlers write \x1b[?25h before main() renders any Ink output
Opt label (#93) Removed dimColor from (opt) suffix in sidebar — label renders at normal text weight
Config summary (#94) Added Browser and AI Coding Tools sections to ConfigSummary; conditional on config.browser?.selected?.length and config.aiTools?.length
Language version (#66) lang-version-manual phase validates non-empty input; versionError state shows inline error and blocks advance

Docs

  • getting-started.md — rewritten to 13-step STEP_REGISTRY walkthrough; back-navigation documented; MacPorts/rbenv/fnm/python-venv added
  • config-reference.mdbrowser field shape corrected to { selected: string[], default: string|null }; aiTools shape corrected to { name, label, variant }; schemaVersion updated to "1.6"; new version managers listed

Refactor


Test Coverage

File Tests Added
tests/unit/wizard-navigation.test.ts +20 tests — StepNav rendering, extractStepValues, resume clamping, LanguageBindingSchema
tests/unit/config-summary.test.ts +7 tests — browser/aiTools conditional rendering

Final counts: 232 unit · 42 integration · lint clean


Spec Artifacts

  • specs/011-wizard-bug-fixes/ — spec, plan, tasks, research, data-model, contracts, quickstart
  • All 26 automatable tasks marked complete; T027 (manual smoke test) left for reviewer

jwill824 and others added 17 commits April 9, 2026 21:58
Refs: #90, #91, #92, #93, #94, #66, #103
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fill plan.md with full Phase 0 research and Phase 1 design
- Add research.md: 7 research findings (focus detection, cursor restore,
  resume exit guard, history pre-population, dimColor, summary gaps, docs)
- Add data-model.md: StepNavProps changes, extractStepValues mapping,
  ConfigSummary additions, cursor restore pattern, resume state guard
- Add quickstart.md: per-bug implementation checklist with commit order
- Add contracts/wizard-ux.md: back-nav, resume, cursor restore UX contracts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
27 tasks across 10 phases covering 7 user stories:
- US1 (P1): focus-aware back nav — StepNav + wizard + contexts + app-config (T003–T008)
- US2 (P1): resume exit guard + history pre-population (T009–T012)
- US3 (P1): cursor restore via process signal handlers (T013–T014)
- US4 (P2): remove dimColor from optional step (opt) label (T015)
- US5 (P2): add browser + aiTools to config summary (T016–T017)
- US6 (P2): contexts language/version multi-select + validation (T018–T021)
- US7 (P2): update getting-started.md + config-reference.md for spec 010 (T022–T023)

Refs: #90, #91, #92, #93, #94, #66, #103

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rsion validation bugs

- StepNav: add isInputFocused + onAtFirstStep props; guard useInput when input focused
- wizard: add extractStepValues() for resume history pre-population; clamp resume step to LAST_STEP; show first-step b-key hint; remove dimColor from (opt) sidebar label
- config-summary: add Browser and AI Coding Tools conditional sections
- index: restore terminal cursor on exit, SIGINT (130), SIGTERM (143)
- contexts: versionError state + inline validation for lang-version-manual phase
- tests: +25 tests covering StepNav, extractStepValues, resume clamping, ConfigSummary, LanguageBindingSchema
- docs: update getting-started.md to 13-step STEP_REGISTRY; update config-reference.md with correct browser/aiTools/versionManagers/schemaVersion shapes

Closes #90, #91, #92, #93, #94

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes: #90, #91, #92, #93, #94

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Mark T003–T026 as complete [X] in tasks.md
- Add deferral notes to T006, T007, T014
- Correct T017 test file reference (config-summary.test.ts)
- Note T018/T019 as pre-existing-no-change
- Fix plan.md R6 browser field shape to { selected: string[], default: string|null }
- Advance spec.md status from Implemented → Analyzed

Refs: #90, #91, #92, #93, #94

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…mment

Steps 6 and 7 both carry 'configurations' in their history frames
because the Tools step and Editor Config step both write to that field.
Each frame must contain it so back-nav to either step restores the
correct partial state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…props

StepNav is not imported by any step component. Focus-safe back-nav for
text inputs is handled per-component via GateInput's !editing guard in
contexts.tsx. The first-step hint is wired at the wizard level via its
own useInput call — not through StepNav.

Remove the two unused props, simplify useInput back to always-active,
and document the per-component back-nav pattern in the file header.
Update wizard-navigation tests to drop the onAtFirstStep render test.

Closes #113

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mark T003/T004 as superseded by post-analysis refactor.
Add T003b tracking the isInputFocused/onAtFirstStep removal (closes #113).
Update T008 description to match actual test coverage after removal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix blank OS in config summary by initializing wizard config state
  with detectOS() so config.os is always populated from step 0
- Clear checkpoint when wizard fully completes (advance past LAST_STEP)
  so re-running tilde after a completed session no longer shows the
  stale 'Resume from step 12' prompt
- Remove now-redundant clearCheckpoint() from step-11 onComplete since
  the advance() function handles cleanup at the final step boundary
- Auto-select pre-installed AI tools on first visit to AI Tools step
  (savedNames absent → selected defaults to entry.installed instead of false)

Closes #100

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TildeConfig.os is z.literal('macos') — OS type ('macos'|'linux'|'windows')
is wider. The cast is safe since assertMacOS() guards the wizard entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- app.tsx: Wizard onComplete now calls setDone(true) and renders a
  completion screen; removes stale 'process.exit is handled by
  ConfigExportStep' comment that was wrong
- wizard.tsx: resume prompt shows 'Edit configuration' when lastCompletedStep
  >= LAST_STEP (fully completed); shows 'Resume from step N' otherwise
- wizard.tsx: fix OS spread order so checkpoint partialConfig.os=undefined
  can't clobber the detectOS() default (initialConfig spread first, os last)
- apply.tsx: call onComplete() after 1.5s when Apply succeeds so wizard
  completes cleanly instead of hanging on the done screen
- writer.ts: writeConfig always writes a canonical copy to
  ~/.tilde/tilde.config.json so discoverConfig() finds the config
  regardless of where the dotfiles repo lives; dotfilesRepo param is
  now optional (falls back to ~/.tilde/)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After completing the wizard and re-running tilde, the config-first
mode now shows three choices instead of one:
  - Apply this configuration (existing)
  - Edit configuration  → launches ReconfigureMode with existing config
  - Start over (run wizard) → launches fresh Wizard

app.tsx gains a configEditMode state ('apply' | 'edit' | 'start-over')
to select between the three rendering branches when a config is found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added optional configPath prop to ConfigSummary component, rendered
as a dimmed 'Config: <path>' row at the bottom of the summary box.

config-first mode passes the loaded configPath so users can see exactly
which file was used.  apply.tsx omits it (path not yet known before
apply runs).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…R fixes

Constitution (2.4.0 → 2.4.1 PATCH):
- Schema version in Config export step: 1.5 → 1.6
- Entry Modes table: Config-first now documents Apply/Edit/Start Over/Cancel
- Principle IV: config-first confirmation MUST offer all four options
- Sync impact report updated

specs/011-wizard-bug-fixes:
- spec.md: added US8 (config-first Edit/Start Over), US9 (OS/AI/apply
  regressions); added FR-012–FR-018 and SC-008–SC-010
- tasks.md: Phase 10 T027 marked done; added Phase 11 with T028–T035
  covering all post-PR manual test bug fixes

site/docs/getting-started.md:
- Fixed config detection search order (cwd → git-root → ~/.tilde/)
- Added 'Re-running tilde' section documenting Apply/Edit/Start Over/Cancel
- Updated 'Updating your config' to lead with Edit configuration as primary
  flow, with tilde update as the targeted alternative

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- afterEach in config-schema.test.ts now deletes ~/.tilde/tilde.config.json
  after each test so contract runs no longer silently overwrite the
  developer's real config (review finding H1)
- apply.tsx: store setTimeout handle in completeTimerRef and clear on
  unmount to prevent stale-closure call if component unmounts early (M1)
- wizard.tsx: remove redundant currentStep dep from skip useCallback —
  skip only delegates to advance which already captures currentStep (M2)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jwill824 jwill824 merged commit 8451afc into main Apr 11, 2026
3 checks passed
@jwill824 jwill824 deleted the 011-wizard-bug-fixes branch April 11, 2026 17:10
jwill824 pushed a commit that referenced this pull request Apr 11, 2026
# [1.7.0](v1.6.0...v1.7.0) (2026-04-11)

### Features

* **011:** wizard bug fixes — back-nav, resume, cursor, labels, summary, docs ([#114](#114)) ([8451afc](8451afc)), closes [#90](#90) [#91](#91) [#92](#92) [#93](#93) [#94](#94) [#66](#66) [#103](#103) [#90](#90) [#91](#91) [#92](#92) [#93](#93) [#94](#94) [#90](#90) [#113](#113) [#100](#100)
@jwill824
Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment