Skip to content

Add navigation shortcuts, clipboard copy, and go-to-path with tab completion#3

Merged
bluestreak01 merged 10 commits intomasterfrom
vi_next2
Mar 23, 2026
Merged

Add navigation shortcuts, clipboard copy, and go-to-path with tab completion#3
bluestreak01 merged 10 commits intomasterfrom
vi_next2

Conversation

@bluestreak01
Copy link
Copy Markdown
Member

@bluestreak01 bluestreak01 commented Mar 23, 2026

Summary

  • Shift+Tab cycles panels in reverse order
  • PageUp/PageDown/Home/End in CI panel for fast scrolling
  • Ctrl+C copies filename, Ctrl+P copies full path to clipboard (OSC 52)
  • Ctrl+G opens go-to-path with zsh-style tab completion:
    • Case-insensitive directory matching, longest common prefix fill
    • Overlay dropdown with dialog colors and border
    • Tab/Shift+Tab/Up/Down to cycle candidates, Enter to apply
  • Ctrl+F opens fuzzy file search:
    • Recursively walks directory tree (10K cap, skips .git/node_modules/target)
    • Fuzzy matching — chars match in order, handles partial names and typos
    • Scored by consecutive matches, word boundaries, filename position
    • Zero-allocation per-keystroke scoring (pre-computed lowercase + filename offsets)
    • Opens selected file in the built-in editor
  • F12 spawns an embedded terminal panel running claude (Claude Code):
    • Full PTY emulation via portable-pty + vt100 crate
    • 10,000-line scrollback buffer with trackpad/mouse scroll
    • All keystrokes (including Tab) forwarded to claude
    • F1 switches focus back to file panel; mouse click also works
    • Clicks inside terminal absorbed (no click-through to file panel)
    • Coalescing wakeup mechanism — renders immediately without flooding
    • Zero-allocation render loop (vt100 0.16 &str cells, reused buffers)
    • Auto-closes when the child process exits
  • F5 (in terminal panel) scans visible output for file:line references and opens in editor
  • PR state display: merged PRs show in magenta, closed show in red
  • Editor text color changed to white for readability
  • UTF-8 safety fixes in go-to-path completion
  • Selection preserved across filesystem watcher reloads (fixes Linux inotify bug)
  • Dependency upgrades: vt100 0.15→0.16, ratatui 0.29→0.30

Test plan

  • Shift+Tab cycles panels in reverse (including with CI panels open)
  • PageUp/PageDown/Home/End work in CI panel tree view
  • Ctrl+C copies filename, Ctrl+P copies full path (check clipboard)
  • Ctrl+G: type partial path, press Tab — verify completion dropdown
  • Ctrl+F: type partial filename, verify fuzzy matches and ranking
  • Ctrl+F: select result and press Enter — opens in editor
  • F12 opens Claude Code in opposite panel
  • Tab works inside Claude Code (autocomplete)
  • F1 switches focus from terminal to file panel
  • Clicks inside terminal don't affect the file panel
  • Trackpad scroll works in terminal panel (scrollback)
  • F5 in terminal finds file:line reference and opens editor
  • Merged PR shows ● in magenta, closed shows ✘ in red
  • Select multiple files, wait — selection not lost (Linux inotify fix)

🤖 Generated with Claude Code

bluestreak01 and others added 10 commits March 22, 2026 16:48
…-path with tab completion, and editor text color fix

- Shift+Tab cycles panels in reverse order
- PageUp/PageDown/Home/End in CI panel for fast navigation
- Ctrl+C copies filename, Ctrl+P copies full path to clipboard
- Ctrl+G opens go-to-path input with tab-completion (directories, case-insensitive)
- Editor default text color changed to white for readability
- Go-to-path input text uses editor_text_fg for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…upport

- Completions dropdown renders as overlay instead of pushing panel down
- Go-to-path input and dropdown use dialog color scheme with border
- Up/Down arrow keys cycle through completions alongside Tab/Shift+Tab

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d perf

Terminal panel:
- F12 spawns `claude` in a PTY in the opposite panel using portable-pty
- vt100 crate parses terminal output into a cell grid rendered via ratatui
- All keystrokes forwarded (arrows, Ctrl combos, function keys)
- Tab/Shift+Tab switches focus, F12 closes, auto-closes on exit
- Coalescing wakeup mechanism avoids redundant renders on output bursts
- Efficient rendering: no per-cell String allocation, direct push into span accumulator

Bug fixes:
- Fix UTF-8 panic in completion apply: use char count instead of byte slicing
- Fix UTF-8 panic in go-to-path scroll: use char_indices for valid boundaries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…w keybindings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rade, perf

Terminal panel:
- F5 scans terminal for file:line patterns and opens in editor at that line
- Scrollback buffer (10K lines) with trackpad/mouse scroll support
- Typing auto-scrolls to bottom
- Upgrade vt100 0.15→0.16: cell.contents() returns &str (zero allocation)
- Upgrade ratatui 0.29→0.30 (required by vt100 0.16 unicode-width dep)
- Zero-alloc render loop: reuse text buffer and spans vec across rows
- Skip contents() call for empty cells via has_contents() check
- Combined modifier flags in single pass

Bug fixes:
- Preserve file selection across filesystem watcher reloads (fixes Linux inotify)
- Preserve cursor position across reloads
- Fix panic in parse_file_reference with multi-byte whitespace

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d PR state

- Clicks inside terminal panel no longer pass through to file panel
- F1 switches focus out of terminal (Tab forwarded to claude for autocomplete)
- F12 shown in main panel footer
- PR display: merged (● magenta), closed (✘ red), open (check status as before)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Ctrl+F opens fuzzy file finder in the active panel
- Recursively walks directory tree (10K file cap, skips .git/node_modules/target)
- Fuzzy matching: chars match in order, scored by consecutive/boundary/filename bonuses
- Pre-computed lowercase chars and filename offsets — zero allocation per keystroke
- Dialog-styled overlay dropdown with result count
- Tab/Up/Down to cycle, Enter to open in editor, Esc to cancel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 tests covering:
- Exact, prefix, substring, path, and case-insensitive matching
- No-match cases (wrong order, missing chars, query too long)
- Scoring quality: consecutive > spread, filename > deep path, short > long, word boundary bonus
- Directory walker: skips .git, finds source files
- FuzzySearchState integration: update_results filtering and ranking

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clippy fixes:
- Box large AppMode variants (Viewing, HexViewing, Editing) to reduce enum size
- Rename UnsavedDialogField variants to drop redundant Button prefix
- Add type aliases for complex CI panel types (ChecksReceiver, PendingStepFetch)
- Refactor render_tree to use context struct (reduces arg count)
- Use strip_prefix instead of manual prefix stripping
- Use iter().flatten() instead of if-let inside for loop
- Allow too_many_arguments on render_checkbox (many call sites)
- Apply all auto-fixable clippy suggestions

Tests (30 fuzzy + 14 go-to-path + 15 terminal = 59 new):
- Fuzzy search: unicode, single-char, dotfiles, duplicate chars, deep paths,
  truncation, empty list, navigation wrapping, extension-only, query with slash
- Go-to-path: tilde expansion, trailing slash, apply_completion, common prefix,
  populate_completions (real FS), case-insensitive, invalid dir
- Terminal: parse_file_reference patterns, encode_key_event for all key types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bluestreak01 bluestreak01 merged commit 19e5331 into master Mar 23, 2026
@bluestreak01 bluestreak01 deleted the vi_next2 branch March 23, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant