Skip to content

fix(test): close the measured window without quitting installed apps - #118

Merged
yogeshprasad098 merged 1 commit into
mainfrom
fix/measure-cpu-quit
Nov 27, 2026
Merged

yogeshprasad098 merged 1 commit into
mainfrom
fix/measure-cpu-quit

Conversation

@yogeshprasad098

Copy link
Copy Markdown
Contributor

What changed

scripts/measure-cpu.sh measured "window closed" by telling the test app to quit through AppleScript. AppleScript picks apps by bundle identifier, so the quit also reached the installed Chargectl. On this Mac that quit it twice today (helper log: "Chargectl quit; macOS manages charging until it opens again" at 4:39 PM and 9:38 PM), stopping the helper until the app was opened again.

The script now opens chargectl://dashboard/close with the measured app, as it already does for pages. Only Debug builds started with --background answer that link, by closing the dashboard.

Verified

  • ./scripts/check.sh passes.
  • ./scripts/measure-cpu.sh on M3 MacBook Air, macOS 27.2.1: the installed Chargectl kept running (same process), the helper logged nothing, and "window closed" read 0.2%, so the test window did close.

measure-cpu.sh closed the test build's window with an AppleScript quit.
AppleScript finds apps by bundle identifier, so it also quit an installed
Chargectl, which stops its helper and hands charging back to macOS. Close
the window with a chargectl://dashboard/close link that only --background
builds answer, opened with the measured app.
@github-actions github-actions Bot added area: dashboard The Chargectl window and the setup window area: ci CI, the check scripts and the build setup labels Nov 27, 2026
@yogeshprasad098
yogeshprasad098 merged commit b538396 into main Nov 27, 2026
9 checks passed
@yogeshprasad098
yogeshprasad098 deleted the fix/measure-cpu-quit branch November 27, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI, the check scripts and the build setup area: dashboard The Chargectl window and the setup window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant