Skip to content

Comments

refactor(channels): replace rustyline with crossterm for CLI input#615

Merged
bug-ops merged 1 commit intomainfrom
refactor/replace-rustyline-with-crossterm
Feb 19, 2026
Merged

refactor(channels): replace rustyline with crossterm for CLI input#615
bug-ops merged 1 commit intomainfrom
refactor/replace-rustyline-with-crossterm

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 19, 2026

Summary

  • Replace rustyline with crossterm raw-mode line editor for CLI input
  • Add prefix-based history search (Up/Down filters by typed prefix) to both CLI and TUI
  • Remove rustyline and sqlx dependencies from zeph-channels, using persist callback pattern instead
  • Derive Clone on SqliteStore for shared ownership in closures
  • Populate TUI input_history on load_history for arrow-key navigation

Test plan

  • cargo nextest run --workspace --lib --bins (2011 passed)
  • Manual: cargo run, verify line editing (Left/Right, Home/End, Backspace, Ctrl+A/E/U)
  • Manual: verify Up/Down history navigation and prefix filtering
  • Manual: cargo run -- --tui, verify TUI history navigation with prefix search

@github-actions github-actions bot added memory Persistence and memory channels User interface channels rust dependencies refactor size/XL labels Feb 19, 2026
Remove rustyline dependency entirely and implement line editing with
crossterm raw mode. Add prefix-based history search to both CLI and TUI
input, matching shell behavior where typing a prefix and pressing Up
filters history entries.

Key changes:
- New line_editor module with crossterm-based raw mode input
- InputHistory uses persist callback instead of direct SQLite access
- Remove sqlx dependency from zeph-channels (persistence via callback)
- TUI load_history now populates input_history for arrow navigation
- SqliteStore derives Clone for shared ownership in persist closures
@bug-ops bug-ops force-pushed the refactor/replace-rustyline-with-crossterm branch from b2072c9 to 9326390 Compare February 19, 2026 19:47
@bug-ops bug-ops enabled auto-merge (squash) February 19, 2026 19:55
@bug-ops bug-ops merged commit e3927e6 into main Feb 19, 2026
20 checks passed
@bug-ops bug-ops deleted the refactor/replace-rustyline-with-crossterm branch February 19, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels User interface channels dependencies memory Persistence and memory refactor rust size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant