Skip to content

fix(sparkle): Fix Settings update button and improve release notes formatting#95

Merged
eyelock merged 1 commit into
mainfrom
fix/phase-7-sparkle-settings-button
Jan 28, 2026
Merged

fix(sparkle): Fix Settings update button and improve release notes formatting#95
eyelock merged 1 commit into
mainfrom
fix/phase-7-sparkle-settings-button

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 28, 2026

Summary

Completes Phase 7 Sparkle testing fixes with three main improvements:

Settings Button Fix ✅

  • Fixed "Check for Updates" button being permanently disabled in Settings → Updates
  • Root cause: UpdaterViewModel was created with fallback updater (startingUpdater: false) when NSApp.delegate wasn't available during @StateObject initialization
  • Solution: Store UpdaterViewModel in TermQAppDelegate and inject via @EnvironmentObject
  • Button now uses the same SPUStandardUpdaterController as the Menu Bar "Check for Updates"

Appcast HTML Formatting 🎨

  • Release notes now converted from Markdown to HTML using pandoc
  • Sparkle renders proper formatted HTML instead of raw Markdown syntax (##, ###, **text**, etc.)
  • Added markdown_to_html() function to scripts/generate-appcast.sh
  • Added pandoc dependency to CI workflows

Debug Build Warning ⚠️

  • Added orange warning banner in Settings → Updates for Debug builds
  • Warns users that proceeding with updates will install the Production version
  • Fully localized with new string keys synced to all 40 language files

Test Plan

  • Build succeeds with zero errors (make check passes)
  • Menu Bar "Check for Updates" works (was already working)
  • Settings "Check for Updates" button now enabled and functional
  • Both buttons show proper update dialogs
  • DEBUG warning displays correctly in Debug builds
  • Signature validation prevents installing mismatched updates
  • Appcast HTML rendering verified with pandoc

Related

🤖 Generated with Claude Code

…rmatting

This commit completes Phase 7 Sparkle testing fixes:

**Settings Button Fix:**
- Fixed "Check for Updates" button being disabled in Settings → Updates
- Root cause: UpdaterViewModel was created with fallback updater (startingUpdater: false)
- Solution: Store UpdaterViewModel in TermQAppDelegate and inject via @EnvironmentObject
- Button now uses same SPUStandardUpdaterController as Menu Bar
- Removed .disabled() modifier (Menu Bar has no such constraint)

**Appcast HTML Formatting:**
- Release notes now converted from Markdown to HTML using pandoc
- Added markdown_to_html() function to generate-appcast.sh
- Sparkle renders proper HTML instead of raw Markdown syntax (##, ***, etc.)
- Added pandoc dependency to CI workflows (update-appcast.yml, validate-scripts.yml)

**Debug Build Warning:**
- Added orange warning in Settings → Updates for Debug builds
- Warns that updates will install Production version
- Localized strings: settings.debug.update.warning.title/message
- Synced to all 40 language files with placeholders

**Architecture Changes:**
- UpdaterViewModel now stored in TermQAppDelegate.updaterViewModel
- Settings receives UpdaterViewModel via @EnvironmentObject from app level
- Controller reference stored in UpdaterViewModel for proper update triggering

**Files Modified:**
- Sources/TermQ/TermQApp.swift (UpdaterViewModel architecture)
- Sources/TermQ/Views/SettingsGeneralView.swift (DEBUG warning, button enabled)
- Sources/TermQ/Views/SettingsView.swift (@EnvironmentObject injection)
- scripts/generate-appcast.sh (Markdown to HTML conversion)
- .github/workflows/update-appcast.yml (added pandoc)
- .github/workflows/validate-scripts.yml (added pandoc)
- Docs/appcast.xml (regenerated with HTML)
- Docs/appcast-beta.xml (regenerated with HTML)

**Testing Notes:**
- Phase 7 testing complete (Tests 7.1-7.3 pass, 7.4 requires production build)
- Signature validation working correctly (rejects mismatched updates)
- Version comparison works (with SUStandardVersionComparator caveats)

Closes Phase 7 Sparkle stabilization testing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@eyelock eyelock merged commit 675b438 into main Jan 28, 2026
9 checks passed
@eyelock eyelock deleted the fix/phase-7-sparkle-settings-button branch January 28, 2026 00:51
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