Skip to content

Make Home/End jump to a selected branch's first and last changesets - #87

Merged
danipen merged 1 commit into
mainfrom
graph-branch-home-end
Jul 23, 2026
Merged

Make Home/End jump to a selected branch's first and last changesets#87
danipen merged 1 commit into
mainfrom
graph-branch-home-end

Conversation

@danipen

@danipen danipen commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

In the Graph tab, Home/End already jumped to the oldest/newest commit of the selected changeset's branch — but with a branch selected (its changes view open), the keys did nothing useful. Now they jump to the selected branch's first and last changesets, selecting that commit just like the changeset-selected path.

  • New pure helper branchEndpoint(layout, row, edge) in geometry.ts: walks the row's own chain (so a lane shared by two packed chains never leaks into the neighbor); an empty branch resolves both edges to its anchor commit.
  • GraphCanvas.tsx Home/End handler gains the branch-selected case; Home with nothing selected keeps its classic frame-the-home-changeset meaning.

Tests

  • Unit tests for branchEndpoint: normal branch, single-commit branch, two chains packing one lane, and the empty-branch anchor fallback.
  • lint, typecheck, bun test (836 pass) all green.
  • Verified visually via Playwright on an isolated instance: selecting the feature label then pressing End selects "feature commit 4", Home selects "feature commit 1".

🤖 Generated with Claude Code

@danipen
danipen merged commit ebbfcc6 into main Jul 23, 2026
9 checks passed
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