Skip to content

Harden Sparkle release notes for dark mode and guard changelog output - #918

Open
ericgriffin wants to merge 2 commits into
mainfrom
fix/release-notes-color-scheme
Open

Harden Sparkle release notes for dark mode and guard changelog output#918
ericgriffin wants to merge 2 commits into
mainfrom
fix/release-notes-color-scheme

Conversation

@ericgriffin

Copy link
Copy Markdown
Member

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.xml still 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:

  • Declare color-scheme: light dark (meta tag + :root CSS) in generate_release_notes_html.sh. Verified in a WKWebView harness replicating Sparkle's setup (_setDrawsBackground:NO, dark-appearance window) that current macOS matches prefers-color-scheme: dark either 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.
  • Add a regression test for 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.sh still pass
  • WKWebView harness: generated HTML renders light-on-dark in dark windows, dark-on-light in light windows, and tracks live theme flips

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh by declaring color-scheme: light dark both via meta tag and :root CSS.
  • Add a temp-repo regression test to ensure generate_changelog.sh --notes-only emits 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.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

📦 Build artifacts for this PR · commit e296c2b

Platform Download
Android (APK) android-apk
macOS macos-build
Windows windows-build
Linux linux-build

Artifacts expire in 7 days. Downloading requires being signed in to GitHub. macOS needs two extractions: unzip the downloaded artifact, then unzip the submersion-macos.zip inside it to get a runnable submersion.app. The build is ad-hoc signed — right-click → Open on first launch.

Updated automatically on each push.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants