Skip to content

build(release): promote 1.0.0-beta.9 to main - #68

Merged
scttbnsn merged 7 commits into
mainfrom
dev/m2
Nov 3, 2026
Merged

scttbnsn merged 7 commits into
mainfrom
dev/m2

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Promotes beta.9, build 14. This is the first build where closed-lid mode uses a narrow sudoers rule for pmset -a disablesleep 0|1 instead of a root helper.

Every PR passed CI on macOS 26. Packaging, notarization and the attended acceptance run on the signed build follow the tag.

Summary by CodeRabbit

  • New Features
    • Added a Support menu with sponsor and donation links.
    • Closed-lid mode now uses administrator-approved permission managed in Settings.
    • Uninstall preparation can optionally remove closed-lid permission; it remains installed by default.
  • Improvements
    • The app migrates older helper installations and adds safeguards to restore normal sleep if a closed-lid session is interrupted.
    • Updated setup, status, and command-line guidance for permission-based controls; legacy helper commands are deprecated.
  • Release
    • Updated to beta.9.

* feat(support): add GitHub Sponsors and Donate links to menu, About, website and README

* docs(website): note the Chromium install for the social card renderer
…d release checks (#65)

* build(release): stop bundling the helper executable and keep only its migration plist

build-app.sh no longer copies or signs dilated-helper. package-release
now requires the helper LaunchDaemon plist (so SMAppService can unregister
the job older installs still have) and rejects a bundled executable.
smoke-test --expect-no-helper checks lid-permission status and the
deprecated helper status alias instead of the old helper setup path.

* feat(closed-lid)!: drop the privileged helper and make the sudo rule the only path

ClosedLidController always uses LocalClosedLidTransport and the
DilatedLocalClosedLidTransport flag is gone. Settings always shows the
PERMISSION group. dilated-helper, its XPC transport, SMAppService
registration and code identity check are deleted; dilated helper
status|setup|remove stay one release as deprecated lid-permission aliases.

At launch HelperMigration unregisters a leftover helper through
SMAppService, confirms launchd dropped the job, and reverts sleep through
the sudo path when the old helper left it off with no Dilated session
marker. It never blocks launch, and its result is saved for Settings
(with a Restore normal sleep action when the revert fails).

prepare-update and prepare-uninstall confirm sleep is back on before
quitting. prepare-uninstall removes the sudoers rule only with
--remove-lid-permission. Old helperWasApproved handoffs still decode and
are ignored.

* fix(closed-lid): retry helper migration at package prepare and surface leftovers on every launch

* docs(closed-lid): describe the sudo rule, add zap stanza and update acceptance checks

* test(closed-lid): use fixed safety readings in the package preparation test
…en it exits (#66)

The app now rewrites a small heartbeat file on the service tick while a closed-lid session is active. The watchdog reverts through the existing path when the file stops changing for the lease plus 30s on its own monotonic clock. A resumed app sees its marker gone and ends the session instead of re-enabling.
Prerelease acceptance now needs a passed closed-lid check on macOS 26 or macOS 27, not both. GA still requires every check.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

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

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: adee2922-ff14-4cde-b4c3-7a00e006941c
Commits

Reviewing files that changed from the base of the PR and between 74c60d9 and f119daa.

Files selected for processing: 4
  • Sources/DilatedCore/ClosedLidWatchdog.swift
  • Sources/DilatedUI/PackageQuit.swift
  • Tests/DilatedCoreTests/ClosedLidHeartbeatTests.swift
  • Tests/DilatedUITests/PackageSheetDismissalTests.swift
Walkthrough

This release replaces the retired privileged helper with in-app closed-lid permission handling, heartbeat-based recovery, and launch-time helper migration. It also updates CLI flows, package and release checks, documentation, tests, and support-link presentation.
Changes: Closed-Lid Control and Helper Migration

Layer / File(s) Summary
Local service and heartbeat recovery
Sources/DilatedCore/*, Sources/DilatedUI/ClosedLid/ClosedLidController.swift, Sources/DilatedUI/ClosedLid/LocalClosedLidTransport.swift, Tests/DilatedCoreTests/ClosedLidHeartbeatTests.swift, docs/ARCHITECTURE.md
The local service now writes heartbeats while a lease is active. The watchdog reads those heartbeats and reverts sleep prevention after a stall. The local transport starts ticking on demand.
Retired-helper migration and app lifecycle
Sources/DilatedCore/PackageHelperCheck.swift, Sources/DilatedCore/Helper*, Sources/DilatedHelper/*, Sources/DilatedUI/AppModel.swift, Sources/DilatedUI/ClosedLid/*, Tests/DilatedUITests/HelperMigrationTests.swift, Tests/DilatedUITests/ClosedLidControllerTests.swift
The app checks the retired helper job, records migration results, and exposes dismiss or restore actions. The helper executable, installation flow, and XPC client are removed.
Permission, CLI, and package preparation
Sources/DilatedControl/*, Sources/DilatedCLI/DilatedCommand.swift, Sources/DilatedUI/AppModel.swift, Sources/DilatedUI/Automation/*, Sources/DilatedUI/ClosedLid/ClosedLidSettings.swift, Tests/DilatedControlTests/*, Tests/DilatedUITests/*, docs/AUTOMATION.md
The control protocol adds optional sudo-rule removal during uninstall preparation. The CLI, app, automation, and settings paths now use closed-lid permission state. Package preparation now confirms closed-lid mode is off before it continues.
Packaging, release checks, and migration guidance
Package.swift, scripts/*, Tests/ReleaseTests/*, docs/INSTALLATION.md, docs/RELEASING.md, packaging/*, website/README.md, website/tests/release.test.mjs, website/vercel.json
The bundle keeps the migration plist but omits the helper executable. Release validation, prerelease gates, and version metadata move to beta.9 build 14. The installation and release docs describe the new sudo-rule workflow.
Support links
.github/FUNDING.yml, README.md, Sources/DilatedUI/SupportLinks.swift, Sources/DilatedUI/Menu/AwakeMenu.swift, Sources/DilatedUI/Settings/AboutSettings.swift, Tests/DilatedUITests/AboutSettingsTests.swift, Tests/DilatedUITests/MenuTests.swift, website/e2e/site.spec.mjs
The app adds sponsor and donation destinations to its Support menu and About credits. Tests check the links and the footer layout on the website.

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

Change: Feature

Possibly related PRs

  • CodesWhat/dilated#23: It hardens helper removal, which this PR replaces with the HelperMigration flow.
  • CodesWhat/dilated#57: It introduces the sudo-rule foundation and local transport changes that this PR builds on.
  • CodesWhat/dilated#63: It adds the closed-lid permission model and local transport that this PR extends.

Suggested reviewers: biggest-littlest

Merge Risk: Moderate · previous review 74c60

A successfully prepared update or uninstall can remain blocked waiting for Dilated to exit. Arm the fallback before requesting termination.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 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 release build and promotion of version 1.0.0-beta.9 to main, which matches the pull request objectives and changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 93 functions across 54 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8acd0384-bc17-422a-8648-0c1cc1547b73
Commits

Reviewing files that changed from the base of the PR and between 9044d6b and 74c60d9.

Files selected for processing: 8
  • README.md
  • Sources/DilatedUI/ApplicationDelegate.swift
  • Sources/DilatedUI/PackageQuit.swift
  • Sources/DilatedUI/Settings/SettingsWindow.swift
  • Sources/DilatedUI/Settings/ShortcutsSettings.swift
  • Tests/DilatedUITests/PackageSheetDismissalTests.swift
  • Tests/DilatedUITests/PowerPreferencesTests.swift
  • scripts/verify.sh
Files skipped from review as they are similar to previous changes: 1
  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread README.md Resolved
…ate (#70)

NSWindow.endSheet leaves the SwiftUI presentation state set, so the shortcut recorder sheet came straight back and prepare-update never finished quitting. Rebuild the settings page to clear sheet state, end any nested sheets, abort app-modal alerts, and exit the process if terminate hasn't completed within 5s of a successful prepare.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread Sources/DilatedUI/PackageQuit.swift Resolved
…k and arm forced exit before terminate (#71)

The heartbeat tests relied on real wall-clock lease and poll intervals and
flaked on a loaded runner. The watchdog now takes a monotonic clock and a
poll ticker (defaults unchanged), so tests advance time and heartbeats in
lockstep. PackageQuit schedules its forced exit before calling terminate(),
which may not return under terminateLater.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed. CI is green on f119daa. Every CodeRabbit finding from its passes is fixed in #69 and #71, and the latest pass was rate limited.

@scttbnsn
scttbnsn merged commit 374e896 into main Nov 3, 2026
4 checks passed
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.

2 participants