Repository navigation
Tab strip: stop per-render context-menu, hint-monitor and animation work - #287
austinywang wants to merge 5 commits into
Conversation
Fails today: every tab render builds TabContextMenuState, which calls the host's fork-default and remote-disconnect providers for each tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Every tab render built TabContextMenuState, calling the host's fork-default and remote-disconnect providers, allTabIds and adjacentPane per tab. The menu now builds it from a provider when it opens. TabControlShortcutKeyMonitor's initializer read user defaults and decoded JSON; @State evaluates it on every TabBarView init. Its initial symbol is now a constant; start() resolves the configured one. The whole-tab hint animation copied the tab's full view value on every render; the crossfade keeps its own animation where it happens. Sentry: CMUXTERM-MACOS-41NN, -2QV2, -2QAN, -2SCZ, -2PRX, -26QQ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up: an update that queues a hint while the modifier is already held does not reset the symbol, so start() resolves it first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins manaflow-ai/bonsplit#287 review follow-up (9d90480). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Correctness review (subagent) and resolutionNo correctness bugs found. Findings:
Probe numbers (hosted macos-15, release, 2×2 split, 13 tabs, nil host providers)
Within runner noise; no measurable change in this harness. The harness has no host providers, so it does not include the per-tab user-defaults reads (Sentry -2QV2) that the context-menu change removes. Removing the whole-tab animation did not measurably cut body time, so that change is cleanup rather than a measured win. The 41NN trigger remains unidentified; see the PR description. |
cba6021 to
7664209
Compare
Correctness review follow-upThe review of the render-storm diagnostic found two issues and both are resolved:
The diagnostic remains low volume and reports only elapsed window duration, render count, tab count, and pane count. It does not alter tab hint behavior or layout. |
…1NN hangs (#20238) * Bump Bonsplit: stop per-render tab-strip work behind hang reports Pins manaflow-ai/bonsplit#287 (663bc41): context-menu state is built when a menu opens, the hint monitor no longer reads user defaults on every tab-bar init, and the whole-tab hint animation is gone. Sentry: CMUXTERM-MACOS-41NN, -2QV2, -2QAN, -2SCZ, -2PRX, -26QQ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bump Bonsplit: resolve the hint symbol when the monitor starts Pins manaflow-ai/bonsplit#287 review follow-up (9d90480). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Diagnose sustained tab-bar render storms * Tighten tab-bar render storm diagnostics * Name tab-bar diagnostics as render windows --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Sentry reports hangs of 8 s or more with the main thread rendering the pane tab strip: CMUXTERM-MACOS-41NN (new in cmux 0.65.1) and about 800 earlier events with the same
TabItemView.body→tabControlShortcutHintVisibilityAnimationframe. Related groups sample the same render path: -2QV2 and -2QAN (context-menu state per tab), and -2SCZ, -2PRX and -26QQ (hint monitor initialization reading user defaults).This change removes avoidable work from the tab strip and adds a low-volume diagnostic seam for the remaining render multiplier:
.animationis removed. The hint fade keeps its own animation.TabBarRenderDiagnosticrender window when tab-bar body evaluations stay continuously active for at least 500 ms and 32 evaluations. cmux records that as a deferred Sentry breadcrumb with render, tab and pane counts.Hint visibility and appearance are unchanged.
Testing
TabBarRenderWorkTests.testRenderingTabsDoesNotQueryContextMenuProviderswas committed before the fix and failed with 78 host-provider calls; it passes with the lazy state change.TabBarRenderWorkTests.testMenuBuildEvaluatesTabStateOnceverifies menu state is evaluated only when the menu is built.TabBarRenderWorkTests.testSustainedTabBarRendersEmitOneDiagnosticverifies the continuous-render threshold and one-shot sampling behavior.Changelog
Fixed: Pane tab bars do less work on every redraw and report sustained render storms for hang diagnosis
Proof
CI only; no visual change.