web: swapping two draft panes moves the data but not the forms #73

Closed
opened 2026-08-24 00:41:38 +01:00 by naps62-yolo · 0 comments
Collaborator

web/src/multiview.ts — dragging one draft pane onto another swaps the data but not the forms.

The pane-drag handler swaps dragged.draft and target.draft. draftForms is keyed by leaf id, and pruneForms keeps both entries alive because neither leaf has a sessionId. The next render() re-mounts each cached form under its original leaf, so both panes still show their old contents while the leaves now hold each other's values — and each form's onChange writes the displayed values back into the swapped leaf.

Swap the draftForms entries alongside the leaf data.

`web/src/multiview.ts` — **dragging one draft pane onto another swaps the data but not the forms.** The pane-drag handler swaps `dragged.draft` and `target.draft`. `draftForms` is keyed by leaf id, and `pruneForms` keeps both entries alive because neither leaf has a `sessionId`. The next `render()` re-mounts each cached form under its original leaf, so both panes still show their old contents while the leaves now hold each other's values — and each form's `onChange` writes the displayed values back into the swapped leaf. Swap the `draftForms` entries alongside the leaf data.
naps62-yolo added this to the Spawn v2 milestone 2026-08-24 00:41:38 +01:00
naps62-yolo added the area/webdifficulty/mediumtype/fix labels 2026-08-24 00:41:38 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#73