You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(tui): add spec name autocomplete for /run command (#89)
* feat(tui): add spec name autocomplete for /run command
- Add listSpecNames() utility to read .md files from specs directory
- Add fuzzyMatch() utility for sequential character matching
- Add specNames field to SessionState, loaded at startup and refreshed after /init
- Update CommandDropdown to use fuzzy matching instead of includes()
- Update ChatInput to detect /run <space> and show spec dropdown
- Thread specSuggestions from MainShell → ChatInput via sessionState.specNames
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test(tui): add integration and keyboard navigation tests for spec autocomplete
- Add MainShell integration tests verifying specNames flows from
SessionState through to the /run dropdown (4 scenarios: with specs,
filtered results, undefined specNames, empty specNames)
- Add CommandDropdown keyboard navigation tests: Enter selects first
item, Down arrow advances selection, Up arrow reverses it, clamping
at index 0, Escape calls onCancel
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(tui): address code review feedback for spec autocomplete
- Add specSuggestions to updateValue dependency array (stale closure fix)
- Use node: prefix for fs/promises and path imports (codebase convention)
- Guard getMaxCommandWidth against empty array (prevents RangeError)
- Wrap handleInitComplete spec loading in try-catch (unhandled rejection fix)
- Log non-ENOENT errors in listSpecNames for debuggability
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tui): address code review round 2 for spec autocomplete
- Remove unused `join` import from spec-names.ts
- Fix duplicate history entry when selecting spec from dropdown
- Refresh spec name cache after interview creates a new spec
- Clean up self-correcting comment in CommandDropdown test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(tui): address code review round 3 for spec autocomplete
- Add itemPrefix prop to CommandDropdown (default '/') so spec names
render without misleading slash prefix
- Hoist RUN_PREFIX constant to module scope (avoid per-render allocation)
- Wrap specSuggestions in useMemo to prevent unnecessary re-renders
- Replace console.debug with logger.debug for consistency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments