docs: correct param?: Type mistake impact — breaks dev HMR, not just builds

Mistake #19 (and BOOTSTRAP item #10) incorrectly stated the dev server is
unaffected. In practice, saving the file triggers Vite HMR which hits the
same SyntaxError and crashes the page with a 500. Confirmed in session where
sign_in_out.svelte used presenter_id_hint?: string | null.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-23 14:39:52 -04:00
parent 6d5c87bad0
commit 52d1dca32a
2 changed files with 9 additions and 5 deletions

View File

@@ -308,8 +308,10 @@ Read this section first, then open the reference doc when your task touches one
field, SWR-await-after-write races, and stateful/conditional sync gates that desync local
state from history rather than current config. See the Pres Mgmt Config sync overhaul
(2026-06-16) in `PROJECT__AE_Events_PressMgmt_Config_Cleanup.md` for the full incident.
10. **`param?: Type` in `.svelte` function/snippet parameters** — breaks `vite build` (SSR step)
silently: dev server is fine, Docker/production builds fail with "Expected ',', got '?'".
10. **`param?: Type` in `.svelte` function/snippet parameters** — breaks both dev and production.
In dev mode, saving the file triggers HMR which produces `SyntaxError: missing ) after formal
parameters` and crashes the page with a 500. In production, `vite build` fails at the SSR step
with "Expected ',', got '?'". `npx svelte-check` does NOT catch this — it requires a full build.
Use `param: Type | undefined = undefined` instead. See mistake #19 in the reference doc.
The reference doc also includes a short archive list for older, less-relevant historical incidents.