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: flat git ls-files index for file search and @ mentions (#36)
New scanFlat IPC endpoint — uses git ls-files --cached --others --exclude-standard to enumerate all tracked and untracked-but-not-ignored files as a flat list, replacing the recursive directory tree scan for search use-cases
Dedicated fileIndexByWorktree store state — separates the flat search index from the tree-based sidebar data, with its own loading guard (fileIndexLoadingByWorktree) to prevent duplicate concurrent loads
Incremental file index updates — handleFileChange now patches the flat index in-place on add, unlink, and unlinkDir events instead of re-scanning the entire project
useFileMentions simplified — accepts FlatFile[] directly instead of FileTreeNode[], removing the internal flattenTree call and an extra useMemo
FileSearchDialog and SessionView updated — both now read from fileIndexByWorktree and call loadFileIndex instead of depending on the sidebar's tree data, so search/@ mentions work even when the file tree sidebar is collapsed or on a different worktree
File watcher subscription consolidated into store — startWatching/stopWatching now own the onChange subscription lifecycle (with guard against duplicate subscriptions), removing manual ref-based subscribe/unsubscribe from FileTree.tsx
QuestionPrompt layout tweak — moved dismiss button into the header bar and multi-question tabs below it for cleaner layout
All file mention tests updated — test fixtures simplified from nested FileTreeNode[] trees to flat FlatFile[] arrays, matching the new API surface
Relocated question header/tabs into the header bar of the QuestionPrompt component, consolidating the title area with the dismiss button into a single row
For multi-question prompts, the tab buttons now sit inline in the header bar next to the icon and dismiss button, instead of being in a separate section below the header
For single-question prompts, the question header text is now displayed directly in the header bar as a truncated label
Moved the dismiss (X) button to stay at the far right of the header, after the tabs/title, with shrink-0 to prevent it from collapsing
Removed the extra div wrapper that previously separated the header from the question tabs, reducing nesting and vertical space