Skip to content

docs(cockpit-chat): c-debug skip doc + record scripts for c-generative-ui/c-a2ui#478

Merged
blove merged 1 commit into
mainfrom
claude/chat-deferred-followup
May 19, 2026
Merged

docs(cockpit-chat): c-debug skip doc + record scripts for c-generative-ui/c-a2ui#478
blove merged 1 commit into
mainfrom
claude/chat-deferred-followup

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 19, 2026

Summary

Handles the three Task #4 deferred chat caps:

  1. c-debug — adds `cockpit/chat/debug/angular/e2e/README.md` explaining why aimock e2e is not applicable (demo is viewer-only via ``; no `` affordance to drive). If we want coverage later, that's a demo-shape decision.

  2. c-generative-ui — adds `e2e/scripts/record-c-generative-ui.sh`. Drives the two welcome-chip prompts (dashboard + filter) through `aimock --record` to capture tool_call + continuation turns.

  3. c-a2ui — adds `e2e/scripts/record-c-a2ui.sh`. Drives the two welcome-chip prompts (LAX→JFK + SFO→SEA) to capture inline A2UI envelope JSONL.

Both record scripts are adapted from `cockpit/chat/interrupts/angular/e2e/scripts/record-c-interrupts.sh`, stripped of the interrupt-resume handshake (these caps complete in a single run).

Why not just ship the fixtures?

Recording requires `OPENAI_API_KEY` and produces content sensitive to backend response structure (dashboard spec JSON / A2UI envelope shapes). Hand-authoring risks subtle mismatches; recording is authoritative.

Next step (separate follow-up PR)

  1. Run `OPENAI_API_KEY=sk-... bash cockpit/chat/generative-ui/angular/e2e/scripts/record-c-generative-ui.sh` (and similarly for c-a2ui). Each writes `e2e/fixtures/c-.json`.
  2. Use `scripts/generate-aimock-scaffold.ts --cap c-generative-ui` (and `--cap c-a2ui`) to emit the rest of the e2e/ scaffold + matrix entry.
  3. Replace generator's TODO fixture stub with the recorded fixture; hand-author spec assertions; ship the PR.

Files

  • New: `cockpit/chat/debug/angular/e2e/README.md` (15 lines).
  • New: `cockpit/chat/generative-ui/angular/e2e/scripts/record-c-generative-ui.sh` (170 lines, executable).
  • New: `cockpit/chat/a2ui/angular/e2e/scripts/record-c-a2ui.sh` (166 lines, executable).

Test plan

  • CI: docs-only + scripts; expect cockpit/library gates to pass without changes.
  • Reviewer: confirm c-debug README rationale.
  • Reviewer (optional): run one record script locally to verify mechanics.

🤖 Generated with Claude Code

…rface caps

Three Task #4 deferred caps handled:

1. c-debug — adds e2e/README.md explaining why aimock e2e is not
   applicable. The demo's purpose is to show the <chat-debug> viewer
   composition (timeline, state inspector, diff viewer); it has no
   <chat-input> affordance, so the aimock helper that types into chat
   input + asserts on rendered bubbles can't drive it. Adding aimock
   coverage would require a demo-shape decision (compose chat-debug
   with chat, or add a sibling chat-input) — out of scope for this PR.

2. c-generative-ui — adds e2e/scripts/record-c-generative-ui.sh.
   Drives the two welcome-chip prompts ("Show me a dashboard of
   airline operations." and "Filter to only the cancelled flights.")
   through aimock --record mode, captures the tool_call + continuation
   turns into a fixtures/c-generative-ui.json.

3. c-a2ui — adds e2e/scripts/record-c-a2ui.sh. Same pattern, drives
   "I want to fly LAX to JFK" + "I want to fly SFO to SEA" through
   record mode, captures the inline A2UI envelope JSONL emissions.

Both record scripts are adapted from cockpit/chat/interrupts/angular/
e2e/scripts/record-c-interrupts.sh, removing the interrupt-resume
handshake (generative-ui and a2ui flows are single-run completions).

Next step (separate follow-up PR):
- Run OPENAI_API_KEY=sk-... bash <script> locally for each cap.
- Use scripts/generate-aimock-scaffold.ts --cap c-generative-ui (and
  --cap c-a2ui) to emit the e2e/ scaffold + matrix entry, then ship
  the recorded fixtures + spec assertions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment May 19, 2026 8:47pm

Request Review

@blove blove merged commit fafbc94 into main May 19, 2026
19 checks passed
blove added a commit that referenced this pull request May 19, 2026
…final chat slice) (#479)

* test(cockpit-chat): add aimock e2e for c-generative-ui + c-a2ui

Final 2 deferred surface caps from Task #4. Fixtures recorded via
the per-cap record scripts shipped in PR #478:

- c-generative-ui: 2 entries (dashboard + filter prompts). render_spec
  + query_recent_disruptions tool calls captured. Spec asserts the
  chat-generative-ui primitive mounts post-dashboard prompt.
- c-a2ui: 2 entries (LAX-JFK + SFO-SEA prompts). BookingFormSpec tool
  calls captured. Spec asserts a2ui-surface primitive mounts.

Both caps now in the cockpit-e2e matrix. Brings chat-cap aimock
coverage to 10 of 11 caps (c-debug remains documented-as-skipped
per PR #478 — viewer-only demo).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(c-generative-ui-e2e): use .first() on chat-generative-ui locator

The dashboard spec renders a TREE of <chat-generative-ui> hosts (one per
node in the dashboard layout — 5 for the airline-operations spec), so
the bare `locator('chat-generative-ui')` hits Playwright's strict-mode
requirement that toBeVisible() target a single element.

Use .first().toBeVisible() to assert the root mounts; additionally
assert count > 0 so the tree-mount assertion stays meaningful if the
spec ever shrinks to a single-node dashboard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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