Add a repository-wide commit graph - #384
Open
0x92 wants to merge 5 commits 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.
parsakhaz
force-pushed
the
feature/commit-graph
branch
from
August 23, 2026 19:19
e917683 to
d157fd1
Compare
parsakhaz
requested changes
Aug 23, 2026
parsakhaz
left a comment
Member
There was a problem hiding this comment.
Verdict: Request changes — the rebased feature has a compile failure and two last-mile navigation/state defects.
Counts: Must Fix: 3 (security: 0) · Should Fix: 1 · pass 1/1
Must Fix
- MF-1 — The new project graph handler references
databaseServicewithout taking it fromservices·main/src/ipc/git.ts:475· add it to the handler’s service destructuring · violates the PR checklist claim thatpnpm typecheckpasses.- Evidence:
pnpm typecheckfails withTS2304: Cannot find name 'databaseService', followed by inferred-type errors at lines 478-490. - Failure scenario: The main process cannot compile, so the PR cannot build or ship.
- Evidence:
- MF-2 — The commit graph is absent from the compact sidebar ·
frontend/src/components/Sidebar.tsx:619· add a compact-rail graph control and active state for each repository · violates the PR’s stated navigation requirement that a newActiveViewhas an entry in both sidebar components.- Evidence: The diff adds
navigateToGitGraphonly toProjectSessionList; the compact repository rail still exposes onlynavigateToProjectatSidebar.tsx:637. - Failure scenario: A user with the sidebar collapsed cannot open the feature from that navigation surface.
- Evidence: The diff adds
- MF-3 — Repository-scoped graph state survives a project change, and a focus ref is accepted without proving it exists ·
frontend/src/components/SessionView.tsx:1621,main/src/services/gitGraphManager.ts:149· remount/reset graph state by project and ignore unresolved focus refs beforegit log· violates the project-scoped graph and focus-history intent.- Evidence:
GitGraphViewstoresselectedHash,remoteScope, andfocusRefin component state, butSessionViewreuses the same component instance when onlyprojectIdchanges. The backend checks only ref syntax before interpolating it intogit log; it does not perform the shared type’s documented repository-existence check. - Failure scenario: Opening repository B after focusing a branch in repository A can run
git log <A-only-ref>in B and replace the graph with an error. Without focus, the old selected hash remains and B’s detail pane stays empty.
- Evidence:
Should Fix
- SF-1 — Worktree matching lowercases paths on every platform ·
main/src/ipc/git.ts:63· only case-fold on Windows.- Evidence: POSIX filesystems may contain distinct
/repo/Fooand/repo/foopaths, but both normalize to the same map key.
- Evidence: POSIX filesystems may contain distinct
Praise
- The new command surfaces constrain commit hashes, remote names, and focus-ref characters before composing git commands, and the manager tests exercise shell-metacharacter rejection.
⚠️ Cannot verify
- The repository-local role file required by the code-reviewer skill is absent at
.claude/agents/code-reviewer.md; this pass used the canonical user-level role file at~/.claude/agents/code-reviewer.mdwith the required report format.
Checks run: git diff --check origin/main...HEAD passed; frontend Vitest passed 285/285; main Vitest passed 651/651; frontend typecheck passed; root typecheck failed on MF-1.
parsakhaz
approved these changes
Aug 23, 2026
parsakhaz
left a comment
Member
There was a problem hiding this comment.
All three Must-Fix findings are resolved. Root typecheck and lint pass, graph and registry tests pass, and the new commit-graph Playwright journey passes on the pushed head.
Member
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.Automated UI QA
Status: passed on
b0adf343with synthetic repository/commit fixtures.tests/commit-graph.spec.ts: 1/1 passed.pnpm typecheckandpnpm lint: passed.Remaining human check: visual judgment with a large real repository and many concurrent lanes.