Tab strip: stop per-render context-menu, hint-monitor and animation work
AU
25d ago+290+290+012345678901234567890123456789-19-19-01234567890123456789
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 → tabControlShortcutHintVisibilityAnimation frame. 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:
- Tab context-menu state is built when a menu opens, instead of for every tab on every render. That stops calling host providers once per tab per render.
- The shortcut-hint monitor no longer reads and decodes the shortcut setting from user defaults during every tab-bar rebuild.
- The whole-tab hint
.animationis removed. The hint fade keeps its own animation. - A host callback emits one sampled
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.- CI: all Bonsplit tests pass on the hosted macOS runner.
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.