Skip to content

feat(git): browse committed files in dashboard - #337

Merged
fcoury merged 1 commit into
mainfrom
fcoury/git-commit-dashboard
Aug 24, 2026
Merged

fcoury merged 1 commit into
mainfrom
fcoury/git-commit-dashboard

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Why

The Git log currently sends Show details into a separate text picker instead of the dashboard's existing file-and-diff interface. It also stores graph-decorated commit IDs such as * <sha> from git log --graph, so commit actions receive invalid revisions.

What changed

  • Replace Show details with Open as the first commit action and display the selected commit in the existing Git dashboard.
  • Add a read-only commit mode with changed-file rows, addition/deletion counts, rename origins, binary indicators, and the existing structured per-file diff viewer.
  • Parse NUL-delimited commit changes safely, preserve original paths across the native Git-core boundary, and compare merge commits against their first parent.
  • Keep normal staging, unstaging, discard, and commit shortcuts unavailable while inspecting history; q returns to the live working-tree dashboard.
  • Strip graph prefixes from stored commit IDs so existing cherry-pick, revert, branch, and tag actions also receive valid revisions.
  • Cover root commits, merge commits, added/modified/deleted/renamed/binary files, read-only behavior, working-tree restoration, and plugin-owned back actions.

How to Test

  1. Open Red in a repository with at least one existing commit and an uncommitted working-tree change.

  2. Press Space G, then l, select a commit, and choose the default Open action. Confirm the dashboard shows that commit's changed files, change indicators, and per-file addition/deletion counts.

  3. Move between modified, added, deleted, renamed, and binary files. Confirm textual files show their commit-specific structured diffs and renamed files retain their original paths.

  4. While viewing the commit, press staging/discard shortcuts such as s, u, and x; confirm the repository and index remain unchanged. Press q and confirm the original working-tree changes and normal actions return.

  5. Repeat with an initial commit and a merge commit; confirm initial files appear and merge changes are shown relative to the first parent.

  6. Run the focused automated coverage:

    cargo test -p red git_dashboard_ --lib -- --test-threads=1
    cargo run --all-features -p husk-cli -- test --locked plugins/git_core

Also verified the complete Git-focused Rust subset (54 tests), the workspace back-action regression, formatting, and cargo clippy --all-targets --all-features -- -D warnings.

@fcoury
fcoury merged commit 4cfc5ba into main Aug 24, 2026
12 checks passed
@fcoury
fcoury deleted the fcoury/git-commit-dashboard branch August 24, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants