Desktop Material

TUI repository and Git workflows

Repository entry

The repository rail supports:

Paths are expanded and resolved before use. A candidate must validate as a Git repository before repository panes bind to it. Clone and initialization use argv arrays and an explicit -- boundary where Git accepts one.

Changes and commits

Changes lists the actual worktree status. A user can select changed files, inspect a scrollable text diff, stage or unstage selected files, and discard only after a target-naming confirmation. Commit uses a real summary Input and multiline body TextArea, with amend and sign-off choices plus separate Commit and Commit & push buttons.

Diff controls provide bounded line/word/syntax modes and configurable context. Changed paths can appear as a safe directory tree. CSV and TSV receive semantic tables; Markdown renders a terminal-native, link-disabled preview; verified RGB/RGBA PNGs render exact before/after terminal color blocks from Git and worktree bytes. TGA and hardened SVG rendering remain explicitly unavailable. Hunk/line staging and the complete desktop undo/reordering experience remain partial in the parity contract.

History, branches, stashes, tags, and remotes

Worktree lock/move/rename/repair, provider-aware submodule add, the desktop three-step sparse-checkout guide, patch series, signing, Git LFS administration, and guided bisect remain outside this preview.

Network operations

Fetch, pull, and push are explicit actions in the toolbar and command palette. They run asynchronously so the UI can continue painting and accepting input. The process runner applies a 30-second default bound and a longer explicit network bound, disables stdin prompts at its boundary, captures bounded error text, and terminates the process group after timeout.

The TUI does not invent credentials. Git uses the user's configured credential helpers and SSH setup. A non-interactive failure is surfaced with the Git exit status and sanitized message; retry after repairing authentication or remote configuration.

The scriptable github git, github push, and github pull wrapper preserves native Git argv and adds Cheap LFS-aware push/pull phases without a confirmation flag. See Cheap LFS-aware Git CLI wrapper for its 100 MiB preflight, dry-run, materialization, and repeated-pull boundaries.

Destructive actions

Discard, branch deletion, stash drop, worktree removal, sparse-checkout changes, workflow cancellation, and clearing notification history use decision dialogs. The dialog identifies the target where available, defaults to a safe exit path, and permits cancel by keyboard or mouse. Tag mutation is not exposed, so no tag-deletion confirmation is claimed. Informational success, progress, and ordinary errors remain non-blocking notifications.

This boundary does not make every Git operation reversible. Users should review the active repository, branch, and selected row before confirming.

Concurrency and refresh

Textual worker groups prevent duplicate pane loads from racing each other. Mutation completion triggers a repository-wide refresh. Git operations still observe the repository's own lock rules: a command can fail if another Git client owns index.lock, a rebase/merge is in progress, or worktree state changes between review and execution.

The preview never removes .git/index.lock automatically. Determine which process owns it and whether an operation is active before attempting recovery.