Commit Graph

12110 Commits

Author SHA1 Message Date
Jordan Ritter 28eabe87da fix(showcase/langgraph-typescript): sync e2e test fixes from LGP
Copy updated tool-rendering-default-catchall.spec.ts and
frontend-tools.spec.ts from LGP. Also update page.tsx to import
useSuggestions() from ./suggestions (same fix as LGP).
2026-05-17 09:58:30 -07:00
Jordan Ritter 3889d934e8 fix(showcase/langgraph-python): fix selector mismatches in e2e tests
tool-rendering-default-catchall: page.tsx had inline 3-pill config but
suggestions.ts exists with 4 pills (including "Chain tools"). Switched
page.tsx to import useSuggestions() from ./suggestions so all 4 pills
render, matching the test expectations.

frontend-tools: test used stale selectors ("background-container",
"var(--copilot-kit-background-color)", "Change background" pill) that
didn't match the actual demo code. Updated test to use the real
data-testid ("frontend-tools-background"), real default ("#4f46e5"),
and real pill names ("Sunset/Forest/Cosmic theme").
2026-05-17 09:58:23 -07:00
Jordan Ritter b645d821a0 fix(showcase/langgraph-typescript): align declarative-hashbrown/json-render route IDs to LGP
Rename byoc-hashbrown -> declarative-hashbrown and
byoc-json-render -> declarative-json-render across demo directories,
API route directories, manifest.yaml feature/demo IDs, runtime
endpoint paths, agent names, and page header text to match the
langgraph-python reference integration.

Internal graph IDs (byoc_hashbrown, byoc_json_render) and agent
source files (src/agent/byoc-hashbrown.ts) retain their names,
matching how LGP keeps byoc_hashbrown_agent.py internally.

The e2e tests already expected /demos/declarative-* routes, so this
resolves the 404 mismatch.
2026-05-17 09:37:32 -07:00
Jordan Ritter 121e85c7c0 fix(showcase/langgraph-typescript): align open-gen-ui-advanced to LGP gold standard
Copy all LGP files exactly: page.tsx, sandbox-functions.ts, suggestions.ts.
2026-05-17 09:35:54 -07:00
Jordan Ritter a961ea9389 fix(showcase/langgraph-typescript): align open-gen-ui to LGP gold standard
Copy all LGP files exactly: page.tsx, chat.tsx, design-skill.ts,
suggestions.ts.
2026-05-17 09:35:52 -07:00
Jordan Ritter a45cfc3fbb fix(showcase/langgraph-typescript): align mcp-apps to LGP gold standard
Copy all LGP files exactly: page.tsx, chat.tsx, suggestions.ts.
2026-05-17 09:35:51 -07:00
Jordan Ritter aaf62952a9 fix(showcase/langgraph-typescript): align interrupt-headless to LGP gold standard
Copy page.tsx exactly from LGP.
2026-05-17 09:35:50 -07:00
Jordan Ritter e50e3ce8fc fix(showcase/langgraph-typescript): align hitl-in-app to LGP gold standard
Copy all LGP files exactly: page.tsx, approval-dialog.tsx, suggestions.ts,
tickets-panel.tsx.
2026-05-17 09:35:49 -07:00
Jordan Ritter 328e076a54 fix(showcase/langgraph-typescript): align gen-ui-interrupt to LGP gold standard
Copy all LGP files exactly: page.tsx, suggestions.ts,
_components/{badge,button,card,time-picker-card}. Delete LGT-only
time-picker-card.tsx from cell root (moved to _components/).
2026-05-17 09:35:47 -07:00
Jordan Ritter d632dc2f4d fix(showcase/langgraph-typescript): align declarative-gen-ui to LGP gold standard
Copy all LGP files exactly: page.tsx, chat.tsx, suggestions.ts,
a2ui/{catalog,definitions,renderers}, _components/{badge,button,card,separator}.
2026-05-17 09:35:44 -07:00
Jordan Ritter dae504efa0 fix(showcase/langgraph-typescript): align a2ui-fixed-schema to LGP gold standard
Copy all LGP files exactly: page.tsx, chat.tsx, suggestions.ts,
a2ui/{catalog,definitions,renderers}, _components/{badge,button,card,separator}.
Also add _shared/interrupt-fallback-slots.ts needed by interrupt cells.
2026-05-17 09:35:36 -07:00
Jordan Ritter 6a4f89375c fix(showcase/langgraph-typescript): sync e2e tests from LGP
Identical heading and web-inspector fixes as the LGP commit.
2026-05-17 07:58:46 -07:00
Jordan Ritter 74afc4e1a2 fix(showcase/langgraph-python): update e2e tests to match demo content
Fix heading assertions to match actual demo headings ('Sidebar demo'
and 'Popup demo' instead of the longer inline-pattern versions).
Use JS-level .click() to bypass cpk-web-inspector overlay that
intercepts Playwright pointer events on localhost (same pattern
as harness probes in _genuine-shared.ts:clickByJs).
2026-05-17 07:58:43 -07:00
Jordan Ritter 48dfa1b026 fix(showcase/langgraph-typescript): align all e2e tests to LGP gold standard
Copy all 37 LGP test files to LGT verbatim, replacing the 10
existing LGT-specific tests and adding 27 new ones. Delete
shared-state-write.spec.ts which has no LGP counterpart. The
LGT demo pages have already been aligned to match LGP's UI,
testids, and selectors, so LGP's tests should work as-is.
2026-05-17 07:47:32 -07:00
Jordan Ritter f892649e86 fix(showcase/aimock): remove mixed content+toolCalls from flights fixture
@langchain/openai places tool_calls from mixed content+toolCalls responses
into additional_kwargs.tool_calls (not top-level .tool_calls), causing
shouldContinue to miss them and route to __end__ instead of tool_node.
Real OpenAI sends tool_calls with content: null — no mixing.

