Cut portal churn residue that leaks into typing latency - #302
Merged
Conversation
Workspace churn (the lag-gate scenario) closes panes and cycles workspaces, then types immediately. Two portal behaviors added latency residue inside that window: - removePaneChrome broadcast its reassert request app-wide (object: nil), so every anchor in every window republished on every pane close. The request is now scoped to the closing registry's window; nil stays a broadcast for compatibility. The dismantle-race survivor it exists for is always in the same window. - updateClusters re-added the control clusters on every coalesced geometry pass; re-adding an existing subview removes and re-inserts it, dirtying layout every runloop turn during animation storms. Clusters now reorder only when a pane bar actually sits above them.
Posting with a nil object is an app-wide broadcast — the storm the scoping exists to prevent — and a window that died before the post has no anchors left to reassert. Skip the post instead.
arzafran
added a commit
that referenced
this pull request
Aug 14, 2026
Resolves WindowPaneChromePortal: keep the single-row strip layout and adopt main's ensureAboveBars z-order helper from the portal-churn fix (#302).
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.
What this does
The typing-lag gate on main failed first-attempt on both post-glass merges (3.57x, then 2.44x vs the 1.70x cap) and passed on rerun — the glass portal raised workspace-churn typing latency into gate-adjacent territory. This removes the two cheapest real costs the portal adds during churn. Both changes are strictly less work; no behavior changes.
Summary
Test plan