Skip to content

feat: add ratatui TUI with interactive process monitor (ISSUE-035)#57

Open
proboscis wants to merge 1 commit intomainfrom
issue/ISSUE-035/run-20260120-155046
Open

feat: add ratatui TUI with interactive process monitor (ISSUE-035)#57
proboscis wants to merge 1 commit intomainfrom
issue/ISSUE-035/run-20260120-155046

Conversation

@proboscis
Copy link
Owner

Summary

  • Implements Phase 1-3 of ISSUE-035: Ratatui TUI for enhanced CLI experience
  • Adds runbox monitor command for interactive process monitoring
  • Adds interactive log viewer with scrollback, search, and follow mode

Changes

New Dependencies (crates/runbox-cli/Cargo.toml)

  • ratatui 0.28 (terminal UI framework)
  • crossterm 0.28 (terminal backend)
  • tokio (async runtime for events)
  • futures, libc

New TUI Module (crates/runbox-cli/src/tui/)

  • mod.rs - Module exports
  • app.rs - Main application state and event loop
  • event.rs - Keyboard/tick event handling
  • ui.rs - Common UI components (colors, styles, helpers)
  • views/monitor.rs - Process monitor view
  • views/logs.rs - Log viewer view

New Command

  • runbox monitor [--tick-rate <secs>] - Interactive process monitor

Features Implemented

Process Monitor (runbox monitor)

  • Real-time process list with auto-refresh (configurable tick rate)
  • Keyboard navigation (j/k or arrows)
  • Color-coded status (green=running, blue=done, red=failed)
  • Actions on selected process:
    • Enter: View logs
    • s: Stop running process
    • a: Attach to tmux/zellij session
    • r: Manual refresh
    • q: Quit

Interactive Log Viewer

  • Scrollback with vim-style navigation (j/k, g/G, Page Up/Down)
  • Search with / (vim-style) with n/N for next/prev match
  • Follow mode (f) for auto-scroll to new content
  • Highlighted search matches

Testing

  • All existing tests pass
  • cargo build --package runbox-cli succeeds
  • cargo test --package runbox-cli passes
  • runbox monitor --help displays correct usage

Related Issue

ISSUE-035: Ratatui TUI for enhanced CLI experience

Future Phases (not in this PR)

  • Phase 4: Runnable browser (runbox list --tui)
  • Phase 5: Dashboard with split-pane layout

Implements Phase 1-3 of ISSUE-035:

- Add ratatui/crossterm/tokio dependencies for TUI infrastructure
- Create 'runbox monitor' command for interactive process monitoring
- Real-time auto-refresh with configurable tick rate (default: 2s)
- Keyboard navigation (j/k or arrows) through process list
- Enter to view logs, 's' to stop, 'a' to attach (tmux/zellij)
- Interactive log viewer with scrollback, search, and follow mode
- Color-coded status display (green=running, blue=done, red=failed)
- Graceful terminal cleanup on exit
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