Skip to content

Browsers: protect Comet and offer it the unthrottled relaunch - #88

Merged
krishhgg merged 4 commits into
krishhgg:mainfrom
nsd97:comet-browser
Oct 12, 2026
Merged

krishhgg merged 4 commits into
krishhgg:mainfrom
nsd97:comet-browser

Conversation

@nsd97

@nsd97 nsd97 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Freeze scope. ai.perplexity.comet (Comet, Perplexity's Chromium browser) joins FreezePlanner.builtInProtected under "Browsers agents drive". "Freeze every other app" now leaves it running, as it does Chrome and Arc. The explicit freeze list still overrides it.
  • Throttling. It joins ChromiumFlags.knownBrowsers, so the menu offers "Relaunch Comet unthrottled" when Comet runs without --disable-backgrounding-occluded-windows and --disable-renderer-backgrounding. Before this, only an agent-list id containing "chrome" or "chromium" was picked up, which ai.perplexity.comet is not.
  • Tests. The two tests that pin those lists now include it: FreezerTests.testBuiltInProtectedCoversVerifiedIdsAndNoneIsApple and BrowserThrottleTests.testChromiumBundleIdsFromAgentList. Both fail without the change.
  • Docs.
    • README and docs/extras.md name Comet in the throttling section; the README link follows the new anchor.
    • docs/spec.md lists it with the protected browsers.
    • docs/release-validation.md records the real-Mac check.

Evidence

Not covered

  • "Freeze every other app" with Comet running and not on the freeze list. FreezerTests covers the protected list, but it wasn't checked on hardware.
  • Page timers in Comet with the lid closed.
  • No item was added to "Real-Mac checks before a release": the existing relaunch and headed-browser items do not name a browser.

Sources

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Adds Comet to the protected browser list and offers “Relaunch Comet unthrottled.”

  • Comet stays out of automatic lid-close freezing.
  • Insomnia can detect Comet and offer an unthrottled relaunch.

Reviews (2) · Last reviewed commit: "Releasing: add a real-Mac check for Come..." · Reviewed by Greptile

nsd97 and others added 4 commits October 11, 2026 17:42
Comet (ai.perplexity.comet, read from the installed app's Info.plist) is a
Chromium browser that agents drive, like Chrome and Arc. It was on neither
list, so "Freeze every other app" froze it at lid close and the menu never
offered "Relaunch Comet unthrottled".

Add it to FreezePlanner.builtInProtected and ChromiumFlags.knownBrowsers,
extend the two tests that pin those lists, and name it in the README,
docs/extras.md and docs/spec.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
docs/release-validation.md conflicted: main's October 10 macOS 27.0.1
section (krishhgg#58) and this branch's October 11 Comet section were added at
the same place. Both are kept, oldest first.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
CONTRIBUTING asks new behavior that needs a real-Mac check to add an
item to the release checklist. The relaunch and throttling rows name no
browser, so a release could pass them with Chrome alone. The new row
covers what the October 11 record left unexercised: freeze-all leaving
Comet running, and throttling after "Relaunch Comet unthrottled".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@krishhgg

Copy link
Copy Markdown
Owner

I pushed two commits to this branch:

  • 2ec67fa merges main. docs/release-validation.md conflicted because macOS 27: allow the DisplayServices calls and read Low Power Mode from powermode #58 added its October 10 macOS 27.0.1 section at the same place as your October 11 Comet section. I kept both, oldest first, and didn't change any wording.
  • b84d96b adds one row to the real-Mac checklist in docs/releasing.md, as CONTRIBUTING asks for new behavior that needs a real-Mac check. The existing relaunch and throttling rows don't name a browser, so a release could pass them with Chrome alone. The row covers the two things your record lists as not exercised: freeze-all leaving Comet running, and throttling after "Relaunch Comet unthrottled".

The code change had no findings, and FreezerTests and BrowserThrottleTests pass on the merged branch.

🤖 Generated with Claude Code

@krishhgg
krishhgg merged commit db9085e into krishhgg:main Oct 12, 2026
5 checks passed
@krishhgg

Copy link
Copy Markdown
Owner

Thanks again for this fix. Before it ships in a release, I need test evidence from your Mac for the code as it is now on main. The evidence in this PR's description came from an earlier build. Since then the branch got review fixes and merges of main, so it doesn't cover the code that merged. Any change that can affect how Insomnia behaves needs this, so I'm asking every contributor from this round.

Checks for this change (on your macOS 27 MacBook Pro)

Test main alone this time. Your earlier build also had #76 and #74 applied, which aren't merged.

  1. Freeze-all leaves Comet running. Turn freeze-all on. Have Comet running and not on the freeze list, plus a terminal and one other Dock app. Close the lid for 2 minutes during a session. Expected: none of Comet's processes is stopped, and the other Dock app is frozen. Sample ps -axo pid,stat,comm | grep -i comet every 5 s into a file while the lid is closed; no line should show T. Opening the lid resumes the frozen app.
  2. Relaunch Comet unthrottled. Start Comet without the flags and choose "Relaunch Comet unthrottled". Expected: the confirmation alert, then the log line "relaunched ai.perplexity.comet unthrottled". Post ps -o args= of Comet's main process before and after. After the relaunch it should show both flags and keep any profile arguments it had before.
  3. Comet isn't throttled with the lid closed. After check 2, open this page in Comet, start a session, and close the lid for 5 minutes:
    data:text/html,<pre id=l></pre><script>setInterval(()=>l.textContent+=new Date().toISOString()+'\n',1000)</script>
    Expected: after you open the lid, the list has a line about every second through the closed period. Post the part covering the closed period.
  4. Chrome still works the same. Repeat checks 2 and 3 with Chrome.

Build and what to post

  • Build. A clean checkout of current main (db9085e or later), with no other PRs applied, installed with ./scripts/install.sh. Post git rev-parse HEAD and the output of git status --short, which should be empty.
  • Mac. Post sw_vers, sysctl -n hw.model and sysctl -n machdep.cpu.brand_string.
  • Samples. Before each check, start a sampler in a Terminal window and leave it running. It keeps logging while the lid is closed, because the Mac stays awake:
    while :; do date '+%T'; pmset -g | grep SleepDisabled; pmset -g custom | sed -n '/Battery Power/,/AC Power/p' | grep -E 'powermode|lowpowermode'; sleep 5; done | tee -a ~/insomnia-samples.txt
  • For each check, post the steps you ran with times, pass or fail, and the raw output that shows it:
    • the lines of ~/Library/Logs/Insomnia/insomnia.log for that run;
    • the samples for that run;
    • pmset -g log | grep -E ' (Sleep|Wake|DarkWake) ' for that time window, which shows whether the Mac slept;
    • the extra readings named in the check.
  • Not run. List anything you couldn't run, and why.

Post the results as a comment on this PR. Put long logs in a gist and link it. Run everything while you're with the Mac, on a stable, ventilated surface, never in a bag, and not while you have unsaved work open.

🤖 Generated with Claude Code

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