Skip to content

feat: generative UI phase 2 — SaaS metrics dashboard#127

Merged
blove merged 18 commits into
mainfrom
feat/generative-ui-phase2
Apr 14, 2026
Merged

feat: generative UI phase 2 — SaaS metrics dashboard#127
blove merged 18 commits into
mainfrom
feat/generative-ui-phase2

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 14, 2026

Summary

  • Agent library: Add custom event support (customEvents signal on AgentRef) to route LangGraph state_update events to the render store
  • Chat library: Wire custom events to signalStateStore in ChatComponent, with auto-created internal store when views are registered
  • Python graph: Replace simple prompt-based generative-ui graph with multi-node dashboard graph (router → generate_shell → plan_tools → call_tools → emit_state → respond) using 4 mock SaaS data tools
  • Angular components: 6 dashboard view types — dashboard_grid, container (with direction), stat_card (with delta/skeleton), line_chart (SVG), bar_chart (SVG), data_grid (HTML table) — all with skeleton shimmer states via $state binding progressive hydration
  • Cleanup: Remove weather card component from Phase 1 spike

Test Plan

  • 14 component tests pass (npx nx test cockpit-chat-generative-ui-angular)
  • Agent lib tests pass (npx nx test agent)
  • Chat lib tests pass (npx nx test chat)
  • Cockpit build succeeds (npx nx build cockpit)
  • Python graph compiles as CompiledStateGraph
  • Deploy to shared-dev, send "show me the dashboard" — shell renders with skeletons, then hydrates progressively
  • Follow-up "show last 6 months" updates only the MRR trend chart

🤖 Generated with Claude Code

blove and others added 17 commits April 13, 2026 17:11
Add CustomStreamEvent type and wire custom$ BehaviorSubject through the
agent library so LangGraph adispatch_custom_event() payloads are captured
and exposed as an Angular Signal on AgentRef.customEvents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…provided

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds delta indicator and skeleton loading state to StatCardComponent.
Also adds test infrastructure (tsconfig.spec.json, test target) and
fixes pre-existing build errors in libs/chat (missing customEvents on
MockAgentRef, noUnusedLocals violation on customEventEffect).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 14, 2026 3:57am

Request Review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blove blove merged commit 9b62152 into main Apr 14, 2026
14 checks passed
blove added a commit that referenced this pull request May 1, 2026
* docs(superpowers): plan for genui phase 2 test gap closure

Adds unit-test specs for ContainerComponent and DashboardGridComponent —
the two views shipped in PR #127 (9b62152) without specs.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>

* docs(superpowers): fix genui test plan to stub <render-element>

The original spec code imported ContainerComponent / DashboardGridComponent
directly into TestBed without addressing that <render-element> is itself a
standalone component which calls `inject(RENDER_CONTEXT)`. With non-empty
childKeys, Angular instantiated the real RenderElementComponent and threw
NG0201. Plan now uses TestBed.overrideComponent to swap in a local
StubRenderElementComponent that matches the selector and public inputs.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>

* test(cockpit): cover ContainerComponent layout and child rendering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(cockpit): cover DashboardGridComponent layout and child rendering

---------

Co-authored-by: Claude Opus 4 <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