Skip to content

Add Electron and renderer contract tests #22

Description

@Coldaine

Origin: docs/todo.md entry dated 2026-04-12
Plan: docs/plans/plan-testing-observability.md (testing layers)

Description

Lock down the preload bridge API so renderer/main don't silently drift. Add tests for main-process replay/export behavior (IPC handlers for shadow:snapshot, shadow:open-replay, shadow:export-replay) and renderer state transitions (busy / error / open / export) so UI regressions are caught without a full e2e.

Acceptance criteria

  • Preload bridge API exported as a typed contract; test fails if surface changes unexpectedly
  • Main-process replay open path tested with a fixture JSONL
  • Main-process export path tested with a temp directory
  • Renderer state-machine tests cover busy / error / open / export transitions
  • Tests run headlessly in CI (no real Electron BrowserWindow required)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions