File: src/layout.zig:266-302, src/window.zig:423-435, src/server/server.zig:929-931
Severity: MEDIUM
Status: ✅ FIXED
win.removePane(self.allocator, pane);
pane.valid = false; // write AFTER layout already destroyed the pane
pane.deinit(); // second deinit (guarded only by `deinited`)
Under GPA this was a use-after-free write plus double deinit because Layout.removeFromNode called deinitNode which destroyed the pane before Server.destroyPane performed teardown.
Layout.removePane called removeFromNode which invoked deinitNode destroying the leaf pane during tree restructuring.
Layout.removePane to use extractFromNode, strictly detaching the leaf node and collapsing the parent split without destroying the Pane object.removeFromNode.Pane destruction is now unified: callers (Server.destroyPane, or Window.deinit) perform the single authoritative pane.valid = false; pane.deinit();.src/layout.zig and src/window.zig to verify clean single deinitialization without leaks.