Skip to content

Add a repository-wide commit graph - #384

Open
0x92 wants to merge 1 commit into
dcouple:mainfrom
0x92:feature/commit-graph
Open

Add a repository-wide commit graph#384
0x92 wants to merge 1 commit into
dcouple:mainfrom
0x92:feature/commit-graph

Conversation

@0x92

@0x92 0x92 commented Aug 11, 2026

Copy link
Copy Markdown

Description

Pane could show a session's own commits, but never the repository as a whole —
which branch a session came from, what is on main, where a tag sits. This adds a
project-scoped graph of every branch and tag, with Pane's own worktrees marked.

  • Lane diagram solved client-side from a flat commit list, so the layout is
    unit-testable and independent of git log --graph ASCII art
  • Branch starts, joins and crossing lanes are distinct edge kinds; merges are
    drawn hollow
  • Filter by subject, author, hash or ref; focus one branch's history; arrow keys,
    / and Escape to navigate
  • Pane worktrees, uncommitted work and ahead/behind counts tie the graph back to
    the sessions
  • Selecting a commit loads its full patch into the same DiffViewer the diff
    panel uses

The remote scope defaults to the repository's own remote rather than --all: a
fork's clone carries origin and upstream, and those are two different
repositories on the hosting side.

Type of Change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have run pnpm typecheck and pnpm lint locally
  • I have tested the Electron app locally with pnpm electron-dev
  • I have added tests that prove my fix is effective or that my feature works

Critical Areas Modified

  • State management/IPC events (projects:get-git-graph,
    projects:get-commit-detail, both through the shared registry)

Screenshots (if applicable)

image

Additional Notes

Tests: layout solver (13), graph manager and ref parsing (28), including
remote-scope resolution and rejection of ref names that could reach a shell.

frontend/src/utils/parseUnifiedDiff.ts also appears in the "commit file
details" PR — same file, same content, needed by both. Whichever merges first,
the other should merge cleanly.

These four feature PRs are independent but all add an entry to the same
navigation plumbing (navigationStore's ActiveView, the two sidebar
components, preload.ts, api.ts, electron.d.ts). Whichever lands first,
the others need a small rebase there — no logic overlaps.

Not done: the packaged-build check from CONTRIBUTING. I develop on Windows,
so pnpm build:mac was not run.

Pane could show a session's own commits, but never the repository as a
whole — which branch a session came from, what is on main, where a tag
sits. This adds a project-scoped graph view of every branch and tag, with
Pane's own worktrees marked.

- Lane diagram solved client-side from a flat commit list, so the layout is
  unit-testable and independent of `git log --graph` ASCII art
- Branch starts, joins and crossing lanes are distinct edge kinds; merges
  are drawn hollow
- Filter by subject, author, hash or ref; focus one branch's history;
  arrow keys, `/` and Escape to navigate
- Pane worktrees, uncommitted work and ahead/behind counts tie the graph
  back to the sessions
- Remote scope defaults to the repo's own remote: `--all` mixes a fork's
  `upstream` branches into what should be one project's history

Commit selection loads the full patch into the same DiffViewer the diff
panel uses.

Tests: layout solver (13), graph manager and ref parsing (28), including
remote-scope resolution and rejection of ref names that could reach a shell.
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.

1 participant