Skip to content

feat(web): head branch dropdown in branch view - #36

Merged
imfing merged 1 commit into
mainfrom
feat/head-branch-switcher
Oct 6, 2026
Merged

imfing merged 1 commit into
mainfrom
feat/head-branch-switcher

Conversation

@imfing

@imfing imfing commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • The /branch toolbar now shows a head switcher next to the base switcher ([base ▾] ← [⑂ head ▾]), so you can change the reviewed branch from the UI (follow-up to feat(branch): compare two branches without checking either out #35)
  • Picking the checked-out branch drops head=, returning to working-tree mode so dirty=1 keeps working
  • Picking any other branch drops dirty, which only applies to the checked-out branch (the server rejects head + dirty)
  • Switching base keeps the selected head
  • Base and head share one BranchSwitcher component (replaces BaseBranchSwitcher); the local view (/local) still shows the static branch chip
  • One file changed: DiffToolbar.tsx (+37/−23)

Test plan

  • oxlint, oxfmt, tsc + vite build
  • Playwright (Chrome) against a local server on a scratch repo (main, feature, dirty other checked out):
    • head menu from base=main&head=feature: feature → head=feature, main → head=main, other → /branch?base=main; clicking other navigates there
    • base menu keeps head=feature
    • head menu from base=main&dirty=1: other keeps dirty=1, other branches drop it

The branch toolbar now shows a head switcher next to the base switcher
(base ← head). Picking the checked-out branch drops head= so dirty mode
keeps working; picking another branch drops dirty, which only applies to
the checked-out branch. Both share one BranchSwitcher component.
@imfing
imfing marked this pull request as ready for review October 6, 2026 21:55
@imfing
imfing merged commit c08ab65 into main Oct 6, 2026
8 checks passed
@imfing
imfing deleted the feat/head-branch-switcher branch October 6, 2026 22:04
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