Skip to content

test(e2e): observer-seed harness + populated light/dark captures#1064

Draft
tellaho wants to merge 2 commits into
tho/activity-ui-polishfrom
tho/activity-observer-seed-harness
Draft

test(e2e): observer-seed harness + populated light/dark captures#1064
tellaho wants to merge 2 commits into
tho/activity-ui-polishfrom
tho/activity-observer-seed-harness

Conversation

@tellaho

@tellaho tellaho commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Category: infrastructure
User Impact: Adds an e2e test seam that seeds live observer transcripts so the Activity panel's populated states can be captured and reviewed against real rendered UI.

Problem: Reviewers had no way to see #1061's polished Activity-panel states (CompactMessageSummary chat bubbles, mediaInset view_image thumbnails, grouped prompts, tool/shell summaries) rendered against real data — only unit fixtures.

Solution: A net-new, landable test seam (seedAgentObserverEvents + __BUZZ_E2E_SEED_OBSERVER_FRAMES__) injects already-decrypted ObserverEvent[] straight into the production transcript pipeline (appendAgentEvent → processTranscriptEvent → getAgentTranscript) — no relay or decrypt mocking. A Playwright spec drives the panel to populated light + dark states and captures glossy screenshots. Stacked on #1061 (tho/activity-ui-polish) because the polished components it renders (agentSessionToolSummary.ts, CompactMessageSummary, presentation, mediaInset, view_image thumbnails) exist only there.

File changes

desktop/src/features/agents/observerRelayStore.ts
New seedAgentObserverEvents(agentPubkey, events) — registers the agent as known, flips connection to "open", and feeds frames through the real transcript pipeline.

desktop/src/testing/e2eBridge.ts
window.__BUZZ_E2E_SEED_OBSERVER_FRAMES__({ agentPubkey, events }) hook + typedef.

desktop/tests/helpers/observerSeedFixture.ts
Populated transcript fixture — user prompts, assistant messages, thoughts, tool_call/update (incl. shell + view_image), plans, lifecycle frames.

desktop/tests/e2e/observer-seed-screenshots.spec.ts
Spec that navigates to the agent session thread panel, seeds frames, and captures light + dark populated states. Nav fixed spec-only by mirroring the channels.spec.ts recipe (subscription-live-before-emit).

desktop/playwright.config.ts
One-line wiring for the new spec.

Reproduction Steps

  1. Check out tho/activity-observer-seed-harness (stacked on tho/activity-ui-polish).
  2. From desktop/, run the observer-seed screenshot spec via Playwright.
  3. Two tests pass (light + dark) and write populated transcript-panel captures.

Screenshots/Demos
Populated 380x800 transcript-panel captures (light + dark) are attached to #1061 for review.


Stacked on #1061. Diff is seam + fixture + spec only (5 files, +455). No production behavior change beyond the test-only seed hook. All commits authored Taylor Ho (DCO-clean).

tellaho added 2 commits June 15, 2026 16:12
Adds a test-only seam for seeding live-style observer transcripts into the
Activity panel without a running agent or relay:

- seedAgentObserverEvents(agentPubkey, events) in observerRelayStore.ts:
  registers the agent as known, flips the connection to "open", and feeds
  already-decrypted ObserverEvent[] through the production
  appendAgentEvent -> processTranscriptEvent pipeline. No mocked decrypt
  command -- renders through the exact live transcript path.
- __BUZZ_E2E_SEED_OBSERVER_FRAMES__ bridge hook in e2eBridge.ts (+ typedef).
- desktop/tests/helpers/observerSeedFixture.ts: populated ObserverEvent[]
  covering lifecycle, user prompt, assistant message, thought, plan, and
  tool_call/tool_call_update (read_file, shell buzz-send, view_image thumb).
Adds the playwright spec that drives the seeded agent-session thread panel
and captures populated light (catppuccin-latte) + dark (houston) screenshots
for #1061 review. Exports canonical OBSERVER_SEED_AGENT_PUBKEY +
observerSeedFrames from the fixture and registers the spec in the smoke
project testMatch.
@tellaho tellaho marked this pull request as draft June 16, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant