fix(raw_app): propagate template picker X / Esc dismissal so autosave resumes

The picker mounted `<Modal kind="X" open ...>` (one-way prop, not
`bind:open`). When the user dismissed via X / Esc / click-outside, the
inner Modal flipped its own local `open` to false (hiding the UI) but
never wrote back to the picker's `open` $bindable. The route's
`templatePicker → false` watcher — the one that calls `restartSync`
two ticks after the picker closes — never fired, so autosave stayed
suspended and the user's edits after dismissal were silently dropped.

Switch the inner Modal to `bind:open` so the dismissal bubbles all the
way up to the route's state. "Start without AI" already worked because
its `onStart` handler explicitly sets the picker's `open = false`.
This commit is contained in:
Diego Imbert
2026-06-07 23:27:56 +02:00
parent cfa4c8eeff
commit f08a3d92f8
@@ -167,7 +167,12 @@
</script>
{#if open}
<Modal kind="X" open title="New App setup">
<!-- `bind:open` (not `open`) so the inner Modal's X / Esc / click-
outside dismissal propagates back to the parent. Without it the
Modal closes its own UI but the picker's `open` prop stays true,
so the route's `templatePicker → false` watcher never fires and
autosave stays suspended after the dismissal. -->
<Modal kind="X" bind:open title="New App setup">
<div class="flex flex-col gap-6 min-w-sm">
<div>
<h2 class="text-xs font-semibold text-emphasis mb-1">Summary</h2>