Skip to content

Point sparkle:releaseNotesLink at the landing /release-notes/{tag} route#233

Merged
FuJacob merged 3 commits into
mainfrom
feat/appcast-release-notes-url
May 25, 2026
Merged

Point sparkle:releaseNotesLink at the landing /release-notes/{tag} route#233
FuJacob merged 3 commits into
mainfrom
feat/appcast-release-notes-url

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 25, 2026

Summary

Replaces the hard-coded GitHub release-tag URL inside scripts/generate_appcast.py with a configurable --release-notes-base-url flag (default https://cotabby.app/release-notes). Sparkle's WKWebView will now load a slim self-contained HTML page sized for its alert window instead of GitHub's full release page chrome.

Coordinates with the landing-site PR FuJacob/tabby-landing#2 which adds the /release-notes/[tag] Route Handler that serves that page.

Validation

python3 -c "import py_compile; py_compile.compile('scripts/generate_appcast.py', doraise=True)"
# syntax: OK

python3 scripts/generate_appcast.py --help
# new --release-notes-base-url flag appears with the documented default

python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"
# release.yml: valid YAML

# Manual render smoke test (mocking the sign step):
#   release_page_url -> https://cotabby.app/release-notes/v1.6.0
#   <sparkle:releaseNotesLink>https://cotabby.app/release-notes/v1.6.0</sparkle:releaseNotesLink>

This PR deliberately does not cut a release tag. The change goes live when someone publishes the next tag.

Linked issues

Companion: FuJacob/tabby-landing#2 (landing Route Handler)

Risk / rollout notes

  • Landing PR must deploy first. If this lands and a release tag is cut before the landing PR is live on https://cotabby.app/release-notes/[tag], Sparkle will fetch a 404 for the duration. Order: land + deploy landing, smoke-test the URL in a normal browser, then land this PR.
  • Already-shipped builds are unaffected. Their appcasts are static XML files frozen at the time of their release; only future appcasts see the new URL.
  • The base URL is exposed as a CLI flag rather than a constant so future environments (staging, fork, vendor mirror) can override without editing the script.
  • Trailing slash on the base URL is normalized via rstrip("/"), so both https://cotabby.app/release-notes and https://cotabby.app/release-notes/ work.
  • No Swift / Info.plist / Sparkle SDK changes. AppUpdateManager, signing pipeline, and appcast hosting all untouched.

Greptile Summary

This PR redirects Sparkle's sparkle:releaseNotesLink from the GitHub release page to a dedicated slim HTML route on the cotabby.app landing site, making the update alert's embedded WKWebView render a page sized for the small alert window rather than GitHub's full page chrome.

  • scripts/generate_appcast.py: Adds DEFAULT_RELEASE_NOTES_BASE_URL constant and a --release-notes-base-url CLI flag; release_page_url is now assembled from this base + the release tag, with rstrip("/") normalization to handle trailing slashes.
  • .github/workflows/release.yml: No flag is passed to the script (relying on the default), with an inline comment documenting the intentional omission and explaining when the override should be used.

Confidence Score: 5/5

Safe to merge once the companion landing-site PR is deployed; the script change itself is correct and self-contained.

The change is small and focused: it replaces one hard-coded GitHub URL with a configurable constant, adds trailing-slash normalization, and documents the intentional omission of the flag in CI. The previous review concern about duplicate URL values has been addressed by removing the flag from the workflow entirely. No logic errors, schema changes, or security implications were found.

No files require special attention. The deployment-ordering risk (landing site must go live before the next release tag is cut) is documented in the PR description rather than in code.

Important Files Changed

Filename Overview
scripts/generate_appcast.py Adds DEFAULT_RELEASE_NOTES_BASE_URL constant and --release-notes-base-url CLI flag; correctly assembles the release notes URL with trailing-slash normalization. No logic issues found.
.github/workflows/release.yml Adds a comment explaining that --release-notes-base-url is intentionally omitted so the script's constant stays the single source of truth. Addresses the previous review concern cleanly.

Sequence Diagram

sequenceDiagram
    participant CI as GitHub Actions
    participant Script as generate_appcast.py
    participant XML as appcast.xml
    participant Sparkle as Sparkle (WKWebView)
    participant Landing as cotabby.app/release-notes

    CI->>Script: python3 generate_appcast.py (no --release-notes-base-url flag)
    Script->>Script: "release_notes_base = DEFAULT_RELEASE_NOTES_BASE_URL.rstrip("/")"
    Script->>Script: "release_page_url = "{base}/v{release_version}""
    Script->>XML: "render appcast.xml with sparkle:releaseNotesLink = https://cotabby.app/release-notes/vX.Y.Z"
    XML-->>CI: build/appcast.xml uploaded

    Note over Sparkle,Landing: At update-check time
    Sparkle->>Landing: GET /release-notes/vX.Y.Z
    Landing-->>Sparkle: Slim self-contained HTML page
Loading

Reviews (2): Last reviewed commit: "Merge main; drop redundant --release-not..." | Re-trigger Greptile

Today the appcast generator hard-codes the GitHub release-tag URL into
sparkle:releaseNotesLink, which means Sparkle's WKWebView shows GitHub's
full page chrome in a tiny alert window. The landing site now hosts a
slim, self-contained Route Handler at /release-notes/[tag] that returns
one release as plain HTML sized for Sparkle's alert.

This swaps the URL behind a new --release-notes-base-url flag (default
https://cotabby.app/release-notes) so the value stays configurable per
environment instead of being baked into the script. The release workflow
passes the production value explicitly.

No effect until a new release tag is cut. Already-shipped builds have
static appcasts and continue pointing at GitHub.
Comment thread .github/workflows/release.yml Outdated
FuJacob added 2 commits May 25, 2026 04:02
…orkflow

Resolve Greptile drift concern by relying on the script's
DEFAULT_RELEASE_NOTES_BASE_URL as the single source of truth. The flag
remains available for fork/staging overrides.
@FuJacob FuJacob merged commit 561f39e into main May 25, 2026
3 checks passed
@FuJacob FuJacob deleted the feat/appcast-release-notes-url branch May 25, 2026 12:13
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