Ratatui based terminal version of the app #37

Closed
opened 2026-07-31 15:32:06 +00:00 by hugo · 1 comment
Owner

Implement a terminal variant for the app with a ratatui based tui. It should have feature parity with the app and be optimized to run in terminals and multiplexers. Navigation should be inspired by mutt.

The TUI should provide the same paned view as the iPhone app, just with a TUI structure to it, with ways to switch panes with numbers, use vi movement keys to scroll up and down, have a current selection shown so enter goes there, backspace as the "back" key. Edit panes should support proper editing with tab switching between different fields and backspace in edit fields of course deleting the character left to the cursor and not going back in navigation (like outside editors).

Any open overview panel should automatically reload based on a preference setting with a 5 second default. Auto-reload should never interrupt editing and must not conflict with user scrolling.

The tui must support running in herdr and support mouse interactions on its elements - like panes or elements in scrollable and touchable lists. Also scrolling should react to the scroll wheel in panes that have scrollable content.

The tui should be its own crate gotcha-tui, be its own executable and should only carry the TUI management code, in a similar style to the iPhone app. common code should move into the gotcha_gitea crate so that the iPhone app and the TUI app use the same code there. The current iPhone app is the model for what to build for the TUI, though.

Implement a terminal variant for the app with a ratatui based tui. It should have feature parity with the app and be optimized to run in terminals and multiplexers. Navigation should be inspired by mutt. The TUI should provide the same paned view as the iPhone app, just with a TUI structure to it, with ways to switch panes with numbers, use vi movement keys to scroll up and down, have a current selection shown so enter goes there, backspace as the "back" key. Edit panes should support proper editing with tab switching between different fields and backspace in edit fields of course deleting the character left to the cursor and not going back in navigation (like outside editors). Any open overview panel should automatically reload based on a preference setting with a 5 second default. Auto-reload should never interrupt editing and must not conflict with user scrolling. The tui must support running in herdr and support mouse interactions on its elements - like panes or elements in scrollable and touchable lists. Also scrolling should react to the scroll wheel in panes that have scrollable content. The tui should be its own crate gotcha-tui, be its own executable and should only carry the TUI management code, in a similar style to the iPhone app. common code should move into the gotcha_gitea crate so that the iPhone app and the TUI app use the same code there. The current iPhone app is the model for what to build for the TUI, though.
hugo added this to the enhancement release "Kanban-Style" milestone 2026-07-31 15:32:06 +00:00
hugo added the enhancement label 2026-07-31 15:32:06 +00:00
hugo modified the milestone from enhancement release "Kanban-Style" to first feature complete release 2026-08-03 18:34:57 +00:00
Author
Owner

Implemented in 2534010.

  • Added the standalone gotcha-tui Ratatui/Crossterm crate and executable with responsive paned layouts for normal terminals and multiplexer panes.
  • Mirrored the iPhone app's Home, Issues, Repositories, Pull Requests, and Milestones flows, including filters, favorites, branches/all-branch history, paginated activity and lists, files, commit/pull diffs, issue comments, and issue/milestone mutations with destructive confirmations.
  • Added mutt/vi keyboard navigation, numbered pane switching, Backspace history, full Unicode field editing with Tab/Shift-Tab and Ctrl-S, mouse pane/list selection, double-click opening, and wheel scrolling/page traversal.
  • Moved the CLI YAML profile implementation into gotcha_gitea; the CLI and TUI now use the same ~/.config/gotcha/config. TUI add/edit/delete writes that shared config transactionally, preserves blank tokens on edit, and validates credentials/provider discovery before saving.
  • Added persistent per-pane favorites and the configurable overview refresh interval (five seconds by default, zero disables). Refresh pauses during editing/confirmation and after input, and preserves the selected item.
  • Kept all server behavior on the repository's existing gotcha_gitea::Client operations and pinned Gitea 1.25-compatible generated client; the TUI has no raw or newer-endpoint dependency.
  • Updated README and TESTING.md.

Verification:

  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (39 tests passed)
  • Live PTY against git.rfc1437.de: Home/repository/issue navigation, five panes, narrow stacked layout, selection-preserving auto-refresh, Unicode Backspace in an issue editor, Tab field movement, Esc cancellation, and clean terminal restoration.
  • Both configured CLI profiles were visible to the TUI; shared profile add/edit/delete, rename/favorite migration, default refresh, and persistence are covered by the temporary-config test without modifying real credentials.
  • Built gotcha and gotcha-tui in release mode and installed both in ~/.local/bin; verified the installed TUI help and CLI profile list from PATH.

Per request, no iPhone release build or deployment was performed for this separate TUI issue.

Implemented in `2534010`. - Added the standalone `gotcha-tui` Ratatui/Crossterm crate and executable with responsive paned layouts for normal terminals and multiplexer panes. - Mirrored the iPhone app's Home, Issues, Repositories, Pull Requests, and Milestones flows, including filters, favorites, branches/all-branch history, paginated activity and lists, files, commit/pull diffs, issue comments, and issue/milestone mutations with destructive confirmations. - Added mutt/vi keyboard navigation, numbered pane switching, Backspace history, full Unicode field editing with Tab/Shift-Tab and Ctrl-S, mouse pane/list selection, double-click opening, and wheel scrolling/page traversal. - Moved the CLI YAML profile implementation into `gotcha_gitea`; the CLI and TUI now use the same `~/.config/gotcha/config`. TUI add/edit/delete writes that shared config transactionally, preserves blank tokens on edit, and validates credentials/provider discovery before saving. - Added persistent per-pane favorites and the configurable overview refresh interval (five seconds by default, zero disables). Refresh pauses during editing/confirmation and after input, and preserves the selected item. - Kept all server behavior on the repository's existing `gotcha_gitea::Client` operations and pinned Gitea 1.25-compatible generated client; the TUI has no raw or newer-endpoint dependency. - Updated README and TESTING.md. Verification: - `cargo fmt --all -- --check` - `RUSTFLAGS="-D warnings" cargo check --workspace --all-targets` - `cargo clippy --workspace --all-targets -- -D warnings` - `cargo test --workspace` (39 tests passed) - Live PTY against `git.rfc1437.de`: Home/repository/issue navigation, five panes, narrow stacked layout, selection-preserving auto-refresh, Unicode Backspace in an issue editor, Tab field movement, Esc cancellation, and clean terminal restoration. - Both configured CLI profiles were visible to the TUI; shared profile add/edit/delete, rename/favorite migration, default refresh, and persistence are covered by the temporary-config test without modifying real credentials. - Built `gotcha` and `gotcha-tui` in release mode and installed both in `~/.local/bin`; verified the installed TUI help and CLI profile list from PATH. Per request, no iPhone release build or deployment was performed for this separate TUI issue.
hugo closed this issue 2026-08-03 19:16:27 +00:00
Sign in to join this conversation.