feat(examples-chat): canonical @ngaf/chat demo + smoke generator (Phase 1)#213
Merged
Conversation
…tsconfigs, bootstrap)
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)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New canonical demo at
examples/chat/replacing the staleexamples/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 viaDEMO_AGENTDI token across all modes; threadId persisted inlocalStorageso reload reconnects.python/— single-node__start__ → generate → __end__LangGraph;state.modelflows the demo's model picker; mirrors the shape that the 0.0.29 regenerate fix exercises.smoke/— interactivecli.mjsthat 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'ssrc/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 writesSMOKE_RUN.mdin the target dir capturing timestamp, git SHA, node/npm versions, resolved@ngaf/*versions — one-paste failure reports.CHECKLIST.mdships insmoke/(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}.ymlande2e/agent-e2e/src/chat-agent.e2e.spec.ts(renamed toexamples-chat.e2e.spec.ts, now targets assistant id'chat') updated. Three website doc snippets aligned toassistantId: 'chat'.Spec:
docs/superpowers/specs/2026-05-08-canonical-chat-demo-design.mdPlan:
docs/superpowers/plans/2026-05-08-canonical-chat-demo.mdPhase 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 passexamples-chat-angular:lint test build— lint + 8 vitest specs (5 PalettePersistence + 3 DemoShell) + dev build all greenexamples-chat-smoke:lint(no eslint config yet for smoke; can defer)Verified locally during execution
npx nx run examples-chat-python:smoke— 2 passednpx nx run examples-chat-angular:test— 8 passed (5 + 3)npx nx run examples-chat-angular:build— succeeds (development config)updateState({remove}, as_node='__start__')+runs/wait input=nullproduces a fresh AI message with a new id (NOT 1u/0a) — same 0.0.29 fix pathPending — visual browser smoke against
~/tmp/ngafnpx nx run examples-chat-smoke:run, generate consumer at~/tmp/ngafcd examples/chat/python && uv run langgraph dev --port 2024+cd ~/tmp/ngaf && npm start~/tmp/ngaf/CHECKLIST.mdin Chrome — markdown surfaces (headings, bullets, ordered, code, tables, task lists), cross-mode persistence, debug overlay mount/unmount, palette collapse/expand, keyboard/a11y, error handlingSMOKE_RUN.mdfrom 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.)