mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
70e2fb13c8
User-facing renames so the showcase reads the way a cold visitor would
expect:
- `byoc-hashbrown` → `declarative-hashbrown` (and `byoc-json-render` →
`declarative-json-render`). The display titles already said
"Declarative UI: …"; only the URL slugs and folder paths still
leaked the internal BYOC ("Bring Your Own Components") jargon.
Renamed:
/demos/byoc-hashbrown → /demos/declarative-hashbrown
/demos/byoc-json-render → /demos/declarative-json-render
/api/copilotkit-byoc-* → /api/copilotkit-declarative-*
src/app/demos/byoc-* → src/app/demos/declarative-*
qa/byoc-*.md → qa/declarative-*.md
tests/e2e/byoc-*.spec.ts → tests/e2e/declarative-*.spec.ts
Internal Python module names + langgraph graph IDs stay legacy
(`byoc_hashbrown_agent.py`, `byoc_hashbrown`) — those are not
user-facing and renaming them is a separate cross-codebase pass.
- `a2ui-fixed-schema` slug intentionally unchanged.
- Tool Rendering trio parenthetical rename (Default → Catch-all →
Custom progression reads clearly as "how much do I customize?"):
Tool Rendering (Default) — unchanged
Tool Rendering (Custom default) → Tool Rendering (Catch-all)
Tool Rendering (Specific) → Tool Rendering (Custom)
- `tool-rendering-reasoning-chain` cell renamed from
"Generative UI: Rendering multiple tools" to
"Generative UI: Tool calls + reasoning" (the demo is about combining
reasoning + tool rendering, not about quantity of tools).
- `Open Generative UI: Default` / `Open Generative UI: Custom`
descriptions expanded so a visitor understands how Open Generative UI
differs from Tool Rendering (agent composes UI from a registered
library vs. attaching a renderer to a *named* backend tool).
- Showcase index now sorts demos within each tag by `manifest.features`
order. Previously demos appeared in manifest declaration order, which
ignored the team's curated "polished flagship → simplest start →
variants" arc.
Cross-cutting registry / harness / dashboard updates that fall out of
the rename:
- `shared/feature-registry.json` adds the two new IDs alongside the
legacy `byoc-*` (so the catalog stays valid; the other 17
integrations still declare `byoc-*` in their manifests).
- `shared/constraints.yaml` adds the new IDs to the
generative-ui-approach allow-list.
- `scripts/__tests__/generate-catalog.test.ts` updates the cell-count
expectations (45 features × 18 integrations = 810; 792 after docs-
only exclusion; 45 LGP cells = 38 wired + 1 stub + 6 unshipped).
- Harness probe `d5-byoc.ts` + `d5-byoc.test.ts` now route both slug
families through `preNavigateRoute` and exercise the new branches.
- `d5-feature-mapping.ts` and `shell-dashboard/live-status.ts` mirror
the dual-ID mapping so both legacy and renamed slugs roll up under
the same `byoc` D5 featureType.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.4 KiB
2.4 KiB
QA: BYOC json-render — LangGraph (Python)
Prerequisites
- Demo deployed at
/demos/declarative-json-render. - Railway backend healthy (
showcase-langgraph-python-production.up.railway.app). OPENAI_API_KEYandLANGGRAPH_DEPLOYMENT_URLconfigured on the Next.js app.@json-render/core+@json-render/reactpresent inpackage.json(pinned to0.18.0).byoc_json_rendergraph registered inlanggraph.json.
Test Steps
1. Page load
- Navigate to
/demos/declarative-json-render. - Chat composer is visible.
- Three suggestion pills appear with titles: "Sales dashboard", "Revenue by category", "Expense trend".
- No console errors.
2. Sales dashboard suggestion
- Click the "Sales dashboard" suggestion.
- Within 60 seconds, a
data-testid="json-render-root"wrapper appears in the assistant bubble. - A
data-testid="metric-card"renders inside the wrapper. - A chart (
data-testid="bar-chart"ordata-testid="pie-chart") renders inside the wrapper. - No raw JSON text is shown once rendering finishes — the streaming JSON is replaced by components.
3. Revenue by category
- Click the "Revenue by category" suggestion.
- Within 60 seconds, a
data-testid="pie-chart"renders with multiple category slices + legend.
4. Expense trend
- Click the "Expense trend" suggestion.
- Within 60 seconds, a
data-testid="bar-chart"renders with month labels.
5. Free-form prompt
- Type "Show me a metric for quarterly revenue" and send.
- Verify at least one
metric-cardrenders; no console errors.
6. Multi-turn
- After a previous render is visible, send a follow-up prompt ("Now break that down by region").
- A new assistant message appears with a new json-render rendering — prior renders stay in the transcript.
7. Malformed output handling
- If the agent ever replies with non-JSON text (force it by asking "tell me a joke"), the chat falls back to rendering that raw text via the default assistant bubble. No crash, no stuck spinner.
Expected Results
- Suggestion renders land within 60 seconds. Budget is slightly higher than the hashbrown demo because a JSON
{ root, elements }spec is more verbose than hashbrown's token stream. - No uncaught errors in the console.
- Streaming falls back to plain text until the JSON parses, then swaps to rendered components.