Skip to content

feat(updater): offer updates from main, not tagged releases - #238

Merged
gbradham merged 1 commit into
mainfrom
feat/update-from-main
Oct 30, 2026
Merged

gbradham merged 1 commit into
mainfrom
feat/update-from-main

Conversation

@gbradham

Copy link
Copy Markdown
Member

Why

The updater only looked at GitHub Releases, and the latest is still v1.0.0, so a checkout many commits behind main was told it was up to date. We ship from main rather than from tags.

What

  • Git checkout (what both installers make): at launch, GitHub's compare API reports how far main is ahead of the local HEAD. If it's ahead, the dialog says "N new changes on main since your copy", lists the newest commit titles, and offers Update now, which runs git pull --ff-only origin main.
  • If the pull can't fast-forward (local commits or a diverged branch), it refuses and shows git's error. The checkout is never left half-merged.
  • A pull that changes pyproject.toml or uv.lock tells the user to re-run the installer. It doesn't reinstall dependencies itself, because the installer's extras aren't recorded.
  • Prebuilt app (no .git): still checks Releases, as before.
  • A HEAD that GitHub doesn't know (an unpushed commit) gets a 404 from the compare API, so the check stays quiet.

Testing

  • New tests cover the compare parsing, the checkout/prebuilt dispatch, and pull_main against a local throwaway origin (fast-forward, dependency flag, refusing a diverged checkout).
  • test_updater.py and test_first_run.py pass (50 tests); ruff and black are clean.
  • Checked against the live API: a checkout at current main reports 0 behind, and e5fac47 reports 31 behind with the correct commit list.

A git checkout is now compared with GitHub's main branch at launch; if main
is ahead, the dialog lists the new commits and Update now runs
git pull --ff-only. A diverged or dirty checkout is refused, never merged.
A pull that changes pyproject.toml or uv.lock says to re-run the installer.
Prebuilt apps have no checkout and still check Releases.
@gbradham
gbradham merged commit 9b03e55 into main Oct 30, 2026
4 checks passed
@gbradham
gbradham deleted the feat/update-from-main branch October 30, 2026 17:59
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