Skip to content

Playbooks for g

Story-style workflows—solo, team, and on-call. Jump into the full Use cases page anytime.

ui::diff_tui

Full-screen diff TUI viewer.

auto-generated This page is built from //! comments in the Rust source. Edit the source and run npm run docs:extract to update it.

Full-screen diff TUI viewer.

Componentized ratatui application for viewing diffs with syntax highlighting, multiple layouts (stack / split / side-by-side), and review comment support.

Module layout

diff_tui/
  mod.rs     <- this file: public entry point, event loop
  state.rs   <- AppState, DiffLayout, CommentEditor, and related types
  keys.rs    <- KeyFlow enum, handle_key() function
  draw.rs    <- All ratatui rendering functions

Usage

use crate::ui::diff_tui;

let files = diff::parse::parse(&raw_diff);
diff_tui::run(&files, &ctx, Some("abc123"))?;

Source: src/ui/diff_tui/mod.rs