Add a repository-wide commit graph - #384
Open
0x92 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
unit-testable and independent of
git log --graphASCII artdrawn hollow
/and Escape to navigatethe sessions
DiffViewerthe diffpanel uses
The remote scope defaults to the repository's own remote rather than
--all: afork's clone carries
originandupstream, and those are two differentrepositories on the hosting side.
Type of Change
Checklist
pnpm typecheckandpnpm lintlocallypnpm electron-devCritical Areas Modified
projects:get-git-graph,projects:get-commit-detail, both through the shared registry)Screenshots (if applicable)
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.tsalso appears in the "commit filedetails" 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'sActiveView, the two sidebarcomponents,
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:macwas not run.