--- phase: 1 slug: foundation-dashboard status: draft nyquist_compliant: false wave_0_complete: false created: 2026-03-13 --- # Phase 1 — Validation Strategy > Validation contract for Foundation & Dashboard phase. Focus on component rendering, bundle size, and touch-friendly interactions. --- ## Test Infrastructure | Property | Value | |----------|-------| | **Framework** | Vitest (bundled with Vite) | | **Config file** | `vitest.config.ts` — Wave 0 creates if missing | | **Quick run command** | `npm test` or `pnpm test` | | **Full suite command** | `npm run test:coverage` | | **Estimated runtime** | ~10 seconds (unit tests only) | --- ## Sampling Rate - **After every task commit:** Run `npm test` - **After every plan wave:** Run `npm run test:coverage` - **Before `/gsd-verify-work`:** Full suite must be green - **Max feedback latency:** 15 seconds --- ## Per-task Verification Map | Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | |---------|------|------|-------------|-----------|-------------------|-------------|--------| | 1-01-01 | 01 | 1 | UI-01 | component | `npm test -- Header.test.tsx` | ❌ W0 | ⬜ pending | | 1-01-02 | 01 | 1 | DASH-01 | component | `npm test -- RainfallView.test.tsx` | ❌ W0 | ⬜ pending | | 1-02-01 | 02 | 1 | DASH-02 | component | `npm test -- VoltageDisplay.test.tsx` | ❌ W0 | ⬜ pending | | 1-02-02 | 02 | 1 | DASH-03 | component | `npm test -- BatteryStatus.test.tsx` | ❌ W0 | ⬜ pending | | 1-03-01 | 03 | 2 | DASH-04 | component | `npm test -- StationInfo.test.tsx` | ❌ W0 | ⬜ pending | | 1-03-02 | 03 | 2 | DASH-05 | component | `npm test -- ClockDisplay.test.tsx` | ❌ W0 | ⬜ pending | | 1-03-03 | 03 | 2 | DASH-06 | component | `npm test -- CommStatus.test.tsx` | ❌ W0 | ⬜ pending | | 1-04-01 | 04 | 2 | DASH-07 | component | `npm test -- LoginIndicator.test.tsx` | ❌ W0 | ⬜ pending | | 1-04-02 | 04 | 2 | UI-02 | e2e/visual | Manual verification | N/A | ⬜ pending | | 1-04-03 | 04 | 2 | UI-03 | e2e/visual | Manual verification | N/A | ⬜ pending | | 1-04-04 | 04 | 3 | UI-04 | build | `npm run build && bundlesize` | ❌ W0 | ⬜ pending | | 1-04-05 | 04 | 3 | UI-05 | component | `npm test -- Navigation.test.tsx` | ❌ W0 | ⬜ pending | *Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* --- ## Wave 0 Requirements - [ ] `src/app/components/__tests__/Header.test.tsx` — Header component tests - [ ] `src/app/components/__tests__/RainfallView.test.tsx` — Dashboard view tests - [ ] `src/app/stores/__tests__/sensorStore.test.ts` — Zustand store tests - [ ] `vitest.config.ts` — Vitest configuration - [ ] `src/test/setup.ts` — Test utilities and mocks - [ ] `.bundlesize.json` — Bundle size budget configuration --- ## Manual-Only Verifications | Behavior | Requirement | Why Manual | Test Instructions | |----------|-------------|------------|-------------------| | Touch target sizing | UI-02 | Visual measurement | Verify all buttons ≥44px using DevTools inspector | | Kiosk mode rendering | UI-03 | Device-specific | Test on 1024x600 display, verify no horizontal scroll | | Remote mode rendering | UI-03 | Device-specific | Test on Full HD display, verify layout expands | | Pi Zero performance | UI-04 | Hardware-specific | Deploy to Pi, measure LCP with Chrome DevTools | | Real-time data updates | DASH-01 | Time-based | Verify polling updates display every 5 seconds | --- ## Validation Sign-Off - [ ] All tasks have `` verify or Wave 0 dependencies - [ ] Sampling continuity: no 3 consecutive tasks without automated verify - [ ] Wave 0 covers all MISSING references - [ ] No watch-mode flags - [ ] Feedback latency < 15s - [ ] `nyquist_compliant: true` set in frontmatter **Approval:** pending 2026-03-13