tiletopia/src/lib/layout
megaproxy 8d5c49155b Restore DOM-direct workarounds; throttle gutter drag
After this session's diagnostic confirmed the root cause (Svelte 5
prop reactivity does NOT propagate through Pane → SplitNode → LeafPane
in this app — each LeafPane captures props at mount and never sees
updates), restored the brute-force DOM workarounds that were proven
to work and threw in a throttle for the gutter drag.

What changed vs the broken intermediate state:
- App polling: re-sync .leaf.active, .leaf.broadcasting, .bcast-chip.on
  classes from tree+activeLeafId state every 250ms. Bypasses Svelte
  reactivity entirely.
- SplitNode drag: rAF-throttle the direct flex update so we stop
  spamming SIGWINCH to the PTYs (which was making shells redraw
  prompts repeatedly, creating the visual artifacts the user reported).
- Close: keep the targeted PTY-kill + DOM-hide-the-side approach so
  panes visually disappear and siblings fill via flex auto-allocation.

This isn't pretty, but it works. The proper fix is to either find /
file the Svelte 5 bug, or migrate the frontend to a framework whose
reactivity we can trust. Both deferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:49:00 +01:00
..
LeafPane.svelte Restore DOM-direct workarounds; throttle gutter drag 2026-05-22 16:49:00 +01:00
orchestration.svelte.ts Force active-border via direct DOM manipulation in polling loop 2026-05-22 16:15:23 +01:00
Pane.svelte Force active-border via direct DOM manipulation in polling loop 2026-05-22 16:15:23 +01:00
SplitNode.svelte Restore DOM-direct workarounds; throttle gutter drag 2026-05-22 16:49:00 +01:00
tree.test.ts Add vitest + 43 unit tests for tree.ts 2026-05-22 13:28:02 +01:00
tree.ts Add M4 orchestration: broadcast, idle notifications, palette 2026-05-22 13:08:40 +01:00