Note: 24 other d5-all.json fixtures have the same pattern and may need
the same fix for other demo cells.
2026-05-17 07:47:32 -07:00
Jordan Ritter 3081bc2c42 fix(showcase/langgraph-typescript): readonly-state context injection
matches SDK middleware

Replace the array-of-{value:string} extraction with the same logic used
by createAppContextBeforeAgent in CopilotKitMiddleware: treat context as
a string or JSON-serializable object, stringify it, and inject as a
separate "App Context:" system message after the main system prompt.

Fixes 2 of 9 remaining LGT cell failures (Who am I?, Suggest next
steps on the readonly-state-agent-context page).
2026-05-17 07:47:32 -07:00
Jordan Ritter cdb08501ef fix(showcase/langgraph-typescript): route tool-rendering to dedicated agent
Move "tool-rendering" from starterAgentNames (which maps to the generic
starterAgent graph) into the demoAgents section, mapping it to a new
tool_rendering graph ID that points to ./tool-rendering.ts:graph -- the
same backend as tool-rendering-default-catchall and
tool-rendering-custom-catchall.

Added tool_rendering entry to langgraph.json, server.mjs, and route.ts
so all three stay in sync.

Fixes 7 of 9 remaining LGT cell failures (Weather, Flights, Stock,
Dice, Chain suggestions on tool-rendering page; Find flights on both
default-catchall and custom-catchall).
2026-05-17 07:47:31 -07:00
Jordan Ritter 8ac862722c fix(showcase/langgraph-typescript): align tool-rendering agent closer to LGP
1. Model: gpt-4o-mini -> gpt-5.4 to match LGP
2. System prompt: remove "helpful", use "Use the mock tools" to match LGP
3. get_stock_price: add optional price_usd/change_pct params for
   deterministic test fixtures, matching LGP schema and return shape
4. get_weather description: remove extra "Useful on its own..." text
5. search_flights description: remove extra "Pairs naturally..." text
6. get_stock_price description: match LGP docstring explaining the
   deterministic override pattern
7. CopilotKit integration: replace bare createReactAgent with full
   StateGraph + CopilotKitStateAnnotation + convertActionsToDynamicStructuredTools
   + frontend action routing, matching the pattern used by all other LGT agents
2026-05-17 07:47:31 -07:00
Jordan Ritter 98c8e2786a fix(showcase/langgraph-typescript): align readonly-state agent closer to LGP 2026-05-17 07:47:31 -07:00
Jordan Ritter 0544255af5 fix(showcase/langgraph-typescript): align gen-ui-agent closer to LGP
Add recursionLimit: 50 to graph.compile() to match LGP's
.with_config({"recursion_limit": 50}). The prompt drives ~7 set_steps
cycles + 1 final model turn (~15 supersteps); 50 gives ~3x headroom
for LLM retries.

System prompt, tool schema (Step fields: id, title, status), and tool
description already match character-for-character.
2026-05-17 07:47:31 -07:00
Jordan Ritter 7f8180d721 fix(showcase/langgraph-typescript): readonly-state agent injects context + fixture fallback
The LGT readonly-state agent was ignoring copilotkit.context, so
useAgentContext values never reached the model. Now the chatNode
reads state.copilotkit.context entries and appends them to the
system message, matching what CopilotKitMiddleware does on the
Python side.

