feat(ui): Branches tab in the Repo box #110

Merged
deadstyle merged 8 commits from feature/105-branches-tab into develop 2026-10-09 14:48:42 -05:00
Owner

Summary

Part 2 of 3 of #98. The [6] Repo box's Branches tab now lists the repo's branches and shows the selected branch's recent commits. Read-only.

Changes

  • New optional forge.BranchReader capability (+ ActBranches), implemented by the Gitea/Forgejo and GitHub adapters and the fake/demo forge; domain.Branch and domain.Commit.
  • core.Service caches branches (sorted: default first, then newest commit) and commits per branch; core.Key gains Ref.
  • Branches tab: name, default marker, last commit subject and age, and #N when an open PR comes from that branch. j/k/gg/G move a cursor, the commit list below follows it, and o opens the branch in the browser.
  • docs/design.md, docs/architecture.md, docs/mockup.html updated.

Decisions

  • Decided: the open-PR marker is derived from the change requests the PR box already loaded (no per-branch call). A fork PR whose head branch has the same name can false-match; noted in architecture.md.
  • Decided: GitHub's branch list has no commit messages, so its adapter fetches details per branch (8 at a time, capped at 100 branches, default always kept).
  • Decided: no ahead/behind counts (the PM dropped them). Switching the Files tab's branch is #107.

Test plan

  • go test -race, golangci-lint (0 issues), format check, govulncheck: pass locally.
  • make check's install-script test needs shellcheck, absent on this machine; CI runs it.
  • Adapter calls are verified against fixtures only, not a live server.

Refs #105, #98

🤖 Generated with Claude Code

https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n

## Summary Part 2 of 3 of #98. The `[6]` Repo box's Branches tab now lists the repo's branches and shows the selected branch's recent commits. Read-only. ## Changes - New optional `forge.BranchReader` capability (+ `ActBranches`), implemented by the Gitea/Forgejo and GitHub adapters and the fake/demo forge; `domain.Branch` and `domain.Commit`. - `core.Service` caches branches (sorted: default first, then newest commit) and commits per branch; `core.Key` gains `Ref`. - Branches tab: name, `default` marker, last commit subject and age, and `#N` when an open PR comes from that branch. `j`/`k`/`gg`/`G` move a cursor, the commit list below follows it, and `o` opens the branch in the browser. - `docs/design.md`, `docs/architecture.md`, `docs/mockup.html` updated. ## Decisions - Decided: the open-PR marker is derived from the change requests the PR box already loaded (no per-branch call). A fork PR whose head branch has the same name can false-match; noted in architecture.md. - Decided: GitHub's branch list has no commit messages, so its adapter fetches details per branch (8 at a time, capped at 100 branches, default always kept). - Decided: no ahead/behind counts (the PM dropped them). Switching the Files tab's branch is #107. ## Test plan - `go test -race`, `golangci-lint` (0 issues), format check, govulncheck: pass locally. - `make check`'s install-script test needs `shellcheck`, absent on this machine; CI runs it. - Adapter calls are verified against fixtures only, not a live server. Refs #105, #98 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
Refs #105

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
test(branches): reconcile tests with the Branches implementation
All checks were successful
ci / check (pull_request) Successful in 1m38s
883bc064d5
Refs #105

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTN2GnGvYhWwPhsSDiWp8n
deadstyle merged commit 0d6576a3b0 into develop 2026-10-09 14:48:42 -05:00
deadstyle deleted branch feature/105-branches-tab 2026-10-09 14:48:42 -05:00
Sign in to join this conversation.
No description provided.