showcase/integrations/langgraph-python/qa/a2ui-fixed-schema.md
/demos/a2ui-fixed-schema on the dashboard hostOPENAI_API_KEY is set on Railway; LANGGRAPH_DEPLOYMENT_URL points at a LangGraph deployment exposing the a2ui_fixed graph (registered as agent name a2ui-fixed-schema — see src/app/api/copilotkit-a2ui-fixed-schema/route.ts)data-testid attributes. Checks below rely on verbatim visible text, DOM structure, and the two JSON schemas under src/agents/a2ui_schemas//demos/a2ui-fixed-schema; verify the page renders within 3s and a single CopilotChat pane is centered (max-width ~896px, rounded-2xl, full-height)runtimeUrl="/api/copilotkit-a2ui-fixed-schema" and agent="a2ui-fixed-schema" (DevTools → Network: sending a message hits that endpoint)includeBasicCatalog)display_flight call, verify the response stream contains an a2ui_operations container with catalogId: "copilotkit://flight-fixed-catalog" (matches CATALOG_ID in src/agents/a2ui_fixed.py and src/app/demos/a2ui-fixed-schema/a2ui/catalog.ts)FLIGHT_SCHEMA component tree (12 nodes from src/agents/a2ui_schemas/flight_schema.json: root, content, title, route, from, arrow, to, meta, airline, price, bookButton, bookButtonLabel)display_flight tool → flight_schema.json)flight_schema.json:
Card with a Column of children in this order: title row, route row, meta row, book buttonTitle node renders the literal text "Flight Details" (1.15rem / 600 weight, color #010507)route row shows Airport "SFO" → Arrow (→, color #AFAFB7) → Airport "JFK" (both monospaced, 1.5rem, 600 weight, 0.05em letter-spacing)meta row shows AirlineBadge "UNITED" (uppercase pill, lilac #BEC2FF border, 0.08em tracking) on the left and PriceTag "$289" (monospaced, color #189370, 1.1rem / 600 weight) on the rightButton renders full-width with label "Book flight" (black #010507 background, white text, 12px radius)SFO, destination=JFK, airline=United, price=$289) — each is a { path: "/..." } binding in the schema and must reach the DOM as a plain string via the GenericBinder (no literal {path} leak and no React error #31)Button override)rgba(133, 236, 206, 0.15) with border #85ECCE4D#189370)polyline 20 6 9 17 4 12, stroke #189370) appears to the left of the labelbook_flight is intentionally not wired (see comment in src/agents/a2ui_fixed.py — SDK doesn't yet accept action_handlers=). So the booked_schema.json swap is NOT expected to occur. Verify only the local optimistic button state change.booked_schema.json — wired-but-inert)src/agents/a2ui_schemas/booked_schema.json exists and declares a 3-node tree (root Column with children title + detail, both Text with path bindings /title and /detail). No runtime check — the schema is kept so the handoff is ready once the SDK supports action_handlers. Log a test note if this file is ever removed.LAX, destination=ORD, airline=DELTA, price=$412 (same schema, new data model — proves the fixed-schema pattern: schema once, data streams)display_flight (no flight card rendered, no a2ui_operations in the response)DynString union in a2ui/definitions.ts is what prevents this, so a single occurrence is a regressiondisplay_flight is called exactly once per search prompt; result contains an a2ui_operations container with catalogId: "copilotkit://flight-fixed-catalog" and the full 12-node flight schemaa2ui/renderers.tsx (Title, Airport, Arrow, AirlineBadge, PriceTag, plus the stateful Button override) render at least once per search-flights run{path} leak into the DOM, no uncaught console errors