Skip to content

e2e: Yuki dock persist + SSE EventSource consumer (Playwright) #11588

Description

@h0lybyte

Tracker: #11583

Problem

Yuki shipped Phase A through D.2 with zero browser tests. The dock relies on every fragile primitive at once: `transition:persist`, ClientRouter swap, dynamic `import('./yuki-dock')`, `localStorage` state for collapsed/expanded + float mode + history + greeted flag, an `EventSource` consumer for SSE chat, and a Three.js + VRM render loop. Regressions in any of these would not be caught.

Acceptance

`apps/kbve/astro-kbve/e2e/yuki.spec.ts` covers:

  • Dock FAB renders on initial paint, no JS in the critical path
  • Click FAB → dock expands, panel mounts (`[data-kbve-yuki-panel-mounted="true"]`)
  • Navigate to another route via ClientRouter → dock survives (persist) with state intact
  • Submit a prompt → `/api/v1/yuki/chat?q=…` SSE stream is consumed, bubble fills, `event: done` terminator wired
  • First-open greet flag (`kbve:yuki-dock:greeted`) flips to `'1'` exactly once across page loads on the same device
  • Float toggle → layer detaches and persists across one nav swap

3D-mode tests are out of scope here — Three.js + WebGL in headless mode is its own rabbit hole; track separately if needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions