Harden Sparkle release notes for dark mode and guard changelog output - #918
Harden Sparkle release notes for dark mode and guard changelog output#918ericgriffin wants to merge 2 commits into
Conversation
Add a color-scheme meta tag and :root declaration to the generated release-notes page so WKWebView versions that require an explicit opt-in match the prefers-color-scheme dark block, and so WebKit's UA defaults track the active appearance in Sparkle's transparent web view. The dark-mode readability bug reported against the 1.7.2.4977 update dialog turned out to be an appcast item generated before the issue #849 template fix; the HTML baked into published appcast items never picks up later template changes. This change hardens the template for older WebKits and documents the opt-in with regression tests.
The Sparkle/appcast notes path (generate_changelog.sh --notes-only) had no test guarding against progress lines leaking into the published notes body; the v1.7.2.4977 appcast shipped with "Changelog: ..." and "Found 82 commit(s) ..." as its opening lines. The leak itself was fixed in 69c7918 by redirecting progress to stderr; this locks the behavior in with a test wired into CI's script-test job.
There was a problem hiding this comment.
Pull request overview
This pull request hardens the Sparkle/WinSparkle release-notes generation pipeline to prevent unreadable dark-mode release notes and to ensure generate_changelog.sh --notes-only does not leak progress output into the published release-notes body.
Changes:
- Opt into dark mode explicitly in
generate_release_notes_html.shby declaringcolor-scheme: light darkboth via meta tag and:rootCSS. - Add a temp-repo regression test to ensure
generate_changelog.sh --notes-onlyemits only the notes to stdout and keeps progress output on stderr. - Wire the new changelog test into the CI “script-test” job.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/release/generate_changelog_test.sh | Adds regression coverage for --notes-only stdout/stderr separation to prevent release-notes pollution. |
| scripts/generate_release_notes_html.sh | Declares color-scheme: light dark (meta + :root) to improve dark-mode behavior in embedded web views. |
| scripts/generate_release_notes_html_test.sh | Extends tests to assert both color-scheme declarations are present in generated HTML. |
| .github/workflows/ci.yaml | Runs the new changelog generator test in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
📦 Build artifacts for this PR · commit
Artifacts expire in 7 days. Downloading requires being signed in to GitHub. macOS needs two extractions: unzip the downloaded artifact, then unzip the Updated automatically on each push. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Follow-ups from investigating the unreadable dark-mode release notes in the v1.7.2.4977 update dialog.
The root cause was not a template bug in main: the appcast item for 1.7.2.4977 was generated on Aug 3, two days before the #849 dark-mode CSS fix merged, and release-notes HTML is frozen into each appcast item at build time. The published stable
appcast.xmlstill serves that pre-fix HTML, which needs a release-asset update (separate from this PR). This PR hardens the pipeline so both classes of regression stay fixed:color-scheme: light dark(meta tag +:rootCSS) ingenerate_release_notes_html.sh. Verified in a WKWebView harness replicating Sparkle's setup (_setDrawsBackground:NO, dark-appearance window) that current macOS matchesprefers-color-scheme: darkeither way; the declaration is defense-in-depth for WKWebView versions that require the opt-in, and keeps WebKit UA defaults consistent with the active appearance.generate_changelog.sh --notes-only: progress lines ("Changelog: ...", "Found N commit(s) ...") must stay on stderr. The leak was fixed in 69c7918 but the Sparkle/appcast path had no test; 1.7.2.4977 shipped those lines as the opening of its release notes. Wired into CI's script-test job.Testing
./scripts/generate_release_notes_html_test.sh(new assertions for both color-scheme declarations)./scripts/release/generate_changelog_test.sh(new; temp-repo based)./scripts/release/beta_release_notes_test.sh,./scripts/generate_appcast_beta_test.shstill pass