Skip to content

Interactive TUI Inspector

symtrace tui is an interactive, full-terminal inspection workspace built with ratatui and crossterm. It allows developers to browse complex pull requests, analyze multi-file refactors, inspect transitive call graph blast radius, and review safety contract alerts with keyboard-driven navigation.

Terminal window
# Launch interactive TUI comparing working directory against HEAD
symtrace tui
# Launch TUI for specific commit range
symtrace tui . HEAD~1 HEAD
# Filter TUI view to specific path pattern
symtrace tui . HEAD~1 HEAD -p "src/**/*.rs"
  • Left Pane (Refactor Tree): Displays hierarchical file tree, modified symbols (MOVE, RENAME, MODIFY, INSERT, DELETE), confidence scores, and detected refactor patterns (extract_method, move_method, rename_variable).
  • Right Pane (AST Structural Diff): Renders the AST subtree comparison with color-coded node operations, line numbers, token similarity percentages, and inline contract alerts.

Select any modified symbol to view its structural call graph visualization:

  • Displays source function -> extracted function relationships.
  • Highlights cross-file relocation origins and destinations.
  • Traces downstream callers up to depth 5 with blast radius impact severity (LOW, MEDIUM, HIGH).
ShortcutAction
j / k or / Move selection up / down
h / l or / Collapse / expand directory tree node
TabSwitch focus between Refactor Tree and AST Diff pane
/Open symbol search bar
fCycle entity filter (All, Functions, Structs/Classes, Variables, Imports)
bToggle Downstream Call Graph Blast Radius view
rToggle between AST Semantic View and Raw Line Diff View
EscClear search / close modal
qExit TUI inspector

When symtrace detects multi-file refactors or impacted callers, the TUI highlights the exact semantic transformation:

┌─ Refactor Patterns & Downstream Blast Radius ──────────────────────────────┐
│ ▸ Extract Method (Confidence: 95%) │
│ Source: fn authenticate_user() [src/auth.rs:L42] │
│ Target: fn validate_token() [src/auth.rs:L110] │
│ │
│ ↔ Cross-File Move (Confidence: 100%) │
│ Entity: struct UserPayload │
│ From: src/types.rs:L15 │
│ To: src/models/user.rs:L4 │
│ │
│ ⚡ Downstream Callers Impacted: 2 [Severity: MEDIUM] │
│ ▸ Depth 1: fn execute_request (src/server.rs:L84) │
│ ▸ Depth 2: fn main_loop (src/main.rs:L12) │
└────────────────────────────────────────────────────────────────────────────┘

TUI color schemes and default layouts can be configured in .symtracerc or symtrace.toml:

[tui]
mouse_support = true
layout = "split" # "split", "single_tree", "single_diff"
theme = "dark" # "dark", "light", "high_contrast"
default_filter = "all" # "all", "functions", "types"