cmux NEXT: the host pressure warning is off by default; Show / Hide Host Pressure Warning in the palette

Merged
LA
4d ago
+415-24

Summary

The host pressure warning (the titlebar gauge, its popover and the critical banner) is off by default again. It can be turned on from the Command Palette: Show Host Pressure Warning, and off with Hide Host Pressure Warning.

Reason for the default change, in Lawrence's words: "get rid of host-pressure warning by default, can be enabled in cmd shift p tho" (Lawrence decision relayed by cmux-ad).

Takes back #32179: #32179 (Leo, merged 2026-11-02) turned hostPressure.enabled on by default; Lawrence decided it ships off and is opt-in from the palette.

  • HostPressureTunables.enabled defaults to false. With it off, no window's indicator subscribes, so HostPressureService is never made: no monitor, no 15 s timer, no reads, no banner, and the gauge stays hidden (HostPressureIndicatorView.join() is the only place that makes the service, and only while HostPressureSampling.samples).
  • hostPressure.showWarning / hostPressure.hideWarning: two palette actions that set the same Debug toggle, the same pattern as Enable / Disable Channels. They are bound with registry.bindEffect through a small package helper, DebugTunableSwitchActions (CmuxNextSettingsWindow), so the app gets one line. Hide removes the override, as the Debug Settings row does for a default value. Each window's indicator already follows the tunable store's Observation, so it starts or stops sampling and shows or hides the gauge with no other call. Debug Settings still shows the same toggle.
  • The actions are isDebugOnly (DEV and NIGHTLY), as the toggle itself: Release and RC never activate the tunable store, so the warning stays off there whatever is set. CLI surface exempt devOnly, no context menu (noObject), as appearance.glass.lens.toggle.
  • Titles in ActionCatalog.xcstrings with English, Japanese and the other 19 catalog locales.
  • schemas/defaults/cmux-next.json is bot-only (#21946): this PR does not commit it; the base autofix regenerates it after the merge (tunable.hostPressure.enabled then reads false).

#31937 (rust-migration host pressure step A) changes only Rust and FFI files; this PR does not touch them or CmuxNextHostPressure, so the two do not overlap.

Testing

  • Red first: HostPressureIndicatorTests/theToggleShipsOffAndOffNeverMakesTheService at the test-only commit 0ea04bd99a4 (base default on): job 31231449e4ecce4904bd373e failed as expected (defaultValue is true; the indicator samples and makes 1 service with nothing set).
  • Green at the head a6f695c8c81: HostPressureIndicatorTests, HostPressureBannerTests, HostPressureWarningActionsTests (new: Show subscribes the indicator, the monitor runs and the gauge shows; Show again changes nothing; Hide removes the override, the monitor stops and the gauge hides): job 0fbee53a5e9c13eea149c570, all 3 suites passed (one existing test skipped: showDetailsOpensThePopover needs a screen).
  • App compile (cmux-ci compile-check --app) at the head: job a29877c59c61d6d065782cf7 passed.
  • python3 scripts/cmux-next/prepush-gate.py: no new violations; arch-ratchet app_lines -1.

Observed / Not run

Observed: the jobs above. Not run: scripts/cmux-next/check-action-surfaces.sh on the fleet (my run was cancelled; the PR autofix and CI's generated-files and swift-test jobs cover the catalog exports), HostPressureBannerToastTests on a display worker (unchanged by this PR), a live tagged build.

After the merge of feat (head 4e1f681fde9)

Changelog

Changed: Host pressure warning is off by default; turn it on from the Command Palette.

Proof

No capture: default-off removes the gauge; the palette entry is standard.