Also adds non-gated aimock fixtures in feature-parity.json for
both the "Who am I?" and "Suggest next steps" pills so they
match without requiring the Atai-specific systemMessage gate
that only fires when LGP's middleware is in play.
2026-05-17 07:47:31 -07:00
Jordan Ritter 3c26f6a5df feat(showcase/langgraph-typescript): add gen-ui-agent matching LGP 2026-05-17 07:47:31 -07:00
Jordan Ritter 2324241384 fix(showcase/langgraph-typescript): rename roll_dice to roll_d20 matching LGP 2026-05-17 07:47:31 -07:00
Jordan Ritter 04977d202f fix(showcase/langgraph-typescript): bump @ag-ui/langgraph to 0.0.32
Fixes "message type returned from LangGraph is not supported" error
for search_flights. The dependency is transitive (via @copilotkit/runtime
and @copilotkit/sdk-js), so npm overrides are used to force 0.0.32.
2026-05-17 07:47:30 -07:00
Jordan Ritter 78b35b32de fix(showcase/langgraph-typescript): align subagents to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter c328f59bfc fix(showcase/langgraph-typescript): align gen-ui-agent to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 7e101b5ecb fix(showcase/langgraph-typescript): align gen-ui-tool-based to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 84a8b24022 fix(showcase/langgraph-typescript): align tool-rendering to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 7d60c3a813 fix(showcase/langgraph-typescript): align readonly-state-agent-context to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 86244f7a48 fix(showcase/langgraph-typescript): align shared-state-streaming to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 784c77d432 fix(showcase/langgraph-typescript): align shared-state-read-write to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 4be79861b8 fix(showcase/langgraph-typescript): align tool-rendering-reasoning-chain to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 04887c3022 fix(showcase/langgraph-typescript): align tool-rendering-custom-catchall to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 931385ac8e fix(showcase/langgraph-typescript): align tool-rendering-default-catchall to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 0413a3c849 fix(showcase/aimock): add catch-all fixture for neutral assistant demos 2026-05-17 07:47:29 -07:00
Jordan Ritter df6ae290d0 fix(showcase/langgraph-typescript): voice route uses starterAgent graph ID 2026-05-17 07:47:29 -07:00
Jordan Ritter e4d9279984 fix(showcase/langgraph-typescript): add shadcn/ui components and deps for LGP parity 2026-05-17 07:47:29 -07:00
Jordan Ritter e039f24b60 fix(showcase/langgraph-typescript): align headless-complete to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter a6b08e5e31 fix(showcase/langgraph-typescript): align multimodal to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 49304976e0 fix(showcase/langgraph-typescript): align headless-simple to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 845554496f fix(showcase/langgraph-typescript): align auth to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 1e1314cc36 fix(showcase/langgraph-typescript): align agent-config to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 475bd0807e fix(showcase/langgraph-typescript): align chat-customization-css to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter bcb9ad05f8 fix(showcase/langgraph-typescript): align frontend-tools to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 0115f1285d fix(showcase/langgraph-typescript): align voice to LGP gold standard 2026-05-17 07:47:27 -07:00
Jordan Ritter 1dd5fbecae fix(showcase/aimock): add 9 recorded LGT beautiful-chat fixtures 2026-05-17 07:47:27 -07:00
Jordan Ritter 7567843e52 fix(showcase/aimock): add recorded LGT fixtures for beautiful-chat multi-turn flows
Record-replay from LGT with real OpenAI key captures the exact request
format the LangGraph TS agent sends through the CopilotKit pipeline.
Covers Sales Dashboard (A2UI Dynamic), Calculator (Open Gen UI), and
Task Manager (Shared State) — all of which failed locally because
hand-written fixtures didn't match the LGT request format.

Also adds d5-recorded directory to docker-compose.local.yml fixture
loading so recordings replay automatically.
2026-05-17 07:47:27 -07:00
Jordan Ritter 797762eff4 fix(showcase/aimock): add beautiful-chat fixtures for sales dashboard, calculator, search flights
Sales Dashboard: add query_data turn-0 fixture and generate_a2ui
turn-1 fixture; remove hasToolResult:false from _design_a2ui_surface
and render_a2ui sub-fixtures so they match after query_data returns.

Calculator: add generateSandboxedUi fixture with metric shortcut
buttons (Revenue, Customers, Conv%, category breakdowns) plus
toolCallId response.

Search Flights: already covered by existing "flights from SFO to JFK"
fixture — no changes needed.
2026-05-17 07:47:27 -07:00
Jordan Ritter dc47a9ce9a fix(showcase/langgraph-typescript): align frontend-tools-async to LGP gold standard 2026-05-17 07:47:27 -07:00
Jordan Ritter 80f39b9548 fix(showcase/aimock): add fixtures for pilot cell suggestions 2026-05-17 07:47:27 -07:00