Repository navigation
Conversation
|
@STRML is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
|
All contributors have signed the CLA ✍️ ✅ |
|
Rebased onto |
sidebarOrderedPanelIds() built a Tab per tab and a full treeSnapshot() to produce a list of ids. Both read titles: Tab.init(from:) copies all fourteen TabItem properties, and the snapshot puts a title in every ExternalTab. Sidebar views call this from inside their bodies, so an animating tab title invalidated them at spinner rate for an ordering that never looks at a title. allPaneIds walks the tree first-then-second exactly as ExternalTreeNode.orderedPaneIds does, so the snapshot was not buying the pane order either. Lift the ordering out of the ExternalTreeNode extension into PaneSpatialOrder, which takes pane ids directly; the tree method now delegates to it, so there is still one implementation and one set of tests. The call site asks bonsplit for tabIds(inPane:) and never mentions a tab.
25a2e64 to
500f9c5
Compare
|
Superseded by #13931 (ac0ceae), which landed this exact mechanism on main 2026-09-24: |
Status: updated onto
main(78f4c82504) as merge commit25a2e642a5. Still a draft: it callsbonsplitController.tabIds(inPane:), which lands in manaflow-ai/bonsplit#233 and is not in the pinned submodule yet. Nothing else in the diff needs that PR.Reviewer's guide
Sources/Workspace.swift(sidebarOrderedPanelIds) and the newPaneSpatialOrderenum; the tree method delegates to it, so there is one implementation.Packages/macOS/CmuxPanes/Tests/CmuxPanesTests/SpatialOrderTests.swift.Summary
sidebarOrderedPanelIds()reads every tab's title to produce a list of ids.It asks bonsplit for
tabs(inPane:)and builds atreeSnapshot(). Both read titles:Tab.init(from:)copies all fourteenTabItemproperties, and the snapshot puts a title in everyExternalTab. Sidebar views call this from inside their bodies, so an animating tab title invalidates them for an ordering that never looks at a title.allPaneIdsalready walks the tree first-then-second, exactly asExternalTreeNode.orderedPaneIdsdoes, so the snapshot was not buying the pane order either.Change
The call site asks for
tabIds(inPane:)and never mentions a tab. The ordering moves out of theExternalTreeNodeextension intoPaneSpatialOrder, which takes pane ids directly; the tree method delegates to it, so there is still one implementation and one set of tests.Measurement
From a 20.7s
sampleof a running cmux, main thread:sidebarOrderedPanelIdspathVerticalTabsSidebarbodyAfter, in a 16013-sample run with tab titles updating,
sidebarOrderedPanelIdscosts 8 samples (0.05%) andtreeSnapshotdoes not appear on the main thread at all.Two caveats on those numbers, since they are not a clean A/B. The before and after traces are from different sessions under different load, so treat the 142.4 ms against 8 samples as a direction rather than a ratio. The
VerticalTabsSidebarfigure is the whole body, which this change only partly accounts for; the rest is #5832.Related
VerticalTabsSidebarbody cost.https://claude.ai/code/session_01Bj791kgph6Xk9CJf9c41Db