cmux/Sources/Panels
Elvis Tran b919541044
Fix panel resize stuttering when tiled with browser panels (#1969)
* Fix panel resize stuttering when tiled with browser panels (#1968)

During divider drag, the portal sync system was doing O(N²) work per
frame: each geometry callback synced ALL web views, and multiple
callbacks fired per layout pass (setFrameSize + setFrameOrigin + layout).

Two changes:

1. synchronizeWebViewForAnchor now only syncs the primary web view and
   defers the all-sync. Each panel fires its own geometry callback, so
   secondary syncs are redundant on the hot path.

2. HostContainerView.setFrameOrigin/setFrameSize use markGeometryDirtyIfNeeded
   which defers the callback to layout(), coalescing 2-3 notifications
   per frame into one. An async fallback ensures origin-only changes
   (without a subsequent layout) are still delivered.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix premature geometryRevision increment in markGeometryDirtyIfNeeded

Address reviewer feedback (Greptile, CodeRabbit): geometryRevision and
lastReportedGeometryState are now only updated when the callback
actually fires, not eagerly.  This prevents updateNSView from seeing a
premature revision delta and triggering a redundant synchronizeForAnchor
before the coalesced notification arrives.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:24:17 -07:00
..
BrowserPanel.swift Merge pull request #1898 from manaflow-ai/feat-tmux-notification-attention-state 2026-03-22 15:36:36 -07:00
BrowserPanelView.swift Fix panel resize stuttering when tiled with browser panels (#1969) 2026-03-24 22:24:17 -07:00
BrowserPopupWindowController.swift Fix keyboard shortcuts not working with Korean (한글) input mode 2026-03-21 21:16:10 +09:00
CmuxWebView.swift Fix browser pane video fullscreen 2026-03-21 12:17:55 -07:00
MarkdownPanel.swift Fix tmux notification attention routing 2026-03-20 20:20:54 -07:00
MarkdownPanelView.swift Add optional single-click focus for inactive panes (#1796) 2026-03-19 01:01:10 -07:00
Panel.swift Tune navigation flash accent 2026-03-20 20:36:08 -07:00
PanelContentView.swift Fix terminal pane drag/drop handoff delay (#1837) 2026-03-19 20:37:32 -07:00
TerminalPanel.swift Fix tmux notification attention routing 2026-03-20 20:20:54 -07:00
TerminalPanelView.swift Fix terminal pane drag/drop handoff delay (#1837) 2026-03-19 20:37:32 -07:00