Files
Jarvis/webview/packages/hud/index.html
james.maesandClaude Opus 4.7 33e1afc1f1 feat(03-02): scaffold @jarvis/hud webview package (React 19 + R3F 9 + drei 10.7 + three r184 + Zustand 5 + Vite 8)
- New pnpm workspace package at webview/packages/hud/ with workspace dep on @jarvis/bus
- Vite 8 config uses base: './' for WKWebView file:// compat (Pitfall 3)
- CSP meta tag with connect-src 'none', script-src 'self' per RESEARCH §Security
- Zustand 5 store with subscribeWithSelector middleware; slices for hudState, chatEvents, a11y, theme, connection
- Exhaustive bus outbound dispatcher — const _exhaustive: never = msg (no `as never`); adding a BusOutbound case without a handler fails tsc --strict
- Minimal static 512-particle RingMesh (Plan 03-03 layers shader uniforms)
- queueMicrotask uiReady post after first React commit (avoids Pitfall 7 race)

Deviations: @testing-library/react pinned to ^16.3.0 (latest published) and
@testing-library/jest-dom to ^6.6.0 — RESEARCH called for 17/7 but npm only
publishes 16/6. vitest.config.ts removed from tsconfig include — vitest 3's
config re-exports vite 5 types alongside installed vite 8, tripping
exactOptionalPropertyTypes; vite build itself loads the config fine at runtime.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 18:54:11 -05:00

14 lines
549 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'none'; font-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none';" />
<title>Jarvis HUD</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>