Skip to content

feat(examples-chat): canonical @ngaf/chat demo + smoke generator (Phase 1)#213

Merged
blove merged 32 commits into
mainfrom
claude/examples-chat-canonical-demo
May 8, 2026
Merged

feat(examples-chat): canonical @ngaf/chat demo + smoke generator (Phase 1)#213
blove merged 32 commits into
mainfrom
claude/examples-chat-canonical-demo

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 8, 2026

Summary

New canonical demo at examples/chat/ replacing the stale examples/chat-agent/. Three peer subdirectories:

  • angular/ — workspace-linked Angular 21 demo with floating control palette (mode switch embed/popup/sidebar; model picker; debug toggle; "↻ New conversation"); path-based routes (/embed, /popup, /sidebar); shared agent via DEMO_AGENT DI token across all modes; threadId persisted in localStorage so reload reconnects.
  • python/ — single-node __start__ → generate → __end__ LangGraph; state.model flows the demo's model picker; mirrors the shape that the 0.0.29 regenerate fix exercises.
  • smoke/ — interactive cli.mjs that scaffolds a fresh, npm-installed consumer at ~/tmp/ngaf (overridable). Combines a frozen Angular CLI scaffold (smoke/template/ with * placeholder versions, valid semver) with a runtime copy of the demo's src/app/ — so the smoke surface can never drift from what workspace dev sees.

The demo's src/app/ is copied verbatim into the smoke consumer at generate-time. The CLI also writes SMOKE_RUN.md in the target dir capturing timestamp, git SHA, node/npm versions, resolved @ngaf/* versions — one-paste failure reports.

CHECKLIST.md ships in smoke/ (and is copied into each generated consumer): comprehensive Phase 1 manual validation sweep covering pre-flight, render, streaming, regenerate (with explicit 1u/1a server-state assertion), markdown surfaces (headings, bullets, ordered, task lists, fenced code, tables, blockquotes, links, HRs), cross-mode persistence, model picker, debug overlay, palette UX, keyboard/a11y, error handling, lifecycle, browser hygiene, visual polish. Empty Phase 2+ sections (reasoning, tool calls, interrupts, citations, A2UI, subagents, time-travel, multi-thread) sit at the bottom for future phases to fill.

examples/chat-agent/ removed; .github/workflows/{ci,e2e}.yml and e2e/agent-e2e/src/chat-agent.e2e.spec.ts (renamed to examples-chat.e2e.spec.ts, now targets assistant id 'chat') updated. Three website doc snippets aligned to assistantId: 'chat'.

Spec: docs/superpowers/specs/2026-05-08-canonical-chat-demo-design.md
Plan: docs/superpowers/plans/2026-05-08-canonical-chat-demo.md

Phase 2+ features (reasoning, tool calls, interrupts, citations, generative UI, subagents, time-travel, multi-thread) deferred to their own spec → plan → PR cycles per the roadmap table at the bottom of the spec.

Test plan

Automated (CI)

  • examples-chat-python:smoke — pytest smoke tests pass
  • examples-chat-angular:lint test build — lint + 8 vitest specs (5 PalettePersistence + 3 DemoShell) + dev build all green
  • examples-chat-smoke:lint (no eslint config yet for smoke; can defer)

Verified locally during execution

  • npx nx run examples-chat-python:smoke — 2 passed
  • npx nx run examples-chat-angular:test — 8 passed (5 + 3)
  • npx nx run examples-chat-angular:build — succeeds (development config)
  • Direct backend probe via curl: thread creation, gpt-5-mini submit + AI streaming response received
  • Direct backend probe of the regenerate path: updateState({remove}, as_node='__start__') + runs/wait input=null produces a fresh AI message with a new id (NOT 1u/0a) — same 0.0.29 fix path

Pending — visual browser smoke against ~/tmp/ngaf

  • Run npx nx run examples-chat-smoke:run, generate consumer at ~/tmp/ngaf
  • cd examples/chat/python && uv run langgraph dev --port 2024 + cd ~/tmp/ngaf && npm start
  • Walk through ~/tmp/ngaf/CHECKLIST.md in Chrome — markdown surfaces (headings, bullets, ordered, code, tables, task lists), cross-mode persistence, debug overlay mount/unmount, palette collapse/expand, keyboard/a11y, error handling
  • Capture SMOKE_RUN.md from generated dir

(Chrome extension MCP was offline at the moment of execution; the visual sweep above runs after reconnection. Server-side regenerate-path probe done in its place gives high confidence the demo wires up correctly.)

blove added 30 commits May 8, 2026 11:22
Also fixes the test harness: add test-setup.ts to tsconfig.spec.json
include list so the @analogjs/vite-plugin-angular compiler can emit it
(files absent from tsconfig are silently emitted as empty strings, which
caused setupFiles to be no-ops). Updated vite.config.mts to use forks
pool with passWithNoTests and switched project.json to @nx/vitest:test.
…MODEL/provideAgent, doc styles import, align spec wildcard)
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 8, 2026 7:40pm

Request Review

@blove blove merged commit faeac7a into main May 8, 2026
14 checks passed
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