You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changing the active session rebuilds the entire terminal grid, reattaching every WebView2 #103
So switching sessions detaches and reattaches every live WebView2 from the visual tree. WebView2 is an HwndHost — reparenting it is not a cheap layout operation.
Why it's now worth fixing
The wiring comment says "Single mode needs this", and that's the whole story: in Single layout the active session determines which pane is visible, so the rebuild is genuinely required. In every multi-pane layout — TwoByTwo, SixColumn, ThreeByThree — the set of visible panes does not change when the active session changes. Only the highlight does, and UpdateActiveTerminalHighlight already handles that on its own.
So for the layouts power users actually run, the rebuild is pure waste on a path that now fires much more often: #93 made clicking or typing in a pane promote it, so this runs on ordinary interaction rather than only on sidebar clicks.
Suggested fix
Skip the rebuild when the visible pane set can't have changed:
Single (and any layout showing exactly one pane) → rebuild, as today.
Multi-pane → skip, unless the effective group filter changed. Note InlineHeaders mode derives EffectiveActiveGroupId from ActiveSession, so there the pane set can change with the active session; FilterStrip mode uses the explicit tab and cannot.
UpdateSidebarActiveState / UpdateActiveTerminalHighlight should keep running unconditionally — they're the parts that actually need to react.
Activity