Repository navigation
cmux-tui + app: hidden terminals' scroll events no longer wake the app's event pump (SWITCH FRAMES SF-5 B) - #32380
Merged
lawrencecchen merged 7 commits intoNov 2, 2026
Conversation
…ll-changed on subscribe, and identify lists it (SWITCH FRAMES SF-5, expected red) Busy gate on a 2x display (2026-11-02): with 24 hidden terminals printing, the app's event subscription got 1910 scroll-changed events in 5 s; its store applies nothing for them, but each woke its event pump and asked for a main-thread frame. The capability constant exists; the daemon does not honor or list it yet.
…scroll-changed on subscribe; the Mac app says so (SWITCH FRAMES SF-5) The daemon accepts subscribe-scroll-on-attach-v1 in set-client-info, lists it in identify, and skips scroll-changed on that client's subscribe stream; every other client keeps it. The Mac app advertises it (DaemonCapability, optional tier; export updated): its store applies nothing for scroll-changed and reads scroll on each terminal's attach stream, so 24 hidden busy terminals no longer send it about 380 events a second, each a pump wake and a main-thread drain frame request. Older daemons ignore the capability (no change); older apps do not send it (no change).
… (the subscriber mailbox keeps the newest per surface; the red run saw 2 of 20)
…y (it sat under the next line's cfg(test))
…subscribe-scroll-on-attach
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 14:31 — with
GitHub Actions
Inactive
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 14:33 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
sentry-dsyms
November 2, 2026 14:33 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 14:36 — with
GitHub Actions
Inactive
…ason (the app applies no scroll-changed) and is listed with identify's capabilities (review of #32380)
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 14:39 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
ci-routing-agent
November 2, 2026 14:39 — with
GitHub Actions
Inactive
Contributor
Author
|
Review (subagent, correctness first): SHIP at 839b72a An independent review agent read the full diff (read only; it built and ran nothing), in two rounds.
Proofs: Rust red 153c8b00 (both tests fail on asserts), Rust green 96deee45 (2/2), Swift compile at 8c485a1 passed. |
lawrencecchen
temporarily deployed
to
sentry-dsyms
November 2, 2026 14:50 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 14:50 — with
GitHub Actions
Inactive
lawrencecchen
temporarily deployed
to
artifacts
November 2, 2026 14:53 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SWITCH FRAMES SF-5 (part B): a hidden terminal that prints made the daemon send
scroll-changedto the Mac app's event subscription for every frame of its output. With 8 hidden busy terminals the app's subscription got 604 events in 5 s; with 24, 1910 (about 15 per terminal per second; 2x display, cmux24, round sw-sf5-events). The app's store applies nothing for this event: it reads a terminal's scroll position on that terminal's attach stream. Each event still woke the store's event pump and asked for a main-thread drain frame: the wakeup ledger showedDaemonStore.drainrising from about 0 to 57.8 frames/s, and 4106 display links made, with 24 busy hidden terminals.Fix (an additive capability, both sides in this PR):
subscribe-scroll-on-attach-v1inset-client-infogets noscroll-changedon itssubscribestream. Every other client keeps it.identifylists the capability. Spec:cmux-tui/spec/commands.md,subscribe.DaemonCapability.subscribeScrollOnAttach(optional tier) is advertised, so the app's connection says it;plans/cmux-next/daemon-capabilities.jsonis updated.scroll-changed.This is the daemon event feed, not key routing or output bytes, so it does not overlap typing-fix-2's area.
Testing
cmux-tui-coreserver::tests::subscribe_scroll_on_attach(2 tests): red at 9d222a2 on Linux (step 153c8b00): the app connection got 2 scroll-changed events, and identify did not list the capability. Green at 1e68b01 (step 96deee45): 2 of 2 passed. (The other connection gets at least one scroll event, not 20: the subscriber mailbox keeps the newest scroll per surface.)Busy-terminal A/B (lead's gate), one mini
cmux24, 2x virtual display at 120 Hz, bench builds of the same feat base 507438d: base
test/sf5-ab-base-bench(build bcd1b411) vs fix = #32384 (at f2fa334) + #32380 (build 9b6ddda3). Hidden terminals each print 20 lines/s; a quiet workspace is shown; 20 s windows.Observed / Not run
--full); the A/B is below.Known, not fixed here
Changelog
Proof
No capture: no visible change.