Skip to content

Commit e229777

Browse files
committed
Add interactive TUI mode for git-stack status
Implement fullscreen TUI for branch navigation using ratatui/crossterm. Users can now run `git stack status -i` to interactively browse the branch tree and checkout branches with Enter. Key changes: - Extract shared rendering infrastructure into src/render/ module - colors.rs: ThemeColor type with unified color constants - tree_data.rs: RenderableBranch/RenderableTree for flattened tree data - cli.rs: CLI rendering using the shared data types - Add TUI implementation in src/tui/ module - input.rs: Keyboard handling (j/k, arrows, Enter, q/Esc) - app.rs: App state, cursor navigation, ratatui rendering - Add -i/--interactive flag to status command - Route to TUI or CLI based on flag, checkout branch on selection Navigation: j/↓ down, k/↑ up, Enter checkout, q/Esc quit
1 parent 0215299 commit e229777

File tree

10 files changed

+2200
-554
lines changed

10 files changed

+2200
-554
lines changed

Cargo.lock

Lines changed: 1072 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ anyhow = { version = "1.0.98", features = ["backtrace"] }
1515
chrono = "0.4.41"
1616
clap = { version = "4.5.37", features = ["derive"] }
1717
colored = "3.0.0"
18+
crossterm = "0.29.0"
1819
git2 = "0.20"
1920
indicatif = "0.18.3"
2021
md5 = "0.8.0"
2122
rand = "0.9.2"
23+
ratatui = "0.30.0"
2224
serde = { version = "1.0.219", features = ["derive"] }
2325
serde_json = "1.0"
2426
serde_yaml = "0.9.34"

0 commit comments

Comments
 (0)