Skip to content

feat(fork): Install now prompt when a nightly lands (OH-10) - #32

Merged
andorcassian merged 2 commits into
devfrom
feature/OH-10-nightly-install-now-prompt
Nov 8, 2026
Merged

andorcassian merged 2 commits into
devfrom
feature/OH-10-nightly-install-now-prompt

Conversation

@andorcassian

Copy link
Copy Markdown
Collaborator

Summary

Part of OH-10. Adds an Install now prompt when a nightly lands, as Josh asked on 2026-11-08. It builds on #31; once #31 merges, this PR's diff is only the prompt commit.

  • The launchd agent runs every 5 minutes instead of hourly, so the prompt appears soon after a release.
  • App open: shows one Install now / Later dialog per release. Install now records the request and starts a run straight away. Without a click it installs after an hour, the same upper bound as before. The dialog closes itself once the release installs.
  • App closed: installs at once without asking.
  • A failed attempt (App Management denied, quit timeout) keeps the approval, so later runs retry without asking again or repeating the alert.
  • status reports a missing or outdated launch agent. Only install writes the plist, so after this release lands, run install once from happier-dev.

Verification

  • RED, then GREEN: the agent, contract and production-checkout suites pass 74/74. The new tests cover first ask, click, the hour without a click, a newer release, failed installs over 2+ hours (one prompt and one alert), a late exit after a quit timeout, and an outdated plist.
  • The real showInstallPrompt ran with stand-in osascript and launchctl. A hostile request path and SHA were passed literally, with no injection, and a click records the full SHA and kickstarts the agent.
  • On this Mac, the anchored pkill closed a real prompt and its wrapper shell. It left alone a decoy process whose command line contained the dialog title.
  • Two independent review lenses (prompt flow; macOS behaviour and security) were run, and all five findings are fixed.

Not yet verified

A real click on Install now. That happens on the first release after merge.

Josh asked for Happier to be closed if needed to refresh it. Waiting for 15 idle minutes never happened, because the Mac sleeps when he steps away, so the agent now quits and relaunches the app at the first run after a release. The relaunch stays in the background and in the same mode, and sessions belong to the daemon.
With the app open, the agent shows one Install now / Later dialog per release, installs on Install now, and otherwise installs after an hour as before. A failed attempt keeps the approval, so later runs retry without asking again. It now runs every 5 minutes so the dialog appears soon after a release lands, closes the dialog once the release installs, and status reports an outdated launch agent.
@andorcassian
andorcassian merged commit 5b8df6f into dev Nov 8, 2026
45 checks passed
@andorcassian
andorcassian deleted the feature/OH-10-nightly-install-now-prompt branch November 8, 2026 15:10
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