Skip to content

Lite: carry over PR draft, reviewed files, and some UI state when renaming a branch - #15991

Draft
cbjeukendrup wants to merge 4 commits into
gitbutlerapp:masterfrom
cbjeukendrup:lite-rename-keeps-branch-state
Draft

cbjeukendrup wants to merge 4 commits into
gitbutlerapp:masterfrom
cbjeukendrup:lite-rename-keeps-branch-state

Conversation

@cbjeukendrup

Copy link
Copy Markdown
Contributor

And also try to do so when a branch is renamed outside the app.

See commit messages for details.

cbjeukendrup and others added 4 commits September 22, 2026 14:03
The draft was moved after the rename's workspace update, by which point
the PR form for the new branch name had already mounted, found no draft,
and seeded its fields empty. Move it before the caches learn the new name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The selected Diff/Pull request tab, expanded remote legs, unfolded
branches in the branches list and reviewed-file marks were all keyed by
the branch's name or ref and left behind under the old one on rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
applyBranchRename carries the PR draft, reviewed files, Redux state and URL
params over to a branch's new name. The stored moves now run as the new
name's query, so a view mounting under the new name waits for the moved
data and the caller no longer has to order the moves before the cache
update. This prepares for applying renames detected outside Lite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The reconciler already detected a rename of the selected branch between
workspace snapshots, but only remapped the URL. It now detects renames of
every applied branch and applies them with applyBranchRename, so renames
made with the CLI keep the PR draft, reviewed files, tab and fold state too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cbjeukendrup
cbjeukendrup force-pushed the lite-rename-keeps-branch-state branch from cb15a7b to c8887e8 Compare September 22, 2026 12:16
@cbjeukendrup
cbjeukendrup marked this pull request as draft September 22, 2026 12:53

This branch has not been deployed

No deployments
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