Skip to content

fix(ios): pin a GitHub vault to the branch it was opened on#164

Merged
oratis merged 1 commit into
mainfrom
ux/ios-github-vault-pin-branch
Jun 14, 2026
Merged

fix(ios): pin a GitHub vault to the branch it was opened on#164
oratis merged 1 commit into
mainfrom
ux/ios-github-vault-pin-branch

Conversation

@oratis

@oratis oratis commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Correctness fix from the review backlog.

Bug

Opening a repo without an explicit ref (bare owner/repo) stored the original nil ref in the manifest, so every refresh re-resolved to the repo's current default branch. If the owner later changed the default (maindevelop), "Refresh from GitHub" silently pulled a different branch into the existing vault.

Fix

The manifest is now pinned to the resolved branch name captured at the initial open, so refreshes always follow the branch you actually opened. The vault directory stays keyed by the original link (dedupe/open still resolve to the same folder); the only visible change is the slug now reads owner/repo@<branch> — which is also more informative.

resolveCommit already returns the resolved branch name, so this is a one-spot change at manifest-write time.

Verify

App simulator build ✓.

🤖 Generated with Claude Code

When a repo was opened without an explicit ref (e.g. bare owner/repo), the
manifest stored the original nil ref, so each refresh re-resolved to whatever
the repo's *current* default branch is. If the owner changed the default branch
(main → develop), a later "Refresh from GitHub" would silently pull a different
branch into the vault.

Now the manifest is pinned to the *resolved* branch name from the initial open,
so refreshes always follow the branch you actually opened. The vault directory
is still keyed by the original link, so dedupe/open resolve to the same folder;
the only visible change is the slug now reads owner/repo@<branch>.

app simulator build ✓.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 6f0d45b into main Jun 14, 2026
4 checks passed
@oratis oratis deleted the ux/ios-github-vault-pin-branch branch June 14, 2026 06:43
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