Repository navigation
Conversation
Low Power Mode turned on for a serious thermal state went off at fair, the first step down. That brought back the load that made the Mac serious, so the mode went on and off again as the Mac heated up, with a notification each time. The thermal cause now holds from serious until nominal; FloorRuleDriver keeps that history for the session, in memory. The notification after the cooldown said "Back above the floor.", which is about the battery. It now says "Thermal state is back to nominal.", or "Thermal rules are off." when Settings turned them off, and the one at the start says the mode stays on until then. A battery floor or the thermal rules changed in Settings during a session applied only at the next battery or thermal event. They now run the floors at once, as the lid option already did.
The machine line adds "Thermal: serious" (or fair, critical), read again when the menu opens rather than through the monitor, whose copy moves only with the notification and is not kept current outside a session. The actions line says "Low Power Mode set by Insomnia" while the journal has lowPowerSetByUs, so the reason the Mac is slower is in the menu.
The Settings view asked for a floor run with an onChange per setting, a path no test could reach. SessionManager.config now calls floorInputsChanged when a battery floor, the thermal rules or the lid option changes (Config.floorInputs), and AppServices points it at reevaluateFloors(). The view's onChange calls, the lid option's included, are gone, so there is one path for every floor input. Tests: a floor input change asks for one run and any other change none, and during a session each change applies through that hook with no battery, thermal or lid event, in the power calls, the journal and the session end.
A Mac that stays at fair after serious, under a long build say, keeps Low Power Mode and the held display sample until the session ends. Say so next to the hold, with why a release on a timer is not used: it would bring the cycling back at a slower pace. The menu shows the mode and the state meanwhile, and turning the thermal rules off releases it.
# Conflicts: # Sources/Insomnia/Core/AppServices.swift # Sources/Insomnia/UI/SettingsView.swift # docs/releasing.md # docs/spec.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
MacBook run on macOS 26.2 at a7726f6: the heat hold switchThe switch works as the description says. "Keep Low Power Mode on until the Mac fully cools" sits under Protect against overheating, is on by default, and each change is saved to Setup. The maintainer's MacBook Pro (M5), macOS 26.2 (25C56), on AC power at 100%, with a dark menu bar.
Logs: app, run, config with the switch off. Not covered: the hold itself. The Mac stayed at a nominal thermal state, and nobody should heat a Mac on purpose to try it, so the hold is left to FloorRulesTests and ConfigTests. Each step ran once. |
|
The full suite at |



Low Power Mode that Insomnia turns on for heat now stays on until the Mac is back to nominal, so it no longer switches off at fair and on again as the Mac heats back up. A new switch, "Keep Low Power Mode on until the Mac fully cools", on by default, lets you turn that hold off.
This lands #80 by @aldikosh23 at fecfc61. The commit is merged here unchanged, so GitHub marks #80 merged when this one merges and its author keeps the credit. #80 conflicts with #147 (Settings on one page) and with the lid changes below it, so it can't merge as it is.
To @aldikosh23: please don't push to your branch now. A new commit on it isn't in this pull request, so #80 would stay open instead of showing as merged.
The base is
integration/lid-close-sleep(#150's branch), which this stacks on. When that merges, this pull request's base changes to main and nothing else changes.Conflicts resolved
onChangereevaluation: Heat: keep Low Power Mode on until nominal, and show it in the menu #80 already runs the floors on every floor input change inSessionManager.Maintainer commits
3866e27: merges Lid close: land #138, #135 and #71 #150's new head7843047, which adds its fix for a lid closed while the display list can't be read. Git merged it with no conflicts. The heat hold and the lid each still turn Low Power Mode on for their own reason, and the end restores it whichever turned it on.baee1d2: the heat hold becomes a setting,thermalHoldUntilNominal, default on. On, Low Power Mode turned on for heat stays on until the thermal state is back to nominal. Off, it goes off below serious as before Heat: keep Low Power Mode on until nominal, and show it in the menu #80. The switch sits under "Protect against overheating" and is greyed out when that is off. The key is a floor input, so a change during a session applies at once.Tests
The full suite at
3866e27, this head: 1475 tests, 0 failures, on macOS 26.2 on the maintainer's MacBook. FloorRulesTests and ConfigTests cover the setting both ways and an old config without the key. Hosted CI runs on macOS 26 and 27.Review
Clean at
3866e27: a review of the merge found the two sides combined correctly in SessionManager, the docs consistent, and no #80 test that the new lid reading breaks. Before that, clean at round 2 (a7726f6, the same tree asbaee1d2).Evidence
The switch in Settings, on and off, on the maintainer's MacBook at
a7726f6. The merge above changes only the lid code under it, not the switch. The heat hold itself needs the Mac to reach serious heat, which nobody should cause on purpose: the menu lines it adds ("Thermal: serious", "Low Power Mode set by Insomnia") are pictured only if that happens during a normal session.

Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
This PR keeps heat-triggered Low Power Mode on until the Mac returns to nominal, with a default-on setting to restore the earlier behavior.
No actionable issues were found. Tests and native UI checks were not run in this Linux environment.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Serious heat] --> B[Enable Low Power Mode] B --> C{Heat drops to fair} C -->|Hold enabled| D[Keep mode on until nominal] C -->|Hold disabled| E[Release thermal cause] D --> E E --> F{Battery or lid still needs it?} F -->|Yes| G[Keep mode on] F -->|No| H[Turn owned mode off]Reviews (2) · Last reviewed commit: "Merge integration/lid-close-sleep at 784..." · Reviewed by Greptile