Commit Graph

3 Commits

Author SHA1 Message Date
Jordan Ritter 19271bf5c9 Un-skip KPI dashboard and Status report declarative-gen-ui tests
The two tests were skipped (W8-7) under the assumption that Railway
agent slowness caused timeouts. The actual root cause was twofold:

1. Fixture content+toolCalls split (already fixed in 2436adba6 for all
   four pills including KPI and StatusReport).

2. CSS selector mismatch: the tests used inline-style selectors
   (letter-spacing: 0.12em, border-radius: 999) but the renderers use
   Tailwind classes (tracking-wider, rounded-md). Switched both tests
   to use the data-testid attributes already present on the components
   (declarative-metric, declarative-status-badge).

Verified 6/6 pass on both LGP (3100) and LGT (3101). LGP and LGT
test specs are byte-identical.
2026-05-19 06:01:31 -07:00
Alem Tuzlak 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).
2026-05-08 19:07:52 +02:00
Jordan Ritter dd06dd89d1 refactor(showcase): rename packages/ to integrations/
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.
2026-04-28 07:47:35 -07:00