Skip to content

Fix update focus and polish DMG installation - #73

Merged
robin-liquidium merged 8 commits into
mainfrom
codex/fix-update-focus-and-dmg
Aug 13, 2026
Merged

robin-liquidium merged 8 commits into
mainfrom
codex/fix-update-focus-and-dmg

Conversation

@robin-liquidium

@robin-liquidium robin-liquidium commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • make the menu-bar Update action activate Dayline before presenting Sparkle, so one click reliably brings the update window forward
  • replace the generic release DMG with a centered Dayline → Applications layout
  • pin and checksum the DMG tool, scope release credentials, and bind delayed DMG packaging to the exact persisted release commit
  • add bounded updater tests and DMG/release contract coverage

Validation

  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcrun swift build
  • updater tests: 7/7 passed
  • release package built successfully without installing it
  • DMG checksum verified
  • notarization release-state tests passed
  • shell syntax, workflow YAML, secret scan, and git diff --check passed
  • full local suite: 126/127 passed; the pre-existing Apple Calendar all-day creation test is timezone-sensitive under Asia/Bangkok and is left for UTC hosted CI to classify

Closes #69

Summary by CodeRabbit

  • New Features

    • Release disk images now use an improved layout, custom background, and Applications shortcut for easier installation.
    • Update checks bring the app to the foreground before starting.
    • Added a verified installer for the local disk-image packaging tool.
  • Bug Fixes

    • Release packaging now consistently uses the intended accepted build.
    • Improved cleanup and validation help prevent incomplete or incorrectly structured disk images.
  • Documentation

    • Updated manual packaging instructions, including installation and verification options for the required packaging tool.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@robin-liquidium, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ad54d970-d988-4061-879d-c73626016b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 3061b15 and 5af4ce9.

📒 Files selected for processing (1)
  • Tests/DaylineTests/AppleCalendarEventCreationTests.swift

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c920d519-bab8-4a1b-8f83-fa614b95836f

📥 Commits

Reviewing files that changed from the base of the PR and between 1ead889 and 3061b15.

⛔ Files ignored due to path filters (1)
  • Resources/DaylineDMGBackground.svg is excluded by !**/*.svg
📒 Files selected for processing (10)
  • .github/workflows/ci.yml
  • .github/workflows/notarization-continuation.yml
  • .github/workflows/release.yml
  • README.md
  • Sources/Dayline/Services/UpdateService.swift
  • Tests/DaylineTests/UpdateServiceTests.swift
  • script/app_bundle_contract_test.sh
  • script/install_create_dmg.sh
  • script/notarization_release.sh
  • script/package_release.sh

📝 Walkthrough

Walkthrough

The PR updates macOS DMG packaging, release workflows, notarization packaging, DMG contract tests, and application update dispatch. It adds checksum-verified create-dmg installation and scopes release credentials to individual workflow steps.

Changes

Release packaging and automation

Layer / File(s) Summary
DMG tool installation and configuration
script/install_create_dmg.sh, .github/workflows/ci.yml, README.md, script/package_release.sh
The repository installs create-dmg with checksum verification and exposes its executable path for CI and local packaging.
DMG generation and contract validation
script/package_release.sh, script/app_bundle_contract_test.sh
Packaging creates an APFS DMG with a background image and app-drop layout. Contract tests mount the DMG and validate its contents, metadata, dimensions, and layout.
Accepted-commit release packaging
script/notarization_release.sh
The release script validates the recorded commit, uses a detached worktree for packaging, and copies ZIP and DMG artifacts to standard paths.
Release workflow secret scoping
.github/workflows/notarization-continuation.yml, .github/workflows/release.yml
Release workflows pass signing and App Store Connect credentials only to the steps that validate or use them. One checkout now fetches full history.

Application update dispatch

Layer / File(s) Summary
Asynchronous update activation
Sources/Dayline/Services/UpdateService.swift
User-initiated update checks run asynchronously on the main queue. The application activates before the injected check action or Sparkle updater runs.
Update dispatch tests
Tests/DaylineTests/UpdateServiceTests.swift
Tests verify activation-before-check ordering for enabled updates and no check invocation for disabled updates.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: ⚪ Minimal · up to 3061b

The PR updates update-window focus and release DMG packaging, with targeted updater, checksum, release-state, syntax, workflow, and contract checks passing; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant PackageRelease as package_release.sh
  participant CreateDMG as create-dmg
  participant ContractTest as app_bundle_contract_test.sh
  CI->>PackageRelease: provide CREATE_DMG_BIN
  PackageRelease->>CreateDMG: create APFS release DMG
  ContractTest->>CreateDMG: mount and inspect release DMG
  CreateDMG-->>ContractTest: return DMG contents and metadata
  ContractTest->>CreateDMG: detach mounted DMG
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes updater-focus, release-provenance, credential-scoping, and CI changes beyond issue #69's DMG installer appearance requirement. Remove the unrelated changes or link them to separate issues with explicit scope.
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The packaging changes implement a centered app-to-Applications layout, but the arrow artwork is excluded from review by !**/*.svg. Include Resources/DaylineDMGBackground.svg or an equivalent rendered asset so the installer-style arrow can be verified.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the two primary changes: update-window focus and DMG installation improvements.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-update-focus-and-dmg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
dayline-website 5af4ce9 Aug 12 2026, 11:48 PM

@opencode-agent

Copy link
Copy Markdown

PR #73 Review

Overall solid, well-tested change. Findings below, ordered by importance.

Potential bugs

  1. Deprecated API on macOS 26 targetSources/Dayline/Services/UpdateService.swift:106 uses NSApplication.shared.activate(ignoringOtherApps: true), deprecated since macOS 14. The deployment target is 26.0, so prefer NSApplication.shared.activate() (or NSRunningApplication.current.activate(options: [.activateAllWindows])). As-is it compiles with a deprecation warning, and Apple has deprecated this API precisely because ignoringOtherApps: is unreliable — ironic for a fix about reliably focusing the update window.

  2. Pinned checksum of a GitHub auto-generated archivescript/install_create_dmg.sh checksums github.com/.../archive/refs/tags/v1.3.0.tar.gz. GitHub does not guarantee hash stability of auto-generated source archives (they changed globally once already, Jan 2023). If that recurs, CI and releases break hard. Consider pinning a release asset instead, or vendoring the script.

Smaller issues

  1. Test data raceTests/DaylineTests/UpdateServiceTests.swift:16: actions is mutated on the main queue inside the injected closures and read on the test's cooperative-pool thread. The AsyncStream yield gives practical ordering, but there's no formal happens-before for the "activate" append, and captured-var mutation across domains will error under strict concurrency. A Mutex/actor or yielding the action name through the stream would make it sound.

  2. Doc regression — README "Manual fallback" lost the sentence describing what package_release.sh produces; it now jumps straight to installing create-dmg.

  3. Double-click queues two checkscheckForUpdates() now always defers via DispatchQueue.main.async, so rapid invocations each enqueue an activate+check. Harmless with Sparkle, but a simple guard could dedupe.

What looks good

  • advance_accepted_app worktree refactor is clean — no dangling APP_BUNDLE/RELEASE_DIR references, subshell trap correctly cleans the worktree on failure, and binding DMG packaging to the persisted commit is a real provenance win.
  • Secret scoping to individual steps in both workflows is a good hardening change.
  • The DMG contract test (mount, symlink, background, .DS_Store reference, layout greps) gives genuine coverage of the new packaging behavior.
  • --proto '=https' --tlsv1.2 + checksum + --strip-components=1 extraction is careful bootstrap hygiene.

Recommend fixing #1 before merge; #2 and #3 are worth a follow-up.

New%20session%20-%202026-08-12T23%3A45%3A48.984Z
opencode session  |  github run

@opencode-agent

Copy link
Copy Markdown

PR #73 Review

Overall a solid, well-scoped change with genuine test/contract coverage. Findings, ordered by severity:

Bugs

  1. errexit is silently disabled inside the new packaging subshellscript/notarization_release.sh:440-464. The subshell runs as the condition of if ! ( ... ); then, and bash disables set -e for the entire condition context. A failing codesign --verify, stapler staple, or even package_release.sh will not abort the subshell — execution continues and the subshell's exit status is only that of the final cp. A broken/unsigned bundle could ship as long as the last copy succeeds. Fix: add set -e as the first line inside the subshell, or chain the critical commands with &&.

  2. Deprecated API on a macOS 26-only targetSources/Dayline/Services/UpdateService.swift:106 uses NSApplication.shared.activate(ignoringOtherApps: true) (deprecated macOS 14). Use NSApplication.shared.activate(); ignoringOtherApps: is deprecated precisely because it's unreliable, which undercuts a fix about reliably focusing the update window.

Smaller issues

  1. Test data raceTests/DaylineTests/UpdateServiceTests.swift:16: actions is a captured var mutated on the main queue and read from the test's async context with no formal synchronization; it will also error under strict concurrency. Yield the action names through the stream or guard with a lock.

  2. Checksum-pinning a GitHub auto-generated archivescript/install_create_dmg.sh:5 pins the SHA of .../archive/refs/tags/v1.3.0.tar.gz. GitHub doesn't guarantee hash stability of these archives (they changed globally in Jan 2023); if it recurs, CI and releases hard-fail. Prefer a release asset or vendoring.

  3. Scope creep — the AppleCalendarEventCreationTests.swift change (fixed dates → startOfDay(Date())) is unrelated to this PR and makes the test depend on the run date. Fine if intentional, but it belongs in its own commit/PR with a rationale.

  4. Double-click queues two checkscheckForUpdates() now always defers via DispatchQueue.main.async; rapid invocations each enqueue activate+check. Harmless with Sparkle, but a simple in-flight flag would dedupe.

Looks good

  • The worktree refactor in advance_accepted_app (binding DMG packaging to the persisted commit, subshell trap cleanup, worktree prune) is a real provenance win.
  • Secret scoping to individual steps in both workflows; fetch-depth: 0 correctly added for tag resolution.
  • The DMG contract test (mount, symlink target, .DS_Store background reference, layout greps) gives real coverage.
  • release.yml correctly doesn't need create-dmg — submit uses --prepare-notarization, and the continuation installs the tool itself.

Recommend fixing #1 and #2 before merge; #3 and #4 are good follow-ups.

New%20session%20-%202026-08-12T23%3A48%3A36.962Z
opencode session  |  github run

@robin-liquidium
robin-liquidium merged commit a06252e into main Aug 13, 2026
11 of 12 checks passed
@robin-liquidium
robin-liquidium deleted the codex/fix-update-focus-and-dmg branch August 13, 2026 00:01
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.

[Feature request] DMG installer needs dafault installer look with arrow

1 participant