File: src/cmd/cmd.zig:401-415
Severity: HIGH
Status: ✅ FIXED
In cmdJoinPane, dst_win.panes.items was updated with sp before looking up dummy_node = findLeafParent(..., dummy_pane).
Mutating window pane state prior to validating tree lookup results.
Validated findLeafParent(..., dummy_pane) first and assigned dummy_node.leaf = sp before updating dst_win.panes.items, preventing partial state mutations if lookup fails.
Lookup failure in cmdJoinPane previously left orphaned panes in the panes list without a matching layout node, causing rendering/resize failures.