Observed with @stacksjs/stx 0.2.719 while adding a confirmation dialog to the Settlers remake (stacksjs/the-settlers-iii-remake#226).
A <DialogPanel> whose slot holds only static markup plus @click="pageFunction()" buttons compiles those buttons into the component's own client script (__stx_evt_stx_dialog_panel_...). That script resolves the handler through the nearest [data-stx-scope], which is the dialog's scope and has no __stx_execute, then falls back to the bare name pageFunction(). The name lives in the page's setup closure, so every click throws ReferenceError: pageFunction is not defined.
The same slot works as soon as any element in it carries a reactive binding (for example :disabled="x()", :if, or x-model), because templateHasReactiveContext then leaves @click for the signals runtime. The existing restart dialog in the same page works only for that reason. This is the same class as stacksjs/stx#1824, reached through slot content instead of a useStore-only page.
Expected: slot content authored in a page keeps the page's scope regardless of what the receiving component's template contains, or the compiler reports the unresolved handler at build time.
Reproduction: a page with const open = state(true); function close() { open.set(false) } and <Dialog :open="open()"><DialogPanel><button type="button" @click="close()">Close</button></DialogPanel></Dialog>. Click Close and read the console.
The game currently carries a harmless :disabled binding on its confirm button as a workaround; it is not a fix. Please verify against current main (0.2.751) before changing code.