szn

Bug 319 — Desync between Window.panes array rotation and Layout tree DFS rotation

319. Desync between Window.panes array rotation and Layout tree DFS rotation

File: src/window.zig:332-342 Severity: HIGH Status: ✅ FIXED

Window.rotatePanes rotated self.panes.items manually while also invoking self.layout.rotatePanes(), causing array and tree indices to desynchronize.

Root Cause

Redundant double rotation of both pane array and layout leaf nodes.

Fix

Updated Window.rotatePanes to rotate self.panes.items and invoke self.layout.rotatePanes() together to keep pane order and layout tree in sync.

Impact

Pane ordering and focus movement desynchronizes from visual on-screen layout geometry.