add a git pane to the chat / a2ui / stats pill #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
there needs to be a git pane between a2ui and stats that when opened shows the current state of the worktree. It uses gix / gitoxide to give an overview of added files, changed files and deleted files and on click on the file name opens a modal that shows the actual diff in a typical colored diff view.
the diff can be shown in 1-column (adds and deletes combined) or two-column (old-version vs new-version with respective coloring).
at the bottom of the git view are icon buttons to stage / unstage selected files, to commit staged changes or selected files (if some files are selected) or all changes (if nothing is staged and nothing is selected, a confirmation dialog comes to ask for "commit all changes"). there is a text field for the commit message.
also there are icon buttons to fetch from origin, pull from origin and push to orign.
Implemented in
b9933ae. Added the Git pane between A2UI and Stats with gitoxide-backed repository discovery and merged HEAD/index/worktree status, including added, changed, deleted, staged, and unstaged states plus periodic refresh. File rows support project-scoped selection and open a modal with complete staged/worktree diff sections, colored additions/deletions, line numbers, and unified or aligned side-by-side layouts. Bottom icon actions stage or unstage the applicable selected paths, commit selected files without consuming unrelated staged changes, commit the staged set when nothing is selected, or require explicit confirmation before staging and committing all changes. Fetch, current-branch pull, and current-branch push target origin, run off the UI thread with prompt-safe authentication behavior, and surface Git, hook, authentication, and conflict errors. Git mutations and branch switching are guarded against active chats or overlapping Git jobs; selections and caches follow project changes and agent-completed worktree updates. Added user documentation and isolated tests covering gitoxide status (including forced untracked visibility), staged/worktree diffs, split alignment, stage/unstage in normal and unborn repositories, selected-commit isolation, and local-origin fetch/pull/push. DS4 has no corresponding UI, so this is a new DS4Server feature and does not change inference, token/context accounting, or KV-cache behavior. Verified with cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, make bundle, and cargo test --all-features (131 passed, 12 hardware-fixture tests ignored).Follow-up UI correction shipped in
9d58f79. Replaced the fill-height vertical rule in the Git action row with horizontal spacing, so the control panel stays compact instead of consuming half the window. Verified visually in the rebuilt app at 1120x720, then passed cargo fmt, Clippy with warnings denied, make bundle, and all-feature tests (131 passed, 12 ignored).