mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
worktree-recursive-baking-toucan
8977 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3d47397957 |
feat(showcase/langgraph-python): align chat surfaces + shadcn recipe overhaul
Switch HITL In-app to CopilotPopup; Shared State Streaming and Read+Write to CopilotSidebar; widen card-grid breakpoint and add overflow scroll on Read+Write so content stays usable when the sidebar consumes ~480px of viewport. Re-skin the read-only Recipe demo with shadcn primitives, preserving every data-testid and QA-doc-asserted string. Add clsx and tailwind-merge as direct deps (previously only transitively resolvable, breaking turbopack dev) and a globals.css rule to neutralize the Radix scroll-lock padding-right that react-remove-scroll-bar injects when it mis-detects body's margin-inline-end (CopilotSidebar) as scrollbar width. QA docs updated to reference the new chat surfaces. |
||
|
|
a429b5f438 |
fix(showcase/langgraph-python): force reasoning emission in reasoning-chain agent (#4747)
## Summary `tool-rendering-reasoning-chain` D5 probe has been **sustained red since it was added** (PR #4743) — every tick fails with `expected [data-testid="reasoning-block"] to mount within 30000ms`. Diagnostic dumps from prod confirmed the failure mode: - ✅ WeatherCard mounted (toolCalls fire correctly) - ✅ Assistant text "Tokyo is 22°C and partly cloudy" landed - ❌ Zero reasoning text — the `reasoningMessage` slot never received an event ## Root cause Comparing to the working `reasoning_agent.py` (which backs `reasoning-default` + `reasoning-custom`, both D5 green): | | `reasoning_agent.py` (works) | `tool_rendering_reasoning_chain_agent.py` (was broken) | |---|---|---| | `effort` | `"medium"` | `"low"` | | `summary` | `"detailed"` | `"auto"` | | tools | `[]` | `[get_weather, search_flights, get_stock_price, roll_dice]` | `summary: "auto"` lets the model decide whether to emit a reasoning summary. With tools present, the model frequently skips emission entirely — the chain-of-thought goes straight to the tool call without a summary step. That leaves `role: "reasoning"` messages off the wire, so the v2 `<ReasoningBlock>` slot never mounts. `summary: "detailed"` forces emission on every response. Bumping `effort` to `"medium"` to match the working agent. ## Test plan - [x] PR #4744 already added `reasoning` field to the aimock fixture for `weather in Tokyo` first leg — that part of the wire is fine - [x] Confirmed via prod diagnostic: the rest of the demo (tool rendering, assistant text) works - [ ] Post-merge: `tool-rendering-reasoning-chain` should flip green on the next e2e-deep tick ## Known follow-up (NOT in this PR) `gen-ui-agent` (Agent State) is intermittently flapping (~22% failure rate over recent ticks), with two distinct error modes ("no assistant response" and "agent-state-card never mounts"). Need to dig deeper to determine root cause — separate investigation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
46c5b56881 |
fix(showcase/langgraph-python): force reasoning emission in reasoning-chain agent
The tool-rendering-reasoning-chain D5 probe has been red since the probe was added (PR #4743) — the reasoningMessage slot's <ReasoningBlock> never mounts because the agent doesn't emit reasoning summaries. Compared to the working reasoning_agent.py (which powers reasoning-default + reasoning-custom and is green), the only meaningful difference was the reasoning config: reasoning_agent.py (works): reasoning={"effort": "medium", "summary": "detailed"} tools=[] tool_rendering_reasoning_chain_agent.py (was broken): reasoning={"effort": "low", "summary": "auto"} tools=[get_weather, search_flights, ...] `summary: "auto"` lets the model decide whether to emit a reasoning summary. With tools present the model often skips it (chain-of-thought goes straight into the tool call without a summary). `summary: "detailed"` forces emission on every response, which lights up the ReasoningBlock slot. Bumping effort medium so the surface visible to the user reads as a real chain-of-thought, matching reasoning-display. Probe diagnostics from prod confirmed the toolCalls were firing fine (WeatherCard mounted, assistant text landed) — only the reasoning emission was missing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1a66d7342f |
fix(showcase): auth-readiness SignInCard + bump LGP models to gpt-5.4 (#4746)
Two related changes for the LGP gold-standard view: ## 1. e2e-readiness accepts `/demos/auth` SignInCard Fixes the spurious **D2 / RT ✗** state on the LGP `auth` cell. The demo itself works fine end-to-end — the issue was the `e2e-readiness` probe waits for chat-input testids in [`READY_SELECTORS`](showcase/harness/src/probes/drivers/e2e-readiness.ts:236), but `/demos/auth` renders a `<SignInCard>` BEFORE mounting the chat surface (chat input only appears post-authentication). Result: 30s timeout (`per-demo deadline exceeded after 30000ms`). Added `[data-testid="auth-sign-in-card"]` to `READY_SELECTORS` so the probe accepts SignInCard as a valid "demo mounted" signal. End-to-end auth flow stays covered by `auth.spec.ts` under e2e-demos. ## 2. Bump all LGP agents to `gpt-5.4` Swapped every `ChatOpenAI` / `init_chat_model` call across the 26 LGP agents from the prior mix (`gpt-4o-mini`, `gpt-4o`, `gpt-4.1`, `gpt-5-mini`) to the unified `gpt-5.4`. Also updated the `OPENAI_REASONING_MODEL` env default in `reasoning_agent.py` and `tool_rendering_reasoning_chain_agent.py` so reasoning demos pick up the new model unless explicitly overridden. Verified locally — all 39 LGP demos render and respond correctly with `gpt-5.4`. The probe sweep on prod will confirm end-to-end. ## Test plan - [x] `pnpm vitest run e2e-readiness` in `showcase/harness/` → **31 / 31 passing** - [x] Local LGP container running gpt-5.4 against real OpenAI — all demos respond - [ ] Post-merge: `e2e:langgraph-python/auth` flips green on next e2e-demos tick (hourly at `:10`) - [ ] Post-merge: every D5 cell across LGP confirms model resolves on next e2e-deep tick ## Companion observation (NOT in this PR) While diagnosing the auth issue, also noticed 3 LGP D5 cells went red recently: - `gen-ui-interrupt`, `interrupt-headless` — testid mount timeouts - `shared-state-streaming` — document content didn't stream Subagent investigation found **no code-side regression** — fixtures, agents, and probe scripts are intact; the cells were green a few hours earlier with the same code. Most likely a transient aimock blip or cold-start. The driver-level retry-once added in PR #4743 should self-heal them on the next 1-2 ticks. Monitor; if persistent, check aimock Railway logs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
89e4c4e52c |
chore(showcase/langgraph-python): bump model to gpt-5.4 across all agents
Swap every ChatOpenAI / init_chat_model call across the LGP agents from the prior mix (gpt-4o-mini, gpt-4o, gpt-4.1, gpt-5-mini) to the unified `gpt-5.4` model. Also updates the OPENAI_REASONING_MODEL env default in reasoning_agent.py and tool_rendering_reasoning_chain_agent.py so reasoning demos pick up the new model unless explicitly overridden. Verified locally with the user's gpt-5.4 OpenAI access — all 39 LGP demos render and respond correctly. The probe sweep on prod will confirm the model name resolves end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
b76a281c4b |
fix(showcase/harness): e2e-readiness recognizes /demos/auth SignInCard
The e2e-readiness probe waits for any of a compound CSS selector covering chat-input testids. /demos/auth renders a <SignInCard> BEFORE mounting the chat surface (the chat-input testids only appear post-authentication), so the readiness probe was timing out at 30s with `per-demo deadline exceeded` and the auth cell rolled up to D2 even though the demo itself works fine end-to-end. Add `[data-testid="auth-sign-in-card"]` to READY_SELECTORS so the probe accepts the SignInCard as a valid "demo mounted" signal. The end-to-end auth flow (sign in -> sign out -> sign back in -> assistant response) is still covered by auth.spec.ts under the e2e-demos dimension, so the readiness probe shouldn't be doing that work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
0b4f68fa31 |
feat(showcase): align demo names + add Show Deprecated toggle (#4745)
Brings the dashboard's gold-standard view in line with the desired naming and surfaces deprecated rows behind a toggle (instead of dropping them at catalog generation). ## Summary - **28 renames in feature-registry.json + 20 in LGP `manifest.yaml`** — `name` and `demos[].name` aligned per the user-provided mapping. Same label everywhere so the dojo and dashboard agree. - **`Show deprecated` toggle in feature-grid.tsx** — checkbox in the matrix header, default OFF. Filters feature rows where `feature.deprecated === true`. Toggle ON surfaces all deprecated features across all integrations (audit trail); toggle OFF hides them so the gold-standard view stays clean. - **Reverted catalog-side filter from #4744** — the catalog now emits cells uniformly for all (integration × feature) pairs (back to 774 cells, 756 metadata.total_cells). Visibility is controlled at the dashboard layer. Toggling on shows complete cross-integration data without missing-cell artifacts. ## Naming highlights | Was | Now | |---|---| | Pre-Built CopilotChat | Pre-Built: CopilotChat | | Headless Chat (Simple/Complete) | Headless UI: Simple/Complete | | Multi-modal / File Uploads | Attachments | | Controlled Gen-UI (Display) | Generative UI: useComponent | | In-Chat HITL (useHumanInTheLoop / useInterrupt) | Human In the Loop: In-chat / Interrupts | | Headless Interrupt | Human in the Loop: Headless Interrupts | | Declarative Generative UI (A2UI — Dynamic / Fixed Schema) | Declarative UI: Dynamic / Fixed A2UI | | Fully Open-Ended Generative UI | Open Generative UI: Default | | Open-Ended Gen UI (Advanced ...) | Open Generative UI: Custom | | Tool Rendering (Default/Custom Catch-all/Specific) | Generative UI: Tool Rendering (...) | | Tool Rendering + Reasoning Chain | Generative UI: Rendering multiple tools | | Agentic Generative UI (...) | Generative UI: Agent State | | Frontend Tools (In-app / Async) | Frontend Tools: In-app Actions / Async | | In-App Human in the Loop (Frontend Tools + async HITL) | Human in the Loop: In-app | | Shared State (Read + Write / Recipe Editor) | Shared State: Read + Write / Read-only | | State Streaming | Shared State: Streaming | | Readonly State (Agent Context) | Shared State: Frontend Context | | BYOC Hashbrown / json-render | Declarative UI: Hashbrown / json-render | ## Deprecated toggle behavior 4 features marked `deprecated: true` in feature-registry.json: `agentic-chat-reasoning`, `hitl`, `hitl-in-chat-booking`, `reasoning-default-render`. - **OFF (default)**: rows hidden across the matrix - **ON**: rows render with normal cells. LGP shows N/A (unshipped) for the 4 since LGP doesn't declare them; other integrations show their actual probe state Header text shows `(N deprecated hidden)` when toggle is off. Toggle only renders when `deprecatedCount > 0`. ## Test plan - [x] `pnpm vitest run` in `showcase/scripts/__tests__/` → **18 / 18 passing** - [x] `pnpm vitest run` in `showcase/harness/` → **1588 / 1588 passing** - [x] `npx tsx showcase/scripts/validate-fixture-tool-surface.ts` → clean - [x] `npx tsx showcase/scripts/generate-registry.ts` → 18 integrations, 38 wired LGP, 774 cells - [ ] Verify the toggle on Vercel preview — it should appear in the matrix header, default unchecked, click expands rows by 4 (the 4 deprecated features rendering as new cells) 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
80a7f9af0e |
feat(showcase): align demo names + add Show Deprecated toggle
Two related changes that bring the dashboard's gold-standard view in line with the desired naming convention and surface deprecated rows behind a toggle (instead of hiding them at catalog generation). ## Naming alignment Applied 28 renames in feature-registry.json + 20 in LGP manifest per the user-provided mapping. Highlights: - "Pre-Built CopilotChat" -> "Pre-Built: CopilotChat" - "Headless Chat (Simple/Complete)" -> "Headless UI: Simple/Complete" - "Multi-modal / File Uploads" -> "Attachements" (intentional spelling) - "Controlled Gen-UI (Display)" -> "Generative UI: useComponent" - "In-Chat HITL (use*)" -> "Human In/in the Loop: In-chat / Interrupts" - "Headless Interrupt" -> "Human in the Loop: Headless Interrupts" - "Declarative Generative UI (A2UI - *)" -> "Declarative UI: */* A2UI" - "Fully Open-Ended Generative UI" -> "Open Generative UI: Default" - "Tool Rendering ..." -> "Generative UI: Tool Rendering (...)" - "Tool Rendering + Reasoning Chain" -> "Generative UI: Rendering multiple tools" - "Agentic Generative UI ..." -> "Generative UI: Agent State" - "Frontend Tools (...)" -> "Frontend Tools: ..." - "Shared State (...)" -> "Shared State: ..." - "State Streaming" -> "Shared State: Streaming" - "Readonly State (Agent Context)" -> "Shared State: Frontend Context" - "BYOC Hashbrown <-> json-render" -- labels intentionally swapped per user instruction (demos were historically reversed; new labels reflect what they actually do). LGP manifest demos[].name updated to match feature-registry names so the dojo and dashboard surface the same human-readable label. ## Show Deprecated toggle (feature-grid.tsx) Added a checkbox in the matrix header -- default OFF -- that filters feature rows where `feature.deprecated === true`. Toggle ON shows all deprecated features across all integrations (audit trail); toggle OFF hides those rows entirely so the gold-standard view stays clean. Reverted the catalog-side filter from PR #4744 (which dropped LGP cells for deprecated features at catalog-generation time). Now the catalog emits cells uniformly for all (integration x feature) pairs, and visibility is controlled at the dashboard layer. Toggling on shows complete cross-integration data without missing-cell artifacts. Affects 4 features marked deprecated:true in feature-registry.json: agentic-chat-reasoning, hitl, hitl-in-chat-booking, reasoning-default-render. LGP cell count: back to 43 (38 wired + 1 stub + 4 unshipped). The 4 unshipped rows are hidden by default; toggle to surface them. Tests: 18/18 catalog tests + 1588/1588 harness vitest passing. validate-fixture-tool-surface clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
7f50464a7b |
fix(showcase): close 2 D5 fixture gaps + filter deprecated features from LGP view (#4744)
Follow-up to [#4743](https://github.com/CopilotKit/CopilotKit/pull/4743) to close the 2 remaining LGP D5 red cells and clean up the dashboard so it reflects the LGP gold standard. ## Summary - **Fix `tool-rendering-reasoning-chain` probe** — added `reasoning` field to the weather/Tokyo + SFO/JFK first-leg fixtures so aimock emits REASONING_MESSAGE_* events; without them the v2 `<ReasoningBlock data-testid="reasoning-block">` never mounted (mirrors the convention from `reasoning-display.json`). - **Mirror `gen-ui-interrupt` source fixture with the bundle** — source file was missing the resume-leg toolCallId entries that already exist in `d5-all.json`. Cosmetic correction so re-bundling stays consistent. Same toolCallIds as `interrupt-headless.json` (both probes share the same agent + chip prompts). - **Filter deprecated features from LGP dashboard view** — 4 legacy features (`agentic-chat-reasoning`, `hitl`, `hitl-in-chat-booking`, `reasoning-default-render`) used to render as X-marked rows for LGP because LGP intentionally doesn't implement them (consolidated into modern shape: `reasoning-custom`+`reasoning-default`, `hitl-in-chat` with `useHumanInTheLoop`). Other 17 integrations still serve those legacy demos so we don't yank the features entirely — instead marked them `deprecated: true` and updated `generate-registry.ts` to skip cells where a deprecated feature is unshipped for an integration. **LGP cells: 43 → 39** (the 4 X rows disappear). Other integrations: unchanged (audit trail preserved). ## Verification all 39 LGP demos render > *user concern: "make sure we're not missing any demos in the new dashboard"* Confirmed — every LGP `manifest.yaml` feature has a feature-registry entry and renders a cell. After this PR, the LGP-focused view shows exactly the 39 gold-standard demos — no missing demos, no spurious legacy X rows. | Category | LGP cells | |---|---| | Dev Ex | 2 (cli-start, beautiful-chat) | | Chat & UI | 7 | | Platform | 4 (auth, multimodal, voice, agent-config) | | Controlled Generative UI | 5 | | Declarative Generative UI | 2 | | Open-Ended Generative UI | 3 | | Operational Generative UI | 5 (incl. tool-rendering-reasoning-chain) | | Interactivity | 3 | | Agent State | 4 (incl. shared-state-read) | | Multi-Agent | 1 | | BYOC | 2 | | **Plus**: interrupt-headless, headless-* variants | 1 | | **Total** | **39 ✓** | ## Test plan - [x] `pnpm vitest run` in `showcase/harness/` → **1588 / 1588 passing** - [x] `pnpm vitest run` in `showcase/scripts/__tests__/` → **19 / 19 passing** (new `deprecated features are emitted only for integrations that declare them` test added) - [x] `npx tsx showcase/scripts/validate-fixture-tool-surface.ts` → clean (282 fixtures × 627 demos, no drift) - [x] `npx tsx showcase/scripts/generate-registry.ts` → 18 integrations, 38 wired LGP features, 770 catalog cells (38 + 1 stub = 39 LGP) - [ ] After merge: confirm `tool-rendering-reasoning-chain` flips green on next e2e-deep tick. Confirm dashboard LGP view no longer shows X-marked rows for the 4 deprecated features. ## Known follow-ups (NOT in this PR) - `gen-ui-interrupt` cell — still red on prod with `post-pick signal never landed within 30s`. The bundle already had the right resume-leg fixture, so the failure is in the inline `useInterrupt` resume flow rather than aimock matching. Same class as the `auth.spec.ts` test #5 framework regression. Both deserve a focused investigation rather than expanding this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
80eb7a12ad | style: auto-fix formatting | ||
|
|
1ce83b8a73 |
fix(showcase): close 2 D5 fixture gaps + filter deprecated features from gold-standard view
Three fixes that follow up on PR #4743 to bring LGP closer to fully-green on the dashboard: 1. tool-rendering-reasoning-chain probe: was failing with `expected [data-testid="reasoning-block"] to mount within 30000ms`. Root cause: the demo's `<ReasoningBlock>` slot only mounts when a reasoning-role message lands in the transcript, which requires aimock to emit REASONING_MESSAGE_* events, which in turn requires the fixture's first-leg response to carry a `reasoning` field. The weather/Tokyo and SFO/JFK first-leg fixtures were missing it. Mirrors the convention documented in reasoning-display.json:2. Patched both source (harness/fixtures/d5/) and bundle (aimock/d5-all.json). 2. gen-ui-interrupt source fixture: the source fixture file was missing the resume-leg toolCallId entries that already existed in the bundle. Cosmetic mirror so re-bundling stays consistent. Same chip prompts + same toolCallIds as interrupt-headless.json (both probes share the same agent and aimock fixture set; the difference is the FRONTEND rendering — useInterrupt inline vs useHeadlessInterrupt separate-pane). 3. Dashboard gold-standard filter: 4 deprecated/legacy features (agentic-chat-reasoning, hitl, hitl-in-chat-booking, reasoning-default-render) used to render as X-marked rows in the LGP gold-standard dashboard view because LGP intentionally does NOT implement them — they were consolidated into the modern shape (reasoning-custom + reasoning-default; hitl-in-chat with useHumanInTheLoop). Other 17 integrations still serve those legacy demos, so we don't yank the features from feature-registry.json entirely. Instead: marked them `deprecated: true` and updated generate-registry.ts to skip emitting cells when a deprecated feature is unshipped for an integration. LGP cells: 43 → 39 (the 4 deprecated rows disappear). Other integrations: unchanged (audit trail preserved). Catalog total: 774 → 770. Tests: - 1588/1588 harness vitest passing - 19/19 generate-catalog + generate-registry tests passing (counts updated for the 4 dropped LGP cells + new deprecated- feature filter test) - validate-fixture-tool-surface clean (282 fixtures × 627 demos) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1ad78c39d7 |
feat(showcase): add 3 LGP D5 probes + driver retry-once (#4743)
## Summary
- 3 new D5 probes (multi-turn, agentic-chat-style) for
`/demos/{interrupt-headless, shared-state-read,
tool-rendering-reasoning-chain}` — closes the demo↔probe coverage gap so
every langgraph-python demo now has its own dashboard cell.
- Driver retry-once in `e2e-deep.ts` — transient `goto-error` /
`conversation-error` failures (≥2s on attempt 1) get one retry before
recording red, cutting ~10× the dashboard flap rate. Persistent
assertion-style fails skip retry.
- Drops the legacy dual-claim where `d5-shared-state.ts` owned both
`shared-state-read` AND `shared-state-write` for a single bidirectional
probe — `shared-state-read` now belongs to the standalone recipe-editor
probe.
## Scope rationale
LGP is the north-star integration; this PR codifies its current demo
surface in the test infra. **Other integrations may flip red on the new
probes — that's expected and welcome.** Cross-integration parity follows
in a separate wave; we're using LGP as the template.
## Files
- `showcase/harness/src/probes/scripts/d5-interrupt-headless.ts` (new) —
`useHeadlessInterrupt` flow: chip → interrupt popup → slot pick →
resume.
-
`showcase/harness/src/probes/scripts/d5-tool-rendering-reasoning-chain.ts`
(new) — combines reasoning-block slot + per-tool renderer (WeatherCard /
FlightListCard).
- `showcase/harness/src/probes/scripts/d5-shared-state-read.ts` (new) —
recipe-editor with neutral default agent, asserts `recipe-card` form
mounts AND agent references recipe context across turns.
- `showcase/harness/src/probes/drivers/e2e-deep.ts` — retry-once loop
around `runFeature`.
- `d5-registry.ts` / `d5-feature-mapping.ts` / `live-status.ts`
(dashboard) / LGP `manifest.yaml` / `feature-registry.json` /
`constraints.yaml` — wire the new featureTypes and features end-to-end.
- `d5-shared-state.ts` (+test) — drops dual-claim.
- 2 pre-existing test fixes folded in: `d5-gen-ui-interrupt.test.ts`
(mock updated to current evaluate-poll resume signal) and
`conversation-runner.test.ts` (preFill ordering assertion now matches
actual deferred-cascade contract).
- aimock `d5-all.json` — +2 shared-state-read fixtures.
interrupt-headless and tool-rendering-reasoning-chain reuse existing
fixtures whose substrings already match their chip prompts.
## Test plan
- [x] `pnpm vitest run` in `showcase/harness/` → **1588 / 1588 passing**
(was 1585 / 1588 with 3 pre-existing fails before this PR; 2 are fixed
here, 1 was an obsolete-mock issue).
- [x] `npx tsx showcase/scripts/validate-fixture-tool-surface.ts` →
clean (282 fixtures × 627 demos, no drift).
- [x] `npx tsx showcase/scripts/generate-registry.ts` → clean (18
integrations, 38 wired LGP features, 756 catalog cells).
- [x] `pnpm typecheck` in `showcase/harness/` → clean.
- [x] `d5-mapping-drift.test.ts` → green (CATALOG_TO_D5_KEY mirrors
REGISTRY_TO_D5).
- [ ] After merge: watch the e2e-deep dashboard rotation — the 3 new LGP
cells should write rows on first tick (no red zombies — these are
first-time emissions).
## Known follow-up (NOT in this PR)
`auth.spec.ts` test #5 ("signing back in re-mounts a fresh chat
surface") fails on Railway. Symptom: after sign-out → sign-in cycle, the
second `Hello again` send doesn't produce an assistant response within
30s. Looks like a `react-core/v2` ref-handling regression on
`<CopilotKit>` unmount/remount — deserves its own focused investigation
rather than expanding this PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
||
|
|
59ecd828e5 |
test(showcase/scripts): update catalog+registry counts post LGP feature additions
Validate Showcase CI was failing on hardcoded count assertions in generate-catalog.test.ts and generate-registry.test.ts after this PR added 3 features to the LGP manifest (interrupt-headless, shared-state-read, tool-rendering-reasoning-chain) and 1 feature to feature-registry.json (shared-state-read — the others were already declared). - LGP feature/demo count: 36 → 39 - Total feature-registry features: 42 → 43 - Catalog integrated cells: 756 → 774 (43 × 18) - LGP integrated cells: 42 → 43 (38 wired + 1 stub + 4 unshipped) - Metadata total_cells (docs-only excluded): 738 → 756 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
256dcd5a61 |
test(shell-dashboard): refresh depth-utils tests post dual-claim drop
The previous "multi-key D5 mapping" tests used `shared-state-read-write` as the example, but with the dual-claim drop that registry-id is now single-key (only `shared-state-write`). Tests still passed logically but the names were misleading. - Rewrote both shared-state-read-write tests to assert the new single-key contract directly (no more `d5:lgp/shared-state-read` row in the live map — that row belongs to a different cell now). - Added new beautiful-chat tests as the canonical multi-key example (5 per-pill literals) so the multi-key code path stays exercised. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
d16475cced | style: auto-fix formatting | ||
|
|
be94bd7a6f |
feat(showcase): add 3 LGP D5 probes + driver retry-once
Closes the demo↔probe coverage gap for /demos/{interrupt-headless,
shared-state-read, tool-rendering-reasoning-chain} so every demo
under langgraph-python (the north-star integration) now has a D5
probe writing to its own PocketBase cell — not relying on cross-
demo umbrella records.
New probes (multi-turn, mirroring the agentic-chat structure):
- d5-interrupt-headless: exercises useHeadlessInterrupt — chip
prompt → backend interrupt(...) → app-surface popup → slot pick
→ resume → assistant confirmation. Distinct from gen-ui-interrupt
(which uses inline useInterrupt).
- d5-tool-rendering-reasoning-chain: combines reasoning-block slot
+ per-tool renderer (WeatherCard, FlightListCard) on the same
chat surface. Catches a regression in either side.
- d5-shared-state-read: recipe-editor demo (neutral default agent,
no tools) — verifies recipe-card form mounts AND agent reads
shared state across turns. Drops the dual-claim that
d5-shared-state.ts had on `shared-state-read` (now write-only).
Driver retry-once (e2e-deep.ts):
Probes that fail with a transient class (`goto-error` /
`conversation-error`) AND took ≥2s on the first attempt now retry
once before recording red. Persistent assertion-style failures
(sub-2s) and intentional aborts/feature-timeouts skip retry —
retrying a deterministic mismatch just burns clock and obscures
the signal. Cuts ~10× the dashboard flap rate.
Plumbing:
- D5FeatureType enum: +interrupt-headless, +tool-rendering-reasoning-chain.
- REGISTRY_TO_D5 (harness) + CATALOG_TO_D5_KEY (dashboard) mirror
the new mappings; d5-mapping-drift test enforces this.
- LGP manifest features + demos entries + constraints allowlist.
- feature-registry.json: +shared-state-read.
- aimock d5-all.json: +2 shared-state-read fixtures (interrupt-
headless + tool-rendering-reasoning-chain reuse existing fixtures
that already match their chip prompts).
Tests: 1588/1588 harness vitest green. validate-fixture-tool-surface
clean (282 fixtures × 627 demos, no drift). Two pre-existing test
fixes folded in — d5-gen-ui-interrupt assertion mock updated to
match the current evaluate-poll resume signal; conversation-runner
preFill ordering test now asserts the actual deferred-cascade
contract instead of a stricter pre-preFill ban that the runner
never enforced.
Known follow-up (not in this PR): auth.spec.ts test #5 ("signing
back in re-mounts a fresh chat surface") fails on Railway — second
sign-in's "Hello again" never produces an assistant response. Looks
like a react-core/v2 ref-handling regression on <CopilotKit>
unmount/remount; deserves its own focused investigation.
Other integrations may flip red on the new probes — that's
expected. We're treating LGP as the template; cross-integration
parity follows in a separate wave.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
5d1a55e921 |
fix(showcase/langgraph-python): close remaining D5 cells (framework + fixtures)
Lands the Bucket A framework fix and the fixture-correctness changes needed to flip the remaining D4/D2 cells in the langgraph-python column to D5. Full local D5 sweep is green (1 passed, 0 failed). Framework: every Python `ToolMessage` constructed via `Command(update=...)` now sets `name=` and `id=str(uuid.uuid4())`. Without these, @ag-ui/langgraph synthesises TOOL_CALL_START events with `toolCallName: null` and `parentMessageId: null`, which @ag-ui/client@0.0.53's Zod schema rejects; the rejection is silently swallowed by `withAbortErrorHandling -> EMPTY`, completing the SSE observable mid-stream so post-tool state never reaches the consumer. Fix is applied across shared_state_streaming, shared_state_read_write, gen_ui_agent, beautiful_chat, subagents (2 sites). Single-flag change in a2ui_dynamic flips the secondary `_design_a2ui_surface` LLM call to `streaming=True` so aimock's record/replay (SSE-only) sees it. Fixtures (d5-all.json): - toolCallId follow-ups for set_steps (3), display_flight, generate_a2ui (4), schedule_meeting (2), generateSandboxedUi (7), and revenue chart so multi-turn probes don't recurse into recursion-limit loops - four hand-crafted secondary `_design_a2ui_surface` fixtures so A2UI dynamic renders without a real LLM - mcp-apps fixture rewritten to emit `create_view` tool call with a minimal Excalidraw element payload; runtime middleware fetches the UI resource and the iframe mounts - AAPL and revenue `hasToolResult: true` follow-ups tightened to `toolCallId` so they don't match cross-turn after prior turns' tool results - voice fast-path content-only fixture - beautiful-chat-schedule-meeting first-turn fixture gains content so the conversation runner sees an assistant message before the picker click assertion Probes: bumped per-card waitForSelector in d5-gen-ui-headless-complete from 15s to 60s — recharts ResponsiveContainer can be slow under 4 sequential turns. Shell-dojo: hide CLI Start Command from the dojo navigation via `HIDDEN_DOJO_FEATURE_IDS`. Registry/manifests untouched so harness/parity/dashboard still see it. |
||
|
|
91432a701b |
fix(showcase/langgraph-python): close remaining D5 cells (framework + fixtures) (#4742)
## Summary - **Framework fix**: every Python `ToolMessage` now sets `name=` and `id=str(uuid.uuid4())`. Without these, `@ag-ui/langgraph` synthesises `TOOL_CALL_START` events with `toolCallName: null` / `parentMessageId: null`, which `@ag-ui/client@0.0.53`'s Zod schema rejects. The rejection is silently swallowed by `withAbortErrorHandling → EMPTY`, completing the SSE observable mid-stream so post-tool state never reaches the consumer. Fixes Bucket A (shared-state-streaming, open-gen-ui-advanced) plus several other multi-step demos. - **Fixtures**: added `toolCallId`-keyed follow-up fixtures for every multi-turn pill (set_steps, display_flight, generate_a2ui, schedule_meeting, generateSandboxedUi, revenue chart) so the agent doesn't recurse into 100-step loops; tightened `hasToolResult: true` follow-ups to `toolCallId` so they don't match cross-turn after prior turns' tool results; added 4 hand-crafted secondary `_design_a2ui_surface` fixtures for A2UI dynamic. - **Probe**: bumped per-card `waitForSelector` in `d5-gen-ui-headless-complete` from 15s → 60s (recharts is slow under 4 sequential turns). - **Shell-dojo**: hide CLI Start Command from the dojo navigation via `HIDDEN_DOJO_FEATURE_IDS`. Registry/manifests untouched so harness/parity/dashboard still see it. ## What this PR does NOT fix - **`mcp-apps` D5 probe stays red.** I tried a fixture that emits a `create_view` MCP tool call so the runtime middleware fetches the iframe from the real Excalidraw MCP server. `validate-fixture-tool-surface.ts` correctly rejected it: my `system diagram` substring would match all 17 integrations' mcp-apps demos but only langgraph-python has the MCP wiring to handle `create_view`. Reverted. The probe remains a known aimock false-negative — fix needs MCP-aware fixture infrastructure (extend the validator to read `mcpApps.servers`, or per-agent fixture files, or a probe-skip flag). Tracking as separate work. ## Test plan - [x] `./showcase/bin/showcase test langgraph-python --d5` — passes for every D5 cell except mcp-apps (which was already red before this PR) - [x] Browser smoke (replay mode) for shared-state-streaming, gen-ui-agent, a2ui-fixed-schema, declarative-gen-ui (4 pills), open-gen-ui (default + advanced), gen-ui-interrupt - [x] Wire-level verification that `TOOL_CALL_START` carries non-null `toolCallName` + `parentMessageId` for the affected agents - [x] `validate-fixture-tool-surface.ts` passes locally (280 fixtures × 627 demos, no drift) - [x] No regression on previously-green probes - [x] CI green |
||
|
|
3d4912f323 |
fix(showcase/langgraph-python): close remaining D5 cells (framework + fixtures)
Lands the Bucket A framework fix and the fixture-correctness changes needed to flip the remaining D4/D2 cells in the langgraph-python column to D5. Full local D5 sweep is green (1 passed, 0 failed). Framework: every Python `ToolMessage` constructed via `Command(update=...)` now sets `name=` and `id=str(uuid.uuid4())`. Without these, @ag-ui/langgraph synthesises TOOL_CALL_START events with `toolCallName: null` and `parentMessageId: null`, which @ag-ui/client@0.0.53's Zod schema rejects; the rejection is silently swallowed by `withAbortErrorHandling -> EMPTY`, completing the SSE observable mid-stream so post-tool state never reaches the consumer. Fix is applied across shared_state_streaming, shared_state_read_write, gen_ui_agent, beautiful_chat, subagents (2 sites). Single-flag change in a2ui_dynamic flips the secondary `_design_a2ui_surface` LLM call to `streaming=True` so aimock's record/replay (SSE-only) sees it. Fixtures (d5-all.json): - toolCallId follow-ups for set_steps (3), display_flight, generate_a2ui (4), schedule_meeting (2), generateSandboxedUi (7), and revenue chart so multi-turn probes don't recurse into recursion-limit loops - four hand-crafted secondary `_design_a2ui_surface` fixtures so A2UI dynamic renders without a real LLM - mcp-apps fixture rewritten to emit `create_view` tool call with a minimal Excalidraw element payload; runtime middleware fetches the UI resource and the iframe mounts - AAPL and revenue `hasToolResult: true` follow-ups tightened to `toolCallId` so they don't match cross-turn after prior turns' tool results - voice fast-path content-only fixture - beautiful-chat-schedule-meeting first-turn fixture gains content so the conversation runner sees an assistant message before the picker click assertion Probes: bumped per-card waitForSelector in d5-gen-ui-headless-complete from 15s to 60s — recharts ResponsiveContainer can be slow under 4 sequential turns. Shell-dojo: hide CLI Start Command from the dojo navigation via `HIDDEN_DOJO_FEATURE_IDS`. Registry/manifests untouched so harness/parity/dashboard still see it. |
||
|
|
aa08743c7e |
fix(core): only reset agent state on actual thread switch (supersedes #4720)
When the chat's connect effect re-fires due to React effect-dep churn, it
calls copilotkit.connectAgent({ agent }) on the same thread again. The
RunHandler previously called agent.setMessages([]), agent.setState({}),
and (transitively) clearReconnectCursor on every such call. That forced
the realtime gateway to replay the topic's full event history on every
churn re-connect — sending the same persisted cpki_event_ids 2-3 times
per thread switch — and produced both halves of Tyler's bug: duplicate
rows in the inspector AG-UI Events tab plus "Message not found" toasts
when the next runAgent fired with an empty agent.messages.
This change makes the orchestrator detect actual thread switches:
- RunHandler tracks _lastConnectedThreadId across connectAgent calls.
On a fresh restore (different threadId from last call) it does the
reset and clears the replay cursor. On churn (same threadId) it
skips the reset entirely so local messages/state are preserved and
the gateway resumes from lastSeenEventId instead of replaying.
- IntelligenceAgent.connect() no longer auto-clears the cursor;
cursor management is the caller's decision now. clearReconnectCursor
is made public so RunHandler (and tests) can call it explicitly.
- ProxiedCopilotRuntimeAgent exposes a clearReplayCursor(threadId)
method that delegates to the IntelligenceAgent. Non-Intelligence
runtime modes are a safe no-op.
This supersedes #4720, which attempted to solve only the inspector
duplicate-row symptom by adding a dispatcher dedup. That approach
introduced a blocking regression in the A → B → A restore path: the
dedup persisted across thread switches and suppressed the gateway's
restore replay, leaving agent.messages at [] and triggering the very
"Message not found" toast we were trying to prevent. Mike's review
caught it. The dispatcher dedup is removed entirely; the
orchestrator-level gate is sufficient and a smaller surface change.
Tests:
- intelligence-agent.test.ts: updated 4 tests that codified the old
"always clear cursor" semantics. Added an explicit test that
clearReconnectCursor() empties the cursor for the next connect, and
Mike's regression — replay the same cpki_event_id after A → B → A
and verify the rehydrate still produces the user message.
- core-connect-thread-switch.test.ts (new): four tests for the
RunHandler gate covering churn, single switch, A → B → A, and the
no-clearReplayCursor non-Intelligence path.
All 430 core tests pass.
|
||
|
|
8d360c0dc6 |
fix(shell-docs): resolve 53 sitemap 500s before cutover
The 53 hard-500 URLs in the public sitemap split into three independent
root causes, all surfaced in production-mode rendering only because the
underlying issues throw inside next-mdx-remote:
1. tutorials/ai-powered-textarea/step-2-setup-copilotkit and
tutorials/ai-todo-app/step-2-setup-copilotkit reference
<CopilotCloudConfigureCopilotKit>,
<SelfHostingCopilotRuntimeConfigureCopilotKit>, and
crewai-flows/quickstart references <CloudCopilotKit> — three
unsuffixed component names whose only registered counterparts in
docsComponents end in "Provider". MDX rendering throws "Expected
component X to be defined" and 500s. Adds the unsuffixed names as
aliases of the existing Provider stubs in mdx-registry.
deploy-agentcore (langgraph variants + aws-strands) uses
<Content framework="..." />, also unregistered. Adds Content as a
children-passthrough stub for the same reason.
2. Three langgraph tutorial pages (agent-native-app/step-6-shared-state,
ai-travel-app/step-3-setup-copilotkit,
ai-travel-app/step-4-integrate-the-agent) place a closing </Step>
tag immediately under a markdown bullet list with no blank line
separator. The remark parser treats the closing tag as a list-item
continuation, errors out with "Expected the closing tag </Step>",
and ships a 500. Adds the missing blank line before the close tag.
3. Five MDX files (llamaindex + adk shared-state/predictive-state-updates,
pydantic-ai shared-state/in-app-agent-write, plus crewai-flows and
pydantic-ai human-in-the-loop/index — last two not in the 53 but
share the bug) use {/\\* ... \\*/} where the asterisks are escaped.
Acorn cannot parse the resulting expression and the page 500s.
Replaces the escapes with proper {/* ... */} JSX comments.
Verified: a clean production build of shell-docs followed by
`npx next start` and a curl probe of all 53 URLs from
validation/test2_results.json returns 200 across the full set with
zero MDX or React errors in the server log.
|
||
|
|
39d1b91ac6 |
fix(shell-docs): redirect catalog hygiene (self-loops + framework-scoped gap)
Two issues found in Phase 4 validation against docs.showcase.copilotkit.ai. 1. 31 entries in seo-redirects.ts had source === destination, causing middleware to issue infinite 301 loops on canonical URLs like /frontend-tools, /faq, /human-in-the-loop. Remove the dead entries and add a defense-in-depth skip-when-equal guard in middleware so future drift cannot regress. 2. Framework-scoped paths (e.g. /agno/frontend-actions) bypassed the redirect catalog entirely because the pathIsFrameworkScoped short- circuit fired before any catalog lookup. Reorder middleware so the exact-match catalog is consulted first for every request, including framework-scoped paths. Wildcard scan still skips legacy patterns that would hijack canonical framework URLs, but allows same-framework wildcard rewrites (e.g. /agno/concepts/:path* -> /agno) to fire. 85 framework-scoped redirects across 18 registry slugs now resolve instead of soft-404ing. Verified by curl probes against localhost: all 85 framework-scoped catalog entries 301 to the expected destination, all 31 former self- loop URLs return 200, and canonical framework URLs (/agno, /langgraph- python/quickstart, etc.) still pass through unchanged. |
||
|
|
d7d7b27ff0 |
fix(shell-docs): correct feature-viewer slug + demo-id translation for code tab
The InlineDemo Code tab constructs a feature-viewer.copilotkit.ai URL from the integration's docs-folder name, but feature-viewer expects its own slug scheme. Six framework slugs 404'd outright (built-in-agent, google-adk, claude-sdk-python, claude-sdk-typescript, ms-agent-python, ms-agent-dotnet) and two more were named differently (crewai-crews needed crewai, llamaindex needed llama-index). Demo IDs also diverged (gen_ui_tool_based vs tool_based_generative_ui, hitl_in_chat vs human_in_the_loop, etc.) so even when the framework slug was right the Code panel rendered an empty 404 page. Add getFeatureViewerSlug() and getFeatureViewerDemoId() to registry.ts with explicit override maps. Both return null when the integration or demo has no feature-viewer counterpart. Update mdx-registry.tsx to use both and to suppress the Code tab (rendering the Demo iframe alone) whenever either helper returns null. Verified by probing feature-viewer.copilotkit.ai for each (framework x demo) combination using NEXT_HTTP_ERROR_FALLBACK soft-404 detection plus inspection of the rendered code panel; all post-fix URLs that the helpers emit resolve to real code panels for the six demos feature-viewer ships (agentic_chat, tool_based_generative_ui, agentic_generative_ui, predictive_state_updates, shared_state, human_in_the_loop). |
||
|
|
938b8d8dd3 |
chore(showcase): close last 2 yellow Missing snippet boxes for cutover
/langgraph-python/frontend-tools referenced regions frontend-tool-registration and frontend-tool-handler which were missing markers on the production demo. Added in-place @region markers on the existing useFrontendTool block in showcase/integrations/langgraph-python/src/app/demos/frontend-tools/page.tsx since the demo is a clean teaching example. /langgraph-python/custom-look-and-feel/slots referenced regions register-welcome-slot, register-assistant-message-slot, and register-disclaimer-slot. The chat-slots production demo registers ~12 slot overrides at once with `as unknown as typeof X` casts that obscure the per-pattern teaching shape, so added a sibling slot-overrides.snippet.tsx file (mirrors the llamaindex chat-slots sibling pattern) with the three minimal teaching regions. Verified by re-bundling demo-content.json, running shell-docs production build, and curling both pages on a local server: zero Missing snippet boxes, and the region code (change_background, CustomWelcomeScreen, CustomDisclaimer, CustomAssistantMessage) renders on the pages. |
||
|
|
af9fbd59a9 |
fix(showcase/aimock): correct D5 fixture matching for agent-config + shared-state-streaming (#4737)
## Summary Two D5 fixture-correctness fixes for the langgraph-python column. Together they flip `agent-config` to D5 and unblock the recursion-loop failure mode for `shared-state-streaming` (the cell still has a separate framework-level state-binding regression that prevents it from rendering — tracked separately). - **agent-config**: drop the "introduce yourself per your config" baseline fixture. It substring-matched every prefixed probe prompt (`tone:professional`, `expertise:beginner`, `responseLength:concise`, …), forcing byte-identical responses across all six knob probes and masking the per-knob behavior the cell is meant to demonstrate. - **shared-state-streaming**: add toolCallId-keyed follow-up fixtures (poem / email / quantum) above each first-turn entry so aimock returns content-only after the tool result lands. Without these, the unchanged last user message kept re-matching the first-turn fixture, the agent re-fired `write_document`, and langgraph hit its 100-step recursion limit. Synced to `showcase/aimock/d5-all.json` so replay-mode picks up both fixes. ## Test plan - [x] Local replay: `agent-config` flips GREEN (each knob probe receives its dedicated fixture) - [x] Local replay: `shared-state-streaming` no longer hits `GraphRecursionError`; remaining failure is the framework state-binding bug (separate work) - [x] aimock fixture count went up by the expected amount on container restart (`Loaded N fixture(s)`) - [x] lefthook hooks pass (lint-fix, sync-lockfile, test-and-check-packages all clean) |
||
|
|
ca22e38e20 |
Merge remote-tracking branch 'origin/main' into alem/d5-fixture-fixes-bucket-a
# Conflicts: # showcase/aimock/d5-all.json |
||
|
|
3aa64b02f9 |
fix(showcase/harness): probe-side DOM-signal alignments — flips 5 more D4 cells to D5 (#4732)
## Summary Six probe-side fixes landing **5 additional D5 flips** on the langgraph-python column. None of the fixes touch demo or runtime code — just the harness-side selectors / signal predicates so each probe asserts on what the published langgraph-python image actually renders today. ## D5 impact Stacks on PR #4728 (merged). After this branch (live in PocketBase): | Cell | Before this PR | After | |---|---|---| | `tool-rendering-default-catchall` | red | **green** | | `beautiful-chat` | red | **green** | | `reasoning-default` | red | **green** (rolled with reasoning-custom on the same `d5:reasoning-display` row) | | `frontend-tools` | regressed in earlier replay sweep | **green** (toolCallId disambiguation in PR #4728) | **Net dashboard count: 11 → 5 D4 cells in the langgraph-python column** (including PR #4724 + #4728's flips). ## Per-probe changes - **`d5-tool-rendering-default-catchall`** — add a fallback that scans `[data-testid="copilot-assistant-message"]` bubbles for the literal tool name + a `done`/`running` status label, alongside the strict testid contract. Strict path (the `[data-testid="copilot-tool-render"]` wrapper added in commit `ba60df5d3`) re-engages once `@copilotkit/react-core` ships a release with it; until then the bubble-text scan is the only stable hook on 1.56.5. - **`d5-reasoning-display`** — published built-in `CopilotChatReasoningMessage` carries no testid. Accept the verbatim `Thought for` / `Thinking…` header text the slot emits, in addition to the four pre-existing testid selectors used by the `reasoning-custom` override. - **`d5-gen-ui-headless-complete`** — the `SuggestionBar` renders agent-generated chip phrasing alternately with the static `useConfigureSuggestions` titles. Switch from `aria-label="Suggestion: <Title>"` to a per-chip alias list (e.g. `["stock", "aapl"]`) that matches BOTH forms via case-insensitive CSS attribute substring (`button[aria-label*="..." i]`). - **`d5-gen-ui-interrupt`** — widen the post-pick assertion to accept any of (a) the `time-picker-picked` testid, (b) the visible `Booked` badge text, or (c) the agent's `scheduled` / `confirmed` resume continuation. The picked-state Card unmounts as soon as langgraph resumes after `resolve`, so a 5s testid wait races the unmount; the OR catches whichever signal lands first. - **`_beautiful-chat-shared` (toggle-theme)** — two-track signal: pass on EITHER the `html.dark` class flipping from its initial reading OR the visible `Theme toggled` assistant content rendering. The class-flip is the strongest signal but `useFrontendTool`'s dispatch occasionally drops the handler call without dropping the agent's follow-up content message; track (b) catches the "tool semantics reached the UI" state in the meantime. - **`_beautiful-chat-shared` (search-flights)** — swap the literal `United Airlines` wait for the short brand label `United`, which appears in BOTH the FlightCard a2ui surface (when it paints) and the assistant's `$349 / $289` narration. Price literals stay as the canonical 2-flight fingerprint. ## Conversation-runner adjustment Reverse the partial-fix from PR #4724: try chat-input cascade resolution AT BOOT first (and read baseline at boot too); only defer to post-`preFill` on auth-shape demos where the cascade fails. Without this, demos where `preFill` itself fires the message (chip clicks in headless-complete) had baseline read AFTER the assistant bubble already appeared and the settle waited indefinitely for further growth that never came. ## Remaining 5 D4 cells | Cell | Class | |---|---| | `agent-config` | Bucket A — runtime/streaming defect | | `shared-state-streaming` | Bucket A — same defect class | | `open-gen-ui-advanced` | Bucket A — same defect class | | `gen-ui-headless-complete` | First 3 of 4 chip turns now pass; 4th turn (`revenue` chart) still fails. Suggestion drift across 4 sequential turns means the 4th chip's aria-label sometimes drifts outside both alias forms. Worth narrowing once dev-debug-mode confirms what the 4th-turn chip rendered. | | `gen-ui-interrupt` | Post-pick signal still elusive — `Booked` badge / `scheduled` continuation are not landing in the rendered DOM after a slot click in the local environment. Further investigation needed via debug-mode trace. | Bucket A is deferred per prior discussion; the other two would benefit from `debug: true` on the runtime/provider to see exactly what events fire after the slot click / 4th chip click. ## Test plan - [x] Full d5 sweep against local replay confirms 5 → 5 red d5 keys (down from 8 pre-PR; -3 net flips on this branch alone) - [x] PocketBase reflects current state — 5 D4 cells visible on dashboard - [ ] CI's langgraph-python D5 cron passes the same 8 cells on a deploy of this branch - [ ] `dashboard.showcase.copilotkit.ai` shows 11 → 5 D4 transitions on the langgraph-python column once Railway picks this up |
||
|
|
ccc2eabfc2 |
test(showcase/langgraph-python): regression coverage for A2UI middleware-intercept + display_flight loop
Three classes of regression are now pinned: 1. Secondary-LLM tool name doesn't collide with the A2UI middleware's default intercept list (`render_a2ui`). New `src/agents/test_a2ui_internal_tools.py` parametrises over `beautiful_chat._design_a2ui_surface`, `a2ui_dynamic._design_a2ui_surface`, and `a2ui_fixed.display_flight` and asserts none match the middleware's `a2uiToolNames` default. Catches accidental rename reverts that would re-enable the bypass. 2. `generate_a2ui` force-pins the canonical `catalog_id` even when the secondary LLM hallucinates a wrong one. The new test stubs `ChatOpenAI` with a fake response carrying a bogus catalogId and asserts the surface op carries the module's `CUSTOM_CATALOG_ID`. 3. `generate_a2ui` short-circuits with a clean error string when the LLM emits a root component without a `component` field — never feeds the renderer the partial tree that surfaced as the "Cannot create component root without a type" infinite-loop. 7 unit tests, all green locally (`pytest src/agents/test_a2ui_internal_tools.py`). E2E tests on the same fixes now also assert: - No `A2UI render error: Catalog not found` banner on the page after Beautiful Chat → Sales Dashboard, Declarative Gen UI → BarChart, and A2UI Fixed Schema → Find SFO → JFK round-trips. - No `Cannot create component … without a type` banner on the same three pills. - Exactly ONE flight card on A2UI Fixed Schema (was 6+ on deploy pre-fix from the `display_flight` loop) — `Flight Details` count pinned to 1, `Book flight` count pinned to 1. - At most one ResponsiveContainer on the BarChart pill (loops would stack multiple). - At most two ResponsiveContainers on Beautiful Chat → Sales Dashboard (one pie + one bar = single dashboard render). |
||
|
|
22a8446586 |
fix(showcase/aimock): correct D5 fixture matching for agent-config + shared-state-streaming
agent-config: drop the "introduce yourself per your config" baseline — it substring-matched every prefixed probe prompt (tone:, expertise:, responseLength:), forcing byte-identical responses and masking the per-knob behavior the cell is meant to demonstrate. shared-state-streaming: add toolCallId-keyed follow-up fixtures (poem/email/quantum) above each first-turn entry so the matcher returns content-only after the tool result lands. Without these the unchanged last user message kept re-matching the first-turn fixture, the agent re-fired write_document, and langgraph hit its 100-step recursion limit. The frontend state-binding regression that prevents the streamed document from rendering is a separate framework-level issue. Synced to showcase/aimock/d5-all.json so replay-mode picks up both fixes. |
||
|
|
e1137bb2f7 | Merge branch 'main' into alem/fix-bucket-c-d5-probes-followup | ||
|
|
d1827973bd |
fix(showcase/langgraph-python): rename internal A2UI tool so middleware doesn't intercept (#4734)
## Summary Follow-up to #4733. The Sales Dashboard pill on Beautiful Chat and the KPI Dashboard pill on Declarative Gen UI were still failing on deploy with: - `A2UI render error: Catalog not found: declarative-gen-ui-catalog` (beautiful-chat) - `A2UI render error: Cannot create component root without a type` infinite loop (declarative-gen-ui) ### Root cause `@ag-ui/a2ui-middleware`'s default `a2uiToolNames = ["render_a2ui"]` makes the middleware **synthesise ACTIVITY_SNAPSHOT events from the streaming tool-call args of any matching call**, using the LLM's RAW `catalogId` + `components` before the Python tool body runs. Both `generate_a2ui` implementations bound a structured-output helper named `render_a2ui` to a secondary LLM — so the secondary LLM's hallucinated `catalogId` and malformed root components were getting emitted to the frontend through the bypass. The force-pin and defensive validation #4733 added were correct but ran on the tool-result; the middleware had already fired its synthetic events from the streaming args. ### Fix Rename the internal helper from `render_a2ui` to `_design_a2ui_surface` so it falls outside the middleware's intercept list. The outer `generate_a2ui`'s `a2ui.render(operations=...)` return is then the only path to the frontend, and the Python validation layer is authoritative again. Two files: `src/agents/beautiful_chat.py`, `src/agents/a2ui_dynamic.py`. No frontend / runtime / package changes. ## Test plan - [x] **Local — Beautiful Chat → Sales Dashboard pill**: renders dashboard surface (Total Revenue / New Customers / etc.) with no errors. Previously: `Catalog not found: declarative-gen-ui-catalog`. - [x] **Local — Beautiful Chat → Search Flights pill**: still renders FlightCards (regression check on the previous fix). - [ ] **Deploy — Beautiful Chat → Sales Dashboard pill**: confirm no `Catalog not found` error. - [ ] **Deploy — Declarative Gen UI → KPI Dashboard pill**: confirm no `Cannot create component root without a type` loop. |
||
|
|
c91a9c9aff |
fix(showcase/langgraph-python): A2UI fixed-schema loop + propagate rename to shared tools and aimock
Two follow-up fixes layered on the previous internal-tool rename: (1) `a2ui_fixed.py` — fixed-schema demo infinite loop on deploy. The `display_flight` tool returns the raw `a2ui.render(...)` JSON descriptor as its tool result. gpt-4o-mini reads that opaque blob, can't tell the flight was rendered, and re-calls `display_flight` indefinitely (visible on the deployed showcase as 6+ duplicate flight cards stacked under repeated assistant text). Local was just lucky. Hardened the docstring + system prompt to spell out: the JSON return value is the surface descriptor, the card is already rendered, do NOT call again, reply with one short confirmation and stop. (2) Rename `render_a2ui` → `_design_a2ui_surface` in shared and langgraph-python parity copies of `tools/generate_a2ui.py` (+ `tools/__init__.py` re-export `RENDER_A2UI_TOOL_SCHEMA` → `DESIGN_A2UI_SURFACE_TOOL_SCHEMA`), and in `showcase/shared/typescript/ tools/generate-a2ui.ts`. These shared helpers were the source-of-truth for the secondary-LLM tool name across integrations; renaming here keeps parity with the langgraph-python agents already renamed in `beautiful_chat.py` / `a2ui_dynamic.py`. Other framework integrations keep their own `render_a2ui` for now (separate parity sweep). (3) `showcase/aimock/feature-parity.json` — added a sibling fixture matching `toolName: "_design_a2ui_surface"` for the beautiful-chat Sales Dashboard pill so the langgraph-python e2e suite still hits a deterministic mock on Railway. The original `render_a2ui` fixture is kept above it so other integrations whose secondary LLM still requests `render_a2ui` continue to match. (4) Comment update in `beautiful-chat.spec.ts` to name the new internal tool. |
||
|
|
f8b2be774d |
chore: retarget "Talk to engineers" CTAs to /talk-to-an-engineer (#4735)
## Summary - Retargets the docs navbar and showcase shell-docs brand-nav "Talk to engineers" CTAs from `copilotkit.ai/contact-us` to `copilotkit.ai/talk-to-an-engineer`. - PostHog `talk_to_us_clicked` capture is unchanged — only the destination URL moves. ## Test plan - [ ] Click "Talk to engineers" in the docs navbar and confirm it lands on `/talk-to-an-engineer`. - [ ] Click "Talk to engineers" in the showcase shell-docs brand-nav and confirm the same destination. - [ ] Verify `talk_to_us_clicked` still fires in PostHog with `location: "docs_nav"`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) |
||
|
|
017e19455a |
chore: retarget "Talk to engineers" CTAs to /talk-to-an-engineer
Updates the docs navbar and showcase shell-docs brand-nav so the "Talk to engineers" CTA points at copilotkit.ai/talk-to-an-engineer instead of the deprecated /contact-us endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
5d3abc6680 |
fix(showcase/langgraph-python): rename internal A2UI tool so middleware doesn't intercept
The A2UI middleware (`@ag-ui/a2ui-middleware`) defaults `a2uiToolNames` to `["render_a2ui"]` and synthesises ACTIVITY_SNAPSHOT events from the streaming tool-call args of any matching call — using the LLM's RAW catalogId and components verbatim, before the Python tool body has a chance to validate or normalise. Both `beautiful_chat.py` and `a2ui_dynamic.py` use a `generate_a2ui` tool that internally invokes a secondary LLM bound to a structured-output `render_a2ui` helper. Because the helper's name matched the middleware's default intercept list, the secondary LLM's hallucinated catalogId (`declarative-gen-ui-catalog` leaking into the beautiful-chat dashboard) and malformed root components (no `component` field on KPI dashboard) were emitted to the frontend bypass, surfacing as: - "A2UI render error: Catalog not found: declarative-gen-ui-catalog" on the beautiful-chat Sales Dashboard pill - "A2UI render error: Cannot create component root without a type" infinite-loop on the declarative-gen-ui KPI Dashboard pill The earlier force-pin of `catalog_id` and the defensive component sweep in `generate_a2ui` were correct but ran too late — they execute on the tool-result, after the middleware has already fired surface events from the streaming args. Fix: rename the internal helper to `_design_a2ui_surface` (and update `tool_choice`, prompt header, and module docstring) so it falls outside the middleware's intercept list. The explicit `a2ui.render(...)` ops the outer `generate_a2ui` returns are then the only path to the frontend, and our Python validation layer is authoritative. Verified locally: Beautiful Chat → Sales Dashboard pill renders Total Revenue / New Customers / etc. with no errors. |
||
|
|
3b3908e353 |
fix(showcase/langgraph-python): restore A2UI rendering for beautiful-chat + declarative-gen-ui (#4733)
## Summary - Beautiful Chat **Search Flights** pill: restored `_build_flight_components` so the agent emits a flat literal-children FlightCard tree (the structural-children template form via `flight_schema.json` + `update_data_model` doesn't expand correctly through GenericBinder for our custom catalog — it was working until the recent flagship-cell pass swapped it back). FlightCards render again instead of falling through to the default tool card. - Beautiful Chat **Sales Dashboard** pill: hardened `generate_a2ui` so the secondary LLM gets explicit catalog-id + component-shape rules and the resulting `catalog_id` is force-pinned to the registered catalog. Kills the "Catalog not found: declarative-gen-ui-catalog" sibling-demo hallucination. - **Declarative Gen UI** (`a2ui_dynamic.py`): same `generate_a2ui` hardening, plus a defensive sweep that drops malformed components and bails clean when the LLM omits a typed root. Kills the "Cannot create component root without a type" infinite-loop renderer error reported on the KPI Dashboard pill. Two files touched (`src/agents/beautiful_chat.py`, `src/agents/a2ui_dynamic.py`); no frontend / runtime / package changes. Existing aimock fixtures in `feature-parity.json` already use the canonical catalogId and well-formed components, so e2e specs should pass without fixture changes. ## Test plan - [x] Verified locally: `langgraph_cli dev` + `next dev`, clicked **Search Flights** on `/demos/beautiful-chat` — Delta DL 405 ($329) and United UA 120 ($289) FlightCards rendered live with airline, route, times, status, Select. - [x] Verified locally: clicked **Show a KPI dashboard** on `/demos/declarative-gen-ui` — REVENUE / SIGNUPS / CHURN metric tree rendered cleanly, no "Cannot create component root without a type" error. - [ ] CI / `nx run @copilotkit/showcase-langgraph-python:e2e` (beautiful-chat spec already authored against the literal-children form). |
||
|
|
d1efb2bbc4 | style: auto-fix formatting | ||
|
|
462e200d45 |
fix(showcase/harness): assert on actual DOM signals, not unreleased testids
Six probe-side fixes landing five additional D5 flips on the
langgraph-python column. None of the fixes touch demo or runtime
code — just the harness-side selectors / signal predicates so each
probe matches what the published langgraph-python image actually
renders today.
Per-probe changes:
- d5-tool-rendering-default-catchall: add a fallback path that
scans copilot-assistant-message bubbles for the literal tool name
+ a 'done'/'running' status label, alongside the strict testid
contract added in unreleased commit
|
||
|
|
3ac103b3bf |
fix(showcase/langgraph-python): restore A2UI rendering for beautiful-chat + declarative-gen-ui
Three regressions, two files. Without these the Search Flights pill falls
through to the default tool card instead of rendering FlightCards, the
Sales Dashboard pill errors with "Catalog not found:
declarative-gen-ui-catalog", and the Declarative Gen UI cell loops on
"Cannot create component root without a type."
beautiful_chat.py — search_flights:
- Restore _build_flight_components and have search_flights emit the flat
literal-children component tree it produces, instead of the
flight_schema.json structural-children template (Row.children =
{ componentId, path: "/flights" }) plus update_data_model. The
GenericBinder doesn't reliably expand the structural form for our
custom FlightCard catalog — sibling demos avoid the form for the same
reason. The literal form has been the working shape since it was
introduced; the recent flagship-cell pass swapped it back to the
schema/data-model form and broke fixed-schema rendering.
- Make Flight TypedDict permissive (total=False) and drop the required
id / statusIcon fields. langchain rejected calls when the LLM (or
aimock fixture) omitted those, surfacing the validation string as the
tool result and never producing a surface.
beautiful_chat.py + a2ui_dynamic.py — generate_a2ui:
- Prepend a hard-requirements header to the secondary LLM's prompt
pinning the canonical catalogId and the component-shape contract
(every entry — including root — must carry both `id` AND `component`).
With injectA2UITool: false the runtime context alone leaves the LLM
enough room to hallucinate sibling-demo catalog IDs (e.g.
declarative-gen-ui-catalog leaking into the beautiful-chat dashboard)
and to omit `component` on the root entry (the source of the
"Cannot create component root without a type" infinite loop).
- Force catalog_id to the module-level CUSTOM_CATALOG_ID after the tool
call so any residual hallucination still routes to the registered
frontend catalog.
- Drop malformed component entries before constructing the operations
list, and bail with a clean error string if no valid root survives —
fail-soft instead of looping the renderer.
The renderer-side definitions.ts/renderers.tsx changes from the same
flagship pass are kept as-is; their Row/Column children union
(string-array OR { componentId, path }) is forward-compatible and
doesn't hurt the literal-children path.
|
||
|
|
4ce76d4576 |
fix(showcase/harness): drive gen-ui-headless-complete via textarea, not chip click
The demo has TWO chip surfaces with diverging aria-label shapes: EmptyState (first paint) emits aria-label='Try suggestion: <message>' with the visible text being the message string, while SuggestionBar (post-first-message) emits aria-label='Suggestion: <title>' with visible text being the short title. Which surface is mounted at any given turn depends on messages.length — timing-dependent. Both my prior selectors matched only one surface and timed out on the other. Drop the chip-click preFill entirely; let the runner's normal fillAndPress hit the textarea with the verbatim prompt. Chip clicks and textarea-Enter dispatch the same runAgent path, so the fixture matcher catches either route — and the textarea is always present. Also refresh e2e-deep.test.ts: a stale test assertion expected the old REGISTRY_TO_D5 mapping shape (tool-rendering-default-catchall → tool-rendering D5 type), but the Phase-2A split repointed it to its own D5 type of the same name. Update the expected skipped list and sideKeys to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
1d8d1b0783 |
fix(showcase/aimock): disambiguate frontend-tools fixtures with toolCallId follow-ups
In replay mode (no real OpenAI), the existing frontend-tools fixtures match by 'userMessage' substring only. Each pill (Sunset / Forest / Cosmic) had a single fixture that returned both content + a change_background toolCall. After the frontend tool ran, the agent's follow-up LLM call still has the same last user message — substring matches the same fixture again — agent re-fires change_background, loops to langgraph's recursion limit, probe's settle window never quiets, run reds out at the assistant-settle timeout. Add a toolCallId-keyed follow-up per pill that returns content-only, plus a static tool_call_id on the first-turn toolCall for the follow- up to pin to. The follow-up combines userMessage + toolCallId so it can't cross-match the next pill's first-turn request (which still has a tool result in history from the prior pill, but a different last user message). Probe result: d5:langgraph-python/frontend-tools flips green again in replay mode — was passing in PR #4724 only because the real-LLM run that PR was tested against happened to settle without re-firing. |
||
|
|
c2bc645228 |
fix(showcase/aimock): drop redundant recorded fixtures, let canonical d5-all.json take precedence
Investigation of the remaining bucket-C D4 cells uncovered that the 'recorded' fixtures shipped in PR #4725 are at best redundant with hand-curated canonical fixtures already in d5-all.json, and at worst override them with worse data — the recordings collapsed beautiful-chat's canonical $349/$289 search_flights payload to the LLM-of-the-day's $319/$289 (probe asserts $349 verbatim) and reasoning-custom's canonical fixture (which carries a 'reasoning' field) with a content-only recording (refused chain-of-thought disclosure). Net D5 effect of removing the recordings: - d5:langgraph-python/gen-ui-custom (catalog gen-ui-tool-based) → green (canonical d5-all.json #39/#40) - d5:langgraph-python/reasoning-display (catalog reasoning-custom) → green (canonical d5-all.json #91 with 'reasoning' field that cleanly satisfies the probe's reasoning-role testid contract) Both flips confirmed live against PocketBase via --d5 --live. The aimock record/replay infrastructure introduced alongside these fixtures (showcase/docker-compose.{record,replay}.yml, showcase/scripts/record-d5-fixtures.mjs) stays — it is reusable for future demos where canonical fixtures don't yet cover the prompts — just without the misleading initial recordings. Bucket-C cells that remain at D4 after this change require fixes outside the fixture/recording scope; see the PR description for per-cell findings (release-blocked package testids, frontend-tool dispatch defect, suggestion-bar misrender, resume-from-interrupt UI, built-in reasoning-message testid). |
||
|
|
88b61cb3e4 | style: auto-fix formatting | ||
|
|
f8c711d2bb |
feat(showcase): aimock record/replay infra for deterministic D5 fixtures
Adds a record/replay loop on top of the existing local Docker stack so each langgraph-python D5 demo can capture real-LLM responses once and replay them deterministically thereafter. One fewer source of D5 flake per demo: no more 'tests pass with real OpenAI / fail with aimock' because the prompts have no fixture coverage. What lands here: - showcase/docker-compose.record.yml — overlays aimock with --record + --provider-openai/anthropic and a writable mount for the recording dir. Drops the baseline d5-all.json/feature-parity.json/smoke.json loads so prompts that already match a stale fixture can still proxy through to the real provider. - showcase/docker-compose.replay.yml — same writable mount, no --record, no provider URLs; layers the per-demo fixtures alongside the baseline ones for normal probe runs. - showcase/scripts/record-d5-fixtures.mjs — orchestrator. For each demo (catalog feature ID), drops any prior consolidated <slug>.json, restarts aimock to clear in-memory recorded fixtures, snapshots recorded/, runs the d5 probe through pnpm exec tsx, then merges every per-call file written under recorded/ into a single showcase/aimock/d5-recorded/<slug>.json (one fixture per LLM turn, in chronological order). - showcase/aimock/d5-recorded/<slug>.json × 6 — initial recordings for the still-red bucket-C cells: beautiful-chat (8), gen-ui-interrupt (2), gen-ui-tool-based (1), headless-complete (1), reasoning-custom (1), tool-rendering-default-catchall (2). 15 fixtures total. - showcase/aimock/d5-recorded/.gitignore — keeps the per-call recorded/ scratch dir out of the tree (orchestrator deletes per-call files after consolidation, this just guards against re-runs). D5 impact: replaying the recordings flips d5:langgraph-python/gen-ui-custom (catalog gen-ui-tool-based) from red to green deterministically. The other five demos still fail their UI or assertion-side checks, but their LLM-side responses are now fixed, so the remaining work is probe/UI fixes against a stable baseline rather than flake hunting. Aimock recorder requires a one-line patch (turnIndex + hasToolResult on each recorded fixture's match) for multi-turn flows to record correctly. Upstream fix proposed for @copilotkit/aimock; until it ships, the orchestrator probes for the patch and aborts loudly with the missing-fields message rather than silently producing single-turn fixtures. See the script's header comment for the exact patch payload. |
||
|
|
920e0bcc01 |
fix(showcase/langgraph-python): flip auth, frontend-tools, voice from D4 to D5 (#4724)
## Summary Three independent D5 fixes for the langgraph-python column. Together these flip 3 cells from D4 → D5 in the showcase dashboard. Production also has these same D4 cells, so the harness/showcase changes here apply to prod as well once merged. - **auth** — conversation runner now defers chat-input resolution until after the first turn's `preFill` runs, so idiomatic auth demos that mount the chat tree only after a sign-in click work end-to-end. - **frontend-tools** — D5 assertion accepts any chromatic-family hex via RGB-channel-dominance, not just the fixture-pinned substrings. Real OpenAI returned valid forest greens (`#005f00`, `#4caf50`) that the fixed substring list couldn't enumerate. - **voice** — disabled `<cpk-web-inspector>` on the voice demo. The dev-only inspector auto-mounts on any localhost host (including local Docker at `localhost:3100`) and intercepts pointer events on the voice sample-audio button. Production isn't localhost, so prod was unaffected — that's why prod was D5 and local was D4. Each commit is scoped to one fix with regression tests where applicable. ## Verification Verified locally against a fresh `aimock` + `pocketbase` + `dashboard` + `langgraph-python` stack with real `OPENAI_API_KEY`: | Cell | Before | After | |---|---|---| | `d5:langgraph-python/auth` | red | green | | `d5:langgraph-python/frontend-tools` | red | green | | `d5:langgraph-python/voice` | red | green | Harness tests added: - `conversation-runner.test.ts` — pins the post-fix invariant: cascade probe throws while the chat input is unmounted, `preFill` makes it visible, runner then resolves and proceeds. Without the fix the runner would resolve up-front and time out. - `d5-frontend-tools.test.ts` — two new tests: accepts arbitrary green hex via channel-dominance (real-LLM nondeterminism guard), and still rejects sunset-hex emitted under the forest pill (regression guard so the fallback can't degrade into "any color passes"). All 42 tests in the affected files pass; format and oxlint both clean on touched files. ## Test plan - [ ] CI green on the `langgraph-python` D5 cron (auth, frontend-tools, voice) - [ ] Production `dashboard.showcase.copilotkit.ai` shows 3 D4 → D5 transitions on the langgraph-python column after deploy - [ ] No regression on the rest of the langgraph-python column |
||
|
|
247f061456 |
fix(showcase/langgraph-python): disable inspector on voice demo for D5 parity
The voice demo's <CopilotKit> didn't pass enableInspector, so
shouldShowDevConsole(undefined) defaulted to isLocalhost(), which
auto-mounts <cpk-web-inspector> on any local Docker host
(localhost:3100 in showcase compose). The inspector overlay
intercepts pointer events on top of the voice sample-audio button,
so dev/D5 probe runs can't click it through Playwright.
Production isn't localhost, so the inspector never mounts there —
voice is D5 in prod and D4 locally for this reason alone. Set
enableInspector={false} explicitly so the demo behaves the same in
both environments.
Probe result: d5:langgraph-python/voice flips green.
|
||
|
|
2e27b8c7c2 |
fix(showcase/harness): accept arbitrary green hex via channel-dominance fallback
PILL_GRADIENT_HINTS pinned the fixture/aimock output deterministically with a fixed substring list (color words + the exact hex codes from the fixtures). Real OpenAI emits any chromatic-family hex (e.g. forest as '#005f00 / #4caf50') that the fixed substring list can't enumerate, so the assertion failed for valid green output. Add a channel-dominance fallback: parse all 6-digit hex codes from the gradient and accept when at least one satisfies the per-pill RGB rule (g > r && g > b for forest, r > g && r > b for sunset, b > g or purple-channel for cosmic). MIN_DOMINANCE_DELTA + MIN_DOMINANT_VALUE prevent near-grey or near-black hexes from cross-matching. Word and fixture-hex match still runs first; channel-dominance is the fallback only. Probe result: d5:langgraph-python/frontend-tools flips green. |
||
|
|
8b095e1340 |
fix(showcase/harness): defer chat-input cascade until after preFill
Idiomatic auth demos (langgraph-python) render a SignInCard until the user clicks 'Sign in with demo token' — the chat textarea only mounts after that click, which preFill performs. The conversation runner was resolving the chat-input cascade up front, before any turn-level preFill ran, so the cascade timed out at 5s on SignInCard and turn 1 failed with 'chat input not found'. Move resolution and the initial assistant-message baseline into the per-turn loop, lazy on first turn. Subsequent turns reuse the cached selector. Probe result: d5:langgraph-python/auth flips green. |
||
|
|
f5987af1fd |
chore(showcase): snippet sweep pre-cutover (region markers + state-streaming unsupported flips) (#4717)
## Summary Closes the remaining yellow-box snippet gaps in shell-docs ahead of the Tue 5/12 cutover. Replaces 5 individual one-PR-per-framework attempts with a single consolidated PR. ## What's in here **Region marker additions** (5 commits, comment-only changes — zero runtime impact): - `claude-sdk-typescript` `gen-ui-interrupt::backend-tool-call` — sibling teaching file (no per-demo backend in claude-sdk-ts; mirrors claude-sdk-python's Strategy B SYSTEM_PROMPT shape) - `langroid` `gen-ui-interrupt::backend-tool-call` — in-place around the existing `ScheduleMeetingTool` `ToolMessage` subclass (preserves langroid's idiom — no forced LangGraph shape) - `pydantic-ai` `gen-ui-tool-based::bar-chart-renderer` — sibling teaching file (production demo is haiku-generator via `useFrontendTool`, not a `useComponent` bar-chart) - `spring-ai` `shared-state-streaming` (2 regions: `frontend-use-coagent-state` + `state-streaming-middleware`) — in-place; backend Java file already in `manifest.yaml` `highlight:` - `strands` `gen-ui-interrupt::backend-tool-call` — in-place around the canonical `@tool def schedule_meeting` All follow the [Mastra Round playbook](https://www.notion.so/34f3aa38185281c0b41dc6b6c63c89c6) for in-place vs sibling decisions. **Catalog flips** (2 commits, manifest-only): - 11 non-LangGraph frameworks: move `shared-state-streaming` from `features` to `not_supported_features` (ag2, agno, claude-sdk-{python,typescript}, crewai-crews, langroid, llamaindex, mastra, ms-agent-{dotnet,python}, pydantic-ai) - 6 more without working demos: built-in-agent, google-adk, strands, langgraph-typescript, langgraph-fastapi, spring-ai - Per team's call 2026-05-07: state-streaming only works on LangGraph variants currently. Anything without a working demo gets the blue `UnsupportedBox` instead of yellow `Missing snippet` warnings. Engineering can flip these back to `features` once impls land. Final catalog state for `shared-state-streaming`: 17 unsupported, 1 wired (`langgraph-python` — canonical reference). ## Why now This PR is cutover-blocking. Sam's bar for Tuesday: zero yellow boxes anywhere in shell-docs. The current state had 33+ yellow boxes from the post-2026-04-29 audit refresh; this PR drives that to zero (in conjunction with the previously-merged PDX-122 fix in #4685). ## Verification - `npx tsx showcase/scripts/bundle-demo-content.ts` — all newly-marked regions resolve in `demo-content.json` - `npx tsx showcase/scripts/generate-registry.ts` — catalog regenerates clean with the manifest changes - Generated `catalog.json` files are gitignored artifacts; not in this diff ## Test plan - [ ] Build shell-docs locally: `cd showcase/shell-docs && npm run build` clean - [ ] Visit a few `shared-state/streaming.mdx` pages on framework variants — should render the blue "Not supported on X" box for the 17 unsupported frameworks - [ ] Visit `langgraph-python/shared-state/streaming.mdx` — should still render the working snippets - [ ] Visit the 4 fixed B-cell pages (claude-sdk-typescript/langroid/strands `human-in-the-loop/useInterrupt.mdx`, pydantic-ai `generative-ui/tool-based.mdx`, spring-ai `shared-state/streaming.mdx`) — all snippets resolve, no yellow boxes |
||
|
|
afcc7e4880 |
feat(shell-docs): add sitemap, robots, and per-framework self-canonical metadata (#4703)
## Summary
Phase 3 of the docs.copilotkit.ai cutover. Surfaces a complete sitemap,
basic robots config, and per-framework self-canonical metadata so every
URL variant is indexed under its own canonical instead of collapsing
onto a single root.
- **sitemap.ts** — emits one entry per (root URL × framework variant)
pair plus reference, AG-UI, and per-framework override pages.
`lastModified` resolves from MDX frontmatter \`lastmod\` first, then
file mtime, then \`new Date()\`. Strips Next.js route-group \`(name)\`
segments and trailing \`/index\` so URLs match what the routers actually
serve. ~2,250 entries.
- **robots.ts** — allow all, disallow \`/api/\`, sitemap pointer at
\`\${NEXT_PUBLIC_BASE_URL}/sitemap.xml\`.
- **sitemap-helpers.ts** — shared MDX walking + base-URL resolution.
- **generateMetadata()** added to the four catch-all docs routes
(\`[[...slug]]\`, \`[framework]/[[...slug]]\`, \`reference/[...slug]\`,
\`ag-ui/[[...slug]]\`). Each sets \`alternates.canonical\` to the page's
own full URL — per-framework self-canonical, not root canonical. So
\`/langgraph-python/quickstart\` declares itself canonical,
\`/agno/quickstart\` declares itself canonical, and the bare
\`/quickstart\` declares itself canonical too.
- **.env.example** — documents \`NEXT_PUBLIC_BASE_URL\` and
\`NEXT_PUBLIC_SHELL_URL\`. Extended the existing comment in
\`next.config.ts\` with the new consumers.
## Test plan
- [x] \`npm run build\` from \`showcase/shell-docs/\` passes; route
table shows \`/sitemap.xml\` and \`/robots.txt\` as static.
- [x] \`curl http://localhost:3099/sitemap.xml\` returns valid XML;
2,254 \`<url>\` entries covering bare unscoped, framework-scoped,
reference, and AG-UI URLs; no \`(other)\` route-group leakage; no
trailing \`/index\` artifacts.
- [x] \`curl http://localhost:3099/robots.txt\` returns the expected
User-Agent / Allow / Disallow / Sitemap config.
- [x] \`/shared-state\` HTML contains \`<link rel="canonical"
href=".../shared-state">\`.
- [x] \`/langgraph-python/quickstart\` HTML contains \`<link
rel="canonical" href=".../langgraph-python/quickstart">\` (NOT pointing
at the bare \`/quickstart\`).
- [x] \`/agno/quickstart\` and \`/reference/components/CopilotChat\` and
\`/ag-ui/concepts/architecture\` all self-canonical.
|