Skip to content

feat: add @-triggered file path autocomplete to TUI input panel - #798

Merged
avoidwork merged 5 commits into
mainfrom
feat/at-filepath-autocomplete-tui
Aug 15, 2026
Merged

feat: add @-triggered file path autocomplete to TUI input panel#798
avoidwork merged 5 commits into
mainfrom
feat/at-filepath-autocomplete-tui

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

Add @-triggered file path autocomplete to the TUI input panel, allowing users to type @ followed by a filename fragment and select from a ranked list of matching files via glob search, with the selected path rendered in cyan/green.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

  • Unit tests created for autocomplete utility (glob search, debouncing, file filtering, result limiting)
  • Unit tests created for AutoCompleteDropdown component (keyboard navigation, no matches display)
  • Tests mirror src/ structure in tests/unit/tui/

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

OpenSpec Change

  • Change: at-filepath-autocomplete-tui
  • Proposal: openspec/changes/at-filepath-autocomplete-tui/proposal.md
  • Design: openspec/changes/at-filepath-autocomplete-tui/design.md
  • Tasks: openspec/changes/at-filepath-autocomplete-tui/tasks.md
  • Spec: openspec/changes/at-filepath-autocomplete-tui/specs/tui-autocomplete/spec.md

Key Files Changed

  • — extend with autocomplete mode
  • — lift autocomplete state, pass as props
  • — dropdown renders between InputPanel and StatusBar
  • — new: glob search utility
  • — new: dropdown component
  • — add fast-glob dependency
  • — new: autocomplete tests
  • — new: dropdown tests

- Add fast-glob dependency for file search
- Create autocomplete utility module with debounced glob search
- Extend InputPanel with @ trigger detection and keyboard interception
- Create AutoCompleteDropdown component with keyboard navigation
- Lift autocomplete state to App component
- Integrate dropdown rendering between InputPanel and StatusBar
- Implement path selection with cyan/green coloring
- Add unit tests for autocomplete and dropdown components

OpenSpec change: at-filepath-autocomplete-tui
@avoidwork avoidwork self-assigned this Aug 14, 2026
- Add autocomplete.js module for file path matching
- Update inputPanel.js with autocomplete mode and keyboard navigation
- Update tasks.md with completion status
- Add fast-glob dependency
- Add autocomplete.test.js with tests for searchFiles and InputPanel rendering
- Fix pre-existing broken InputPanel tests in tui.test.js that were calling
  InputPanel() directly without render() from ink, causing React hooks errors
- Create AutoCompleteDropdown component with Ink color system
- Wire keyboard handling (up/down/Enter/Esc) in InputPanel
- Add debounced search (150ms) via useEffect with searchTimerRef
- Lift autocomplete state to App component
- Render dropdown between InputPanel and StatusBar
- Fix pre-existing broken InputPanel tests in tui.test.js
- Add autocomplete.test.js with 21 tests for searchFiles and InputPanel
@avoidwork
avoidwork merged commit 4b0f00d into main Aug 15, 2026
2 checks passed
@avoidwork
avoidwork deleted the feat/at-filepath-autocomplete-tui branch August 15, 2026 05:08
avoidwork added a commit that referenced this pull request Aug 15, 2026
@avoidwork avoidwork mentioned this pull request Aug 17, 2026
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