Skip to content

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

Merged
lawrencecchen merged 5 commits into
feat-cmux-nextfrom
host-pressure-off
Nov 2, 2026
Merged

lawrencecchen merged 5 commits into
feat-cmux-nextfrom
host-pressure-off

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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 (Stop parallel feat-cmux-next PRs from conflicting in generated files and registries #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 0ea04bd (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 a6f695c: 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 4e1f681)

  • App compile: job 5bdf2ad8a4587535831e0283 passed.
  • The same 3 suites: job 27734c78738216f4705ed244, all passed (the same 1 skip).
  • Independent SHIP at 4e1f681.

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.

lawrencecchen and others added 3 commits November 2, 2026 14:01
…h nothing set

Red on the base: #32179 made hostPressure.enabled default on, so a seen
window's indicator subscribes and starts the 15 s monitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ost Pressure Warning in the palette

Lawrence 2026-11-02: "get rid of host-pressure warning by default, can be
enabled in cmd shift p tho". Takes back #32179.

- hostPressure.enabled defaults to false. With it off, no window's
  indicator subscribes, so HostPressureService (its monitor, the 15 s timer
  and the critical banner) is never made; the gauge stays hidden.
- Show Host Pressure Warning / Hide Host Pressure Warning
  (hostPressure.showWarning / hostPressure.hideWarning; palette, DEV and
  NIGHTLY like the tunable store) set the same Debug toggle through
  DebugTunableSwitchActions (CmuxNextSettingsWindow), bound with
  bindEffect. Hide removes the override, as the Debug Settings row does.
  Every window's indicator follows the store's Observation.
- English and Japanese (and the other catalog locales) in
  ActionCatalog.xcstrings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sign, the package's declared dependency

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lawrencecchen lawrencecchen added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 4e1f681: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32374 -f ref=host-pressure-off -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on 4e1f681fde; ci-status is green without them.

CI passes on 4e1f681fde (run 41463720386 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

Default changes

This pull request changes 3 defaults at 4e1f681fde9e (what everyone gets without configuring anything):

  • tunable-source.CmuxNextApp/Handlers/WindowHandlers.swift:bind: "431119bd046353ba550987f7f78a06a99aa90b04b4159ae12b1c9a1a72c95e09" -> "2374266b01dac79bc31fc994a16f7a7aaf580c2d51c0654f74e338d6cd07144b"
  • tunable-source.CmuxNextApp/HostPressure/HostPressureTunables.swift:enabled: "f8a5c78f175beaed03a08840c67750bcf439b78189e4b5170a0f70661bb9a3cf" -> "fe70bf196de7b61d5e722e981a89cdbb972c2af3016333b94b7769f0dc9ea734"
  • tunable.hostPressure.enabled: true -> false

Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Review (<reviewer>): SHIP at 4e1f681fde9e90fc760fa64f68a615d28892cc54, from a member, not a self-review (the newest verdict naming the head decides; a later BLOCK beats an earlier SHIP), or with an approving review on this commit from @austinywang or @teamleaderleo (the call owners in .github/defaults-call-owners.json, never the author). A receipt posted as a review re-runs this check; after a plain comment, re-run it. The needs a call label alone does not pass, and a new push needs a new receipt.

Merge receipt: merged as 4196f882ac98 with these defaults changed, WITHOUT a SHIP receipt or an approving call owner review on its head.

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

Shipped in:

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (claude-review-subagent): SHIP at a6f695c

Independent correctness review (read only, no local build). Checked:

  • Default off really means nothing runs. HostPressureService is only made by HostPressureService.shared (HostPressureService.swift:24), and its only caller is HostPressureIndicatorView.makeService (HostPressureIndicatorView.swift:61). That runs only from join(), and join() runs only while reconcile() sees sampling.samples = enabled && windowVisible (HostPressureSampling.swift:13). HostPressureMonitor( is made only in the service init (HostPressureService.swift:71). The banner is made only in showBanner, which is called from the levels task that join() starts. With HostPressureTunables.enabled default false (HostPressureTunables.swift:49) and no override, the app makes no service, monitor, 15 s timer or banner. Release and RC: TunableStore.override returns nil while the store is inactive (TunableStore.swift:136), so they always use the default (off).
  • The palette pair sets the same tunable as Debug Settings. DebugTunableSwitchActions (CmuxNextSettingsWindow) writes HostPressureTunables.enabled.key in TunableStore.shared. Hide calls reset because off is the default, as the Debug row does for a default value. Each window's indicator follows the change through the ObservationStream over (enabled, force) in observeWindow() (HostPressureIndicatorView.swift:151-157), then reconcile() → join/leave. The handler uses bindEffect and returns .done. It does no await, I/O or blocking. The app gets one wiring line (WindowHandlers.swift:24).
  • isDebugOnly is correct. The descriptors pass ActionSurfaceParityTests.declarationsAreConsistent: debug-only ⇔ cli: .exempt(.devOnly), and .noObject is declared inline, as for appearance.glass.lens.toggle. Nothing must be added to ActionSurfaceCatalog+Exemptions.swift or +MenuExemptions.swift. Every cmux NEXT channel (DEV, NIGHTLY, and NEXT Stable, which is com.cmuxterm.app.nightly.cmux-next-stable) has DevTools.isEnabled, so the palette entry exists wherever the store is active.
  • Localization. The ActionCatalog.xcstrings entries parse as JSON and have all 21 catalog locales, state translated. The en titles are in Title Case and pass PaletteMenuVocabularyTests. The ja titles are 「ホスト負荷の警告を表示」 and 「ホスト負荷の警告を非表示」, which read correctly and match HostPressure.xcstrings (負荷).
  • Tests compile and test what they say. All APIs exist with the access levels the tests use: ActionRegistry(catalog:), perform(_:) -> Bool, TunableStore.override(_:), HostPressureService.monitorIsRunning(), subscriberCount, stop(), and the internal test init of HostPressureIndicatorView. CmuxNextAppTests already imports CmuxNextSettingsWindow. theToggleShipsOffAndOffNeverMakesTheService now covers the no-override case (nil), which fails on the base default. In the new actions test, the waits are bounded yields, as in the existing windowAndAppNotificationsStartAndStopSampling. Flake risk is low.
  • CLAUDE.md rules. No main-thread blocking, no try!, no literal font. The action is a typed bindEffect with .done. CmuxNextApp gets wiring only.
  • No file overlap with cmux-app-ffi links the host budget C ABI; dispatch pressure flags read worst first (step A of the host pressure FFI move) #31937. It changes only Rust and FFI files (acpmux/src/host_pressure.rs etc.).

Non-blocking notes:

  1. The PR body still has the placeholders RED_JOB, GREEN_JOB, SURF_JOB and COMPILE_JOB. Fill them with the real job links before ready-to-land. Also, check-action-surfaces.sh sets CMUX_CHECK_GENERATED_EXPORTS=1, so countsByDomainMatchInventory and the export freshness test fail while plans/cmux-next/actions.md and action-surfaces.json are stale (settings count +2, devOnly list). Make sure the SURF job ran with the exports regenerated.
  2. The PR autofix "action exports (Mac)" job is pending. If it pushes a regeneration commit, the head changes. The defaults guard carries a SHIP receipt only across base merges, so that new head needs a new receipt. schemas/defaults/cmux-next.json correctly stays bot-only.
  3. SettingsActionCatalog.swift grows from 553 to 570 lines (Swift file limit 400). This is warn-only (the god-file step is continue-on-error).
  4. A small race at launch: if someone runs Hide before the store's first file read lands, value(in:) still reads the default (false), so Hide does nothing, and a stored true then applies. This has very little effect, and the Debug row has the same behavior.

@lawrencecchen lawrencecchen added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds labels Nov 2, 2026
lawrencecchen and others added 2 commits November 2, 2026 14:36
…s added, not a reformatted copy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (claude-review-subagent): SHIP at 4e1f681

Re-review after the merge of origin/feat-cmux-next (ab527e0) and the xcstrings repair (4e1f681). Read-only; nothing compiled or run locally.

  • Diff against origin/feat-cmux-next (178be28, which is also the merge-base): 11 files, the same change as the earlier SHIP at a6f695c. Outside ActionCatalog.xcstrings, the PR diff now and the PR diff at a6f695c are byte-identical: hostPressure.enabled default false, the hostPressure.showWarning / hostPressure.hideWarning debug-only palette descriptors, DebugTunableSwitchActions bound in WindowHandlers, the updated and new tests, and the idle-wakeups.md / host-pressure tour rows. Nothing from the merge shows up as a PR change.
  • ActionCatalog.xcstrings: the file is valid JSON. Its top-level fields match feat. Compared with git show origin/feat-cmux-next:…, the PR adds exactly action.hostPressure.showWarning and action.hostPressure.hideWarning, with 21 locales each, and the entries match a6f695c. It removes 0 keys and changes 0 keys. The diff has no removed lines.
  • Changes on feat since a6f695c that touch related paths: two commits in CmuxNextDesign (cmux NEXT: vertical tabs per workspace or for all workspaces #32127 DesignSettings, cmux NEXT sidebar: a picked-up row stands on the window's own glass, no frost of its own #32330 OverlaySurface). The catalog also gained VerticalTabsActionCatalog and attention.goTo. None of these touch the HostPressure files, SettingsActionCatalog, WindowHandlers, DebugSettings, ActionRegistry or the tunable store. No other action uses the hostPressure.showWarning or hostPressure.hideWarning id.

No blocking findings.

@lawrencecchen lawrencecchen added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Nov 2, 2026
@lawrencecchen
lawrencecchen merged commit 4196f88 into feat-cmux-next Nov 2, 2026
205 of 212 checks passed
@lawrencecchen
lawrencecchen deleted the host-pressure-off branch November 2, 2026 15:09
lawrencecchen added a commit that referenced this pull request Nov 4, 2026
…move 11-04)

Prove-or-remove step 3 (deletion-wave-list.md, p12-perf-process). Row p12-18 is the
switch hostPressure that p12-perf-process-103 (a06867b, db70c38) made from the
Debug toggle hostPressure.enabled. No A/B was planned; it has no proof. The host
pressure gauge itself (monitor, service, indicator, popover, banner) came from feat
(#24298, #24507, #24518) and stays.

Removed: the switch json and its generated registry entry, its dogfood-set name, its
feature-switch-table row, HostPressureAndSnapshotFeatureTests (it tested only the two
removed switches) and the switch inputs of HostPressureIndicatorTests. The indicator
reads its Debug toggle again, as before the row and as on feat: enabled and the forced
level are one observation, so turning the toggle on or off applies live; the toggle
help and the host-pressure media tour are back to the toggle.

Default behavior: the switch was off in every channel, so DEV, NIGHTLY and Release do
not change (no gauge, no 15 s host read). It was on in the chrome-parity dogfood set:
a dogfood build now shows no gauge unless a person turns the toggle on, which is feat's
behavior since #32374 (Lawrence 2026-11-02). Red test:
HostPressureDogfoodDefaultTests (previous commit), red on the base, green here (fleet).

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 4e1f681f Deployed Nov 2, 2026 by lawrencecchen via wait for same-key tree publisher #101693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant