You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`$state`, `$derived`, `$bindable`, `$props` that you mutate must use `let` (never `const`)
40
+
-`$bindable` requires `{value}` with `oninput` instead of `bind:value`
41
+
-`$effect` for side effects only (no async return)
43
42
44
43
### Phase 5: Routing
45
44
- Verify +page.svelte structure
@@ -74,11 +73,25 @@ task frontend:build
74
73
75
74
## Common Issues
76
75
76
+
### Rune Const vs Let (Critical 2025-11-12)
77
+
-**Symptom**: Browser shows Vite overlay `[plugin:vite-plugin-svelte] Cannot assign/bind to constant` and Playwright screenshots display the 500 Internal Error page.
78
+
-**Fix workflow**:
79
+
1. Search `src/lib` and `src/routes` for `const .* $state`, `const .* $bindable`, `const { .* = $props`.
80
+
2. Replace with `let` if the value is mutated or bound.
81
+
3. Restart `bun run dev` to clear cached overlay.
82
+
4. Re-run `grep -R "\\$state" src | grep 'const'` to confirm there are no remaining matches.
83
+
-**Remember**: `$bindable` inputs must use `{value}` + `oninput={(e) => value = e.currentTarget.value}` (no `bind:value`).
-**Default Timeout**: 30 seconds (Playwright default, no override)
34
34
35
-
### Timeout Policy (Standardized 2025-11-09)
36
-
All Playwright tests must complete within **30 seconds total**. Individual waits must fit within this budget:
35
+
### Timeout Policy (Standardized 2025-11-12)
36
+
All Playwright tests must complete within **60 seconds total**. The primary integration test (`should discover and display screenshots`) sets `test.setTimeout(60000)` to give the agent time to explore while still keeping runs deterministic. Individual waits must fit within this budget:
37
37
38
38
| Operation | Timeout | Notes |
39
39
|-----------|---------|-------|
40
-
| Test Total |30s|Playwright default, no `test.setTimeout()`override|
40
+
| Test Total |60s|`test.setTimeout(60000)`for screenshot discovery test|
-**`const` vs `let`**: Any rune created with `$state`, `$derived`, `$bindable`, or `$props` that you mutate later MUST use `let`. Using `const` triggers `[plugin:vite-plugin-svelte] Cannot assign/bind to constant` and the entire app shows a 500 overlay, causing Playwright to fail instantly.
65
+
- ✅ `let { value = $bindable("") } = $props();`
66
+
- ✅ `let showSlackPreview = $state(false);`
67
+
- ❌ `const ... = $state(...)`
68
+
-**`bind:value` + `$bindable`**: You cannot combine `bind:value` with `$bindable`. Use `{value}` + `oninput={(e) => value = e.currentTarget.value}`.
69
+
-**Symptoms in tests**: Playwright screenshot shows `500 Internal Error` overlay with the exact file/line from Vite. If you see this, fix the rune declaration first before debugging Playwright.
70
+
-**Skill updates**: See `frontend-development_skill` and `frontend-debugging_skill` for the full playbook.
71
+
59
72
### Current Tests
60
73
1.**Landing Page Load** - Verifies frontend health (no agent required)
61
74
2.**Run Page Navigation** - Clicks "Detect My First Drift" → verifies Run Timeline heading (no agent required)
62
75
3.**Screenshot Discovery** - Full integration test: start run → wait for screenshots → verify images visible (requires agent + Appium)
63
76
77
+
> ℹ️ Fast-fail guard: the test polls the `run_events` timeline for `agent.app.launch_failed`. If Appium/device is missing it fails in ~2s with a detailed error (package, attempt, duration, hints). Use this signal before chasing 30s timeouts.
0 commit comments