feat(cli): v0.2 Command Center — Ink TUI split-pane search with live preview#42
Open
sairam0424 wants to merge 15 commits into
Open
feat(cli): v0.2 Command Center — Ink TUI split-pane search with live preview#42sairam0424 wants to merge 15 commits into
sairam0424 wants to merge 15 commits into
Conversation
…ype, add empty query test
Implements useVaultSearch with usage-sorted fallback for empty queries, debounced vault.search for non-empty queries, and error resilience (onError callback + last-good result retention on failure).
…onfig, sync debounce tests
…destructure scroll resets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@inquirer-based interactive CLI mode with a full-screen Ink TUI (vault/vault i) featuring a live split-pane layout: fuzzy search on the left, content preview on the right, updating as you arrow through resultsgetContentExcerpt()utility to@commandvault/corethat finds the first query-match in skill content and returns a centred line window — used by both the TUI preview pane and available for the VS Code extension@inquirerlegacy mode unchangedWhat ships
@commandvault/coresrc/utils/excerpt.ts—getContentExcerpt(content, query, maxLines)with 11 tests, 100% coverage@commandvault/clisrc/tui/App.tsx— root Ink component; all state + keyboard handling (q, Esc, ↑↓, Tab,[,], Enter/copy,o/open,f/favorite)src/tui/SearchBar.tsx— query input with active filter badgessrc/tui/ResultsList.tsx— windowed scroll list with▶active row markersrc/tui/PreviewPane.tsx— content excerpt with match-line highlighting, metadata fallback for empty-content entriessrc/tui/ActionBar.tsx— key hints / error messages (auto-clear 3s)src/tui/FilterBar.tsx— Tab-activated type/source pill selectorsrc/tui/hooks/useScroll.ts—useReducer-based windowed scroll (concurrent-React safe)src/tui/hooks/usePreviewScroll.ts— preview pane scroll withvisibleLines=0guardsrc/tui/hooks/useVaultSearch.ts— 80ms debounce, stableonErrorref, usage-sorted default viewsrc/commands/interactive.tsx— TTY gate: Ink TUI withenableWatcher: true, legacy fallback preservedNew deps (CLI only):
ink,ink-text-input,clipboardy,react(runtime);@types/react,ink-testing-library(dev)Test plan
pnpm --filter @commandvault/cli test→ 73/73 passpnpm --filter @commandvault/core test→ 129/130 pass (1 pre-existing env-sensitive integration test)pnpm --filter commandvault-ai test→ 56/56 passpnpm build→ all 3 packages compile cleanpnpm typecheck→ no errorsnode packages/cli/dist/index.jsin a real terminal → TUI launches, search works, preview updates on ↑↓,qexitsnode packages/cli/dist/index.js interactive | cat→ legacy@inquirermode runs (non-TTY fallback)Keyboard contract
o$EDITORf[/]q/ Ctrl+C🤖 Generated with Claude Code