Commit Graph

12110 Commits

Author SHA1 Message Date
Jordan Ritter b6b35bd406 fix(showcase): restore sandboxed-UI jsFunctions in gen-ui-open-advanced fixtures 2026-06-02 17:57:47 -07:00
Jordan Ritter 3ca0a26f11 fix(showcase): gate LGP tool-rendering AAPL + Find-flights fixtures on toolName 2026-06-02 17:57:47 -07:00
Jordan Ritter a835b41e3e fix(showcase): bump @ag-ui/langgraph to 0.0.36 in langgraph integrations (#5171)
## Summary

Carries [ag-ui PR
#1784](https://github.com/ag-ui-protocol/ag-ui/pull/1784)
("fix(langgraph): skip regeneration check when `command.resume` is set")
into the three langgraph showcase stacks, greening the
`gen-ui-interrupt` D6 cell.

- ag-ui `@ag-ui/langgraph` 0.0.35 (and earlier) incorrectly ran the
regenerate path on a **resumed** run, tripping the regeneration trap and
breaking gen-ui-interrupt. `0.0.36` adds the `command.resume` guard so a
resume skips the regeneration check.
- Pins `@ag-ui/langgraph` `0.0.36` via npm `overrides` (it is a
**transitive** dep of `@copilotkit/runtime`) in `langgraph-python`,
`langgraph-typescript`, and `langgraph-fastapi`.
- Regenerates each integration's `package-lock.json` (python/fastapi
regenerated with `--legacy-peer-deps`, matching their Dockerfile `npm ci
--legacy-peer-deps`).

## Files changed

-
`showcase/integrations/langgraph-typescript/{package.json,package-lock.json}`
-
`showcase/integrations/langgraph-python/{package.json,package-lock.json}`
-
`showcase/integrations/langgraph-fastapi/{package.json,package-lock.json}`

Lockfiles flip `@ag-ui/langgraph` 0.0.34 → 0.0.36 and pull in 0.0.36's
new transitive dep `@ag-ui/a2ui-toolkit@0.0.1-alpha.3`.

## Verification

- `@ag-ui/langgraph@0.0.36` is published to npm `latest`; its
`dist/index.js` contains the `!command?.resume` regeneration guard from
#1784.
- All three regenerated lockfiles resolve
`node_modules/@ag-ui/langgraph` to `0.0.36`.

## Test plan

- [ ] CI green
- [ ] gen-ui-interrupt D6 cell green for langgraph-python,
langgraph-typescript, langgraph-fastapi after showcase rebuild + re-run
2026-06-02 16:54:50 -07:00
Maxim 78492cc1c5 fix(saas-demo): remove dead react-ui styles import and inline v2 css
The banking showcase was migrated to CopilotKit v2 but `src/app/layout.tsx`
still imported the removed `@copilotkit/react-ui/styles.css`, causing every
route to 500 with "Module not found". Drop the dead import.

Banking is still on Tailwind v3, while the v2 stylesheet
(`@copilotkit/react-core/v2/styles.css`) is pre-compiled Tailwind v4 output
containing bare `@layer base { ... }` rules. Tailwind v3's PostCSS plugin
rejects `@layer base` without a matching `@tailwind base` directive, so any
CSS import routed through the JS/TSX pipeline fails the build. Move the v2
stylesheet load to a server-side `fs.readFileSync` + inline `<style>` tag in
the root layout so the CSS reaches the browser without passing through
PostCSS / Tailwind v3. This avoids a full Tailwind v4 migration of the app.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 01:21:38 +02:00
Maxim 3edcab4759 fix(saas-demo): await dynamic route params for Next 16 compatibility 2026-06-03 00:39:59 +02:00
Jordan Ritter 72156dbb83 fix(showcase): bump @ag-ui/langgraph to 0.0.36 in langgraph integrations
Carries ag-ui PR #1784 (skip regeneration check when command.resume is
set) into the three langgraph showcase stacks. ag-ui 0.0.35 incorrectly
ran the regenerate path on a resumed run, breaking the gen-ui-interrupt
D6 cell. 0.0.36 adds the command.resume guard.

Pins @ag-ui/langgraph 0.0.36 via npm overrides (transitive dep of
@copilotkit/runtime) in langgraph-python, langgraph-typescript, and
langgraph-fastapi, and regenerates each per-integration package-lock.json.
2026-06-02 15:17:41 -07:00
Tyler Slaton f878892761 docs(shell-docs): recommend v2 CopilotKit provider import (#5163)
## Problem

Shell-docs had conflicting v2 guidance around the provider import path.
Some migration/reference/quickstart pages either recommended
`CopilotKitProvider` or kept `CopilotKit` examples on the root
`@copilotkit/react-core` package even though v2 docs should import the
`CopilotKit` component from `@copilotkit/react-core/v2`.

## Why

The correct recommendation is the `CopilotKit` component name, imported
from the v2 entrypoint. Leaving root-package imports in v2-facing docs
makes the migration and reference guidance contradict the v2 package
layout.

## Fix

- Recommend `CopilotKit` from `@copilotkit/react-core/v2`, not
`CopilotKitProvider`.
- Update v2 migration, reference, and quickstart examples to use the v2
provider/style entrypoints.
- Leave root `@copilotkit/react-core` imports only in v1 docs and
explicit migration “Before” examples.
- Add regression coverage for stale provider/style package paths.
- Fix the shell-docs SignupLink SSR test typing exposed by typecheck.

Closes #5153
2026-06-02 15:17:09 -07:00
Jordan Ritter 982b0b3d1e fix(showcase): gate LGP AAPL tool-rendering fixture on toolName not hasToolResult
The D6 cell tool-rendering-custom-catchall for langgraph-python timed out
(deterministic 30s no-response). The probe sends two turns in one thread:
turn 1 "weather in Tokyo" -> get_weather, turn 2 "What's the current price
of AAPL?" -> get_stock_price. The AAPL first-leg fixture was gated on
hasToolResult:false, but aimock implements that gate as
messages.some(m => m.role === "tool") -- i.e. ANY tool message anywhere in
the thread. Turn 1's get_weather leaves a tool result in the thread, so on
turn 2 hasToolResult is permanently true and the false gate can never match
-> no_fixture_match -> 503 -> 30s timeout.

Replace the broken hasToolResult:false gate with toolName:"get_stock_price"
(the same pattern the sibling weather/chain first-leg fixtures already use).
A toolName gate fires whenever the tool is registered, regardless of prior
tool results; the toolCallId follow-up fixture still wins on iteration 2.

Fixture-only change. Verified locally via the D6 Docker path:
tool-rendering-custom-catchall now green (turn 1 get_weather + turn 2
get_stock_price both render, no 503/timeout); tool-rendering-default-catchall
still green (no regression).
2026-06-02 15:14:19 -07:00
Jordan Ritter ea87e6f06f fix(showcase): restore sandboxed-UI jsFunctions in D6 gen-ui-open-advanced fixtures
The generateSandboxedUi calculator (and the ping-host / inline-evaluator
pills) rendered static HTML with no interactivity — the = and keypad
buttons were no-ops — because the affected per-integration fixtures
omitted the jsFunctions key that the OpenGenerativeUIRenderer injects
into the iframe to wire click handlers to the host bridge
(Websandbox.connection.remote.evaluateExpression / notifyHost).

Copy the jsFunctions VERBATIM from the canonical langgraph-typescript
fixture (apples-to-apples) into agno, crewai-crews, langgraph-fastapi,
and mastra, and create the missing langgraph-python advanced fixture
(Calculator + Ping pills; the inline evaluator already lives in
gen-ui-open.json). Fixture-only change; the renderer is correct.
2026-06-02 14:54:38 -07:00
Maxim e1f12dcd4d feat(saas-demo): credible identity + consistent currency formatting
- Replace toy team names and @example.com emails with credible
  professional names and @northwind.example addresses (preserve ids,
  roles, team assignments). Default Admin is Alex Morgan.
- Set <title> metadata to IDENTITY.brand (Northwind Finance).
- Add formatCurrency helper in lib/utils.ts and route all money
  rendering (transactions list, credit-card details, dashboard +
  cards summary tiles) through it so amounts always render as
  $10,000.00 / -$1,000.00.
- Instruct the Northwind Copilot prompt to treat the rendered
  showTransactions list as the single source of truth so prose no
  longer restates counts/totals and contradicts the rendered list.
- Remove stray console.log and tighten == to === in components/layout.tsx.
2026-06-02 23:54:14 +02:00
Maxim 6bfac07de3 feat(saas-demo): file-backed JSON data store for tool state
Replace the in-memory `data` literal in `api/v1/data.ts` with a
file-seeded, module-singleton store:

- `src/data/seed.json` holds the seed (cards, team, policies,
  transactions) with refreshed dates (within ~60 days of 2026-06-02)
  and valid future card expiries.
- `src/lib/store.ts` deep-clones the seed at module init and exposes
  typed read accessors (cards/team/policies/transactions, findCard,
  findPolicy, findTransaction) plus the exact mutator set the routes
  use (addCard, updateCardPin, assignPolicyToCard, addPolicy,
  updateTransaction, addMember, updateMember, removeMember).
- All `src/app/api/v1/**/route.ts` files now read/write through the
  store. `data.ts` retains the shared interfaces/enums/CARD_COLORS/
  generateUniqueId and drops the literal `data` constant.
- Mutations persist for the running server process and reset to seed
  on restart (intentional demo behavior; no disk write-back).
- Domain-data only — conversation threads/memory live in a separate
  ticket (FOR-137).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 23:30:28 +02:00
Jordan Ritter fa5a84cdba Fix OPS_BASE_URL so dashboard Ops tab resolves the harness probe endpoint (#5168)
## Summary

The showcase dashboard's Ops tab fetches `/api/ops/*` as a same-origin
path, which the Route Handler at
`shell-dashboard/src/app/api/ops/[...path]/route.ts` forwards at request
time to `${OPS_BASE_URL}/api/*` on the showcase-harness HTTP origin (the
service that serves `/api/probes`).

In the local compose stack, `OPS_BASE_URL` was set to
`http://localhost:3200` — the dashboard's own host. The proxy therefore
looped back into the dashboard instead of reaching the harness, so the
probe-trigger endpoint failed (self-referential 500/503) and the Ops
live-probe grid could not resolve.

This points `OPS_BASE_URL` at the harness origin over the compose
network: `http://showcase-harness:8080`. The harness `Dockerfile`
EXPOSEs `8080` and `orchestrator.ts` binds `PORT ?? 8080`, so the
dashboard reaches `/api/probes` by container name on the internal port.
This mirrors staging, where the dashboard's `OPS_BASE_URL` likewise
points at the harness origin rather than at itself.

Scope: a single build-arg value in `showcase/docker-compose.local.yml`
(plus an updated explanatory comment). `OPS_BASE_URL` is read at request
time by the Route Handler, so this only seeds the runtime default — no
build-time resolution required.

## Test plan

- [ ] Dashboard Ops tab loads without a 500/503 from the ops proxy
- [ ] Probe-trigger endpoint (`/api/ops/probes` POST) returns 2xx,
forwarded to the harness `/api/probes`
- [ ] Ops live-probe grid renders harness data (harness running on the
compose network as `showcase-harness`)
2026-06-02 14:29:36 -07:00
Jordan Ritter b4a396c831 Env-gate LOCAL_SERVICES_JSON injection in harness service discovery (#5167)
## Summary

Adds a permanent, env-gated injection seam to the showcase harness
service discovery
(`showcase/harness/src/probes/discovery/railway-services.ts`). When
`LOCAL_SERVICES_JSON` is set, the harness (especially the
d6-all-pills-e2e driver) runs against **LOCAL** backend services instead
of performing Railway discovery — enabling apples-to-apples LOCAL D6
verification without Railway credentials.

- **Zero behavior change when unset/empty.** An unset or empty
`LOCAL_SERVICES_JSON` takes the byte-identical Railway discovery path —
the seam is fully transparent in the default configuration.
- **`demos` plumbed end-to-end (load-bearing).** The injected service
records carry `demos` all the way through. This matters: empty `demos`
would short-circuit the D6 driver into a false 15ms zero-cell "green,"
masking real failures. Plumbing `demos` end-to-end is what makes the
LOCAL path a faithful stand-in for Railway discovery.
- **Enables apples-to-apples LOCAL D6 verification** — run the full pill
suite against local services with the same code path shape as staging.

## Notes

- 8 new tests covering the `LOCAL_SERVICES_JSON injection` path (66
tests total in `railway-services.test.ts`, all passing).
- Env-gated: no Railway credentials required when services are injected.
- The injection seam executes the real discovery code (not mocked).

## Test plan

- [ ] `tsc --noEmit` (typecheck) exits 0
- [ ] `railway-services.test.ts` passes (66 tests, incl. all 8
`LOCAL_SERVICES_JSON injection` tests)
- [ ] Injection seam executes against the real code path (verified via
`discovery.railway-services.local-injection` log emission, not a mock)
- [ ] Unset/empty `LOCAL_SERVICES_JSON` produces a byte-identical
Railway discovery path (zero behavior change)
- [ ] `demos` plumbed end-to-end through injected service records
(guards against false zero-cell D6 green)
2026-06-02 14:29:31 -07:00
Maxim 9373aa167c feat(saas-demo): v2 agent context in layout + actions
- Switch imports from @copilotkit/react-core to /v2 in layout.tsx and actions.ts
- Replace useCopilotReadable with useAgentContext
- Stringify the credit cards/policies/transactions context value to satisfy
  the JsonSerializable type
2026-06-02 23:06:07 +02:00
Maxim 5a97ebc2b3 feat(saas-demo): v2 hooks + useReducer fix in team page
- Switch imports from @copilotkit/react-core to /v2
- Replace useCopilotReadable with useAgentContext (stringify team)
- Convert removeMember, changeMemberRole, changeMemberTeam parameters
  to Zod schemas
- Fix React 19 useReducer typing by extracting dialogStateReducer and
  dropping explicit generics
2026-06-02 23:05:53 +02:00
Maxim e044a4c5b9 feat(saas-demo): v2 hooks + useReducer fix in cards page
- Switch imports from @copilotkit/react-core to /v2
- Replace useCopilotReadable with useAgentContext
- Convert all useHumanInTheLoop and useFrontendTool parameters to Zod schemas
  (addNewCard, assignPolicyToCard, addNoteToTransaction, showTransactions,
  setCardPin, showAndApproveTransactions)
- Convert v1 available: "enabled"/"disabled" to v2 boolean
- Fix React 19 useReducer typing by extracting changePinReducer and dropping
  explicit generics
2026-06-02 23:05:44 +02:00
Maxim 41ae4fab9c feat(saas-demo): v2 hooks in copilot-context
- Switch imports from @copilotkit/react-core to /v2
- Replace useCopilotReadable with useAgentContext (stringify object value)
- Convert navigateToPageAndPerform parameters array to a Zod object schema
2026-06-02 23:05:28 +02:00
Jordan Ritter 6cc06209c9 Resolve dashboard D6 per-cell via enum keys + correct depth/D6 stats (#5170)
## Summary
- **Fix per-cell D6 resolution**: the dashboard's `resolveD6` now reads
per-cell ENUM keys (`d6:<slug>/<featureType>` via `CATALOG_TO_D5_KEY`
fan-out) instead of the integration aggregate — D6 cells render real
per-cell green/red instead of all-gray.
- **Depth + D6 surfaced by default**: `DEFAULT_OVERLAYS = [links,
health, depth]` (the per-cell D6 badge rides on the Health layer; the
depth chip folds D6).
- **Correct the aggregate stats bar** (`page-stats.ts` extraction): D6
cells were dropped from the depth distribution (`dist["d6"]++` → `NaN`,
masked by an `as` cast); gray/no-data cells were counted as green;
`d6Stats` swallowed amber into gray. Now renders the reachable buckets
**D0/D3/D4/D5/D6** (dropped permanently-zero D1/D2), tracks `noData` and
`degraded` distinctly, and validates `parity_tier` fail-loud.
- **Test coverage**: new table-driven cell color/rollup matrix
(`dashboard-color-matrix.test.tsx`) + `page-stats.test.ts` +
order-independence/comment hardening.
- **CR fixes**: effective (stale-downgraded) `.row` from cell-model
resolvers, `WORST_STATE_RANK` rename, composed-cell memo keys,
overlay-types re-export dedup, `setTab` persistence + `window.location`
test stub, `page.tsx` shared-`now` threading + 60s staleness re-render.

## Verification
- **776 tests pass / 1 skip**, `tsc --noEmit` clean, Next.js production
build OK.
- **Local visual proof**: seeded enum D6 rows (30✓/8✗/0 gray) into a
local PocketBase, rebuilt this branch, screenshotted bare `#matrix` —
per-cell D6 green/red renders, and the depth distribution shows `D6:30
D5:8 D4:0 D3:0 D0:588`.
- **7-agent code review converged** over 3 confirmation cycles.

## Notes
- The **#5152 `d6-all-pills` driver must stay on enum keys** (matches
this dashboard's `resolveD6` + the `d5-mapping-drift` test). Do not
revert it to raw catalog keys.
- **Follow-up (separate PR)**: stats-bar single-source-of-truth
hardening (`computeD6Stats`→`buildCellModel`; reconcile
`resolveD6Row`/`resolveD5Row` to the effective row; thread `connection`
into stats for SSE-offline; docs-only stats exclusion); delete
deprecated `composed-cell.tsx` + `deriveDepth`; `useOverlays` mount-hash
deep-link clobber; Notion visualization-doc sync to per-cell
`resolveD6`.

## Test plan
- [ ] CI green
- [ ] After staging deploy, dashboard renders per-cell D6 green/red (not
all-gray) for LangGraph-Python
2026-06-02 13:55:16 -07:00
Maxim 3966baa879 feat(saas-demo): migrate provider to v2 CopilotKitProvider + identity 2026-06-02 22:54:44 +02:00
github-actions[bot] a8f1544286 style: auto-fix formatting 2026-06-02 20:51:16 +00:00
Maxim b91e1710c5 feat(saas-demo): v2 Hono runtime endpoint with BuiltInAgent 2026-06-02 22:40:02 +02:00
Jordan Ritter 7b0e663b22 fix(showcase): render reachable depth buckets (D0..D6) in stats bar, drop dead D1/D2
The depth-distribution row showed permanent-zero D2/D1 rows while the computed
D0 bucket (wired-but-unverified cells) was never rendered, so wired cells
vanished from the row and it never summed to the "Wired" count.
buildCellModel().achievedDepth is typed 0|3|4|5|6 and can never be 1 or 2.

- Remove unreachable d1/d2 from the DepthDistribution type, from
  computeDepthDistribution's init, and from the rendered levels array.
- Add a D0 row to the rendered levels so wired-unverified cells are visible
  and the distribution sums to the wired-cell count (D6,D5,D4,D3,D0).
- Reconcile section wrapper keys: use each section's stable key instead of the
  array index so overlay-toggle reconciliation is correct.
- Document that health/depth/d6 rollups need no dedup: catalogData.cells is
  one row per (integration, feature) grid cell (verified: 0 duplicate pairs),
  so these per-cell signals are counted exactly once.
2026-06-02 13:30:35 -07:00
Maxim 28167ef287 build(saas-demo): add @playwright/test devDependency for smoke tests 2026-06-02 22:29:00 +02:00
Jordan Ritter 13d7fa5ee5 fix(showcase): correct aggregate-stats divergence from per-cell model
Extract the AdaptiveStatsBar aggregate computations out of page.tsx into a
unit-testable pure module (src/lib/page-stats.ts), mirroring the
computeColumnTally pattern, and fix a cluster of correctness bugs:

1. D6 cells were dropped from the depth distribution: DepthDistribution
   lacked a `d6` key and the `\`d${depth}\` as keyof` cast produced
   `dist["d6"]++ === NaN`. Add `d6` to the type, render a D6 row in
   DepthDistributionSection, and replace the cast with an exhaustive
   Record<0|3|4|5|6, keyof DepthDistribution> map the compiler checks.
2. d6Stats folded amber (stale/degraded D6) into gray. Count degraded
   distinctly and surface it in D6Section.
3. healthStats counted gray (no-data) cells as green, contradicting the
   "stats bar matches the matrix" invariant. Track no-data separately and
   render it in HealthSection.
4. isSupported is correctly hardcoded true for wired-cell stats: a wired
   catalog cell can never be in not_supported_features (generate-registry
   resolves those to status "unsupported" before "wired"), so stats and
   renderCell cannot diverge. Comment updated to state the invariant.
5. parity_tier was indexed via an unchecked cast (unknown tier →
   `undefined++ === NaN`). Validate against the known tier set and skip +
   log loud on unknown.

The matrix render path (renderCell/buildCellModel) is untouched.
2026-06-02 13:19:43 -07:00
github-actions[bot] 8d071aa8a0 style: auto-fix formatting 2026-06-02 13:11:43 -07:00
Jordan Ritter 036ecf546a feat(showcase): single-service promote dropdown + unattended hardened promote
Convert the promote workflow's `service` input from a freeform string
(default "all", the accidental-fleet-promote footgun) to a generated
`type: choice` dropdown whose first/default option is a rejected sentinel
so a blind "Run workflow" aborts instead of promoting.

resolve-targets: reject the sentinel, fail loud on ambiguous matches
(no silent head -n1), independently re-filter probe.prod, and reject
--digest combined with `all`. promote: run unattended in CI
(--yes --non-interactive) — the manual dispatch + service selection is
the human authorization. notify: empty-webhook guard + fallback warning,
neutral state for sentinel-abort and any cancellation, and surface
resolve-targets.result in the failure alert for triage.
2026-06-02 13:11:43 -07:00
Jordan Ritter a7499569d7 feat(showcase): self-maintaining promote service dropdown generator
Add showcase/scripts/sync-promote-service-options.ts: generates the
promote workflow's service `choice` options from the SSOT
(railway-envs.ts), spliced between BEGIN/END markers in
showcase_promote.yml. Fail-loud throughout — every emitted token must
resolve to exactly one service under the resolve-step predicate
(name|dispatchName match AND probe.prod), tokens are YAML-safe, args are
strict (a typo'd flag cannot trigger a destructive write), and markers
are validated before any rewrite.

Wire it into a lefthook pre-commit hook (regenerate + restage; set -e so
a failed regen blocks the commit) and an advisory (never-failing) drift
check in showcase_validate.yml. Vitest coverage for ordering, exclusion,
collision/ambiguity guards, marker errors, exit codes, idempotency, and
the import-side-effect guard.
2026-06-02 13:11:43 -07:00
Maxim a39c559152 build(saas-demo): move banking demo onto CopilotKit v2 workspace packages 2026-06-02 22:09:05 +02:00
Jordan Ritter 377b56cb19 test(showcase): harden D6 rollup tests — order-independent worst-state, comment precision
Add a D5 any-fail fan-out case where the red sub-key is NOT first (greens
then a trailing red) and assert the rollup still resolves red, proving the
worst-state fold is order-independent. Also tighten three imprecise/misleading
comments: clarify the absent-tools D4 worst-state skip, annotate the d6:lgp
aggregate as a distractor not consulted by per-cell resolveD6, and drop the
inapplicable amber-path clause from the aggregate-only gray case.
2026-06-02 13:06:01 -07:00
Jordan Ritter 07abb37ea4 fix(showcase): thread shared now + periodic staleness re-render in dashboard page 2026-06-02 13:05:59 -07:00
Jordan Ritter 952209977e test(showcase): harden useOverlays mocks and cover baseline + selectProbe
Stub window.location explicitly via Object.defineProperty (instead of the
global) so the hook's window.location.hash read-path is genuinely exercised
and robust even if window !== globalThis. Add coverage for setTab persistence,
the #baseline parse resolving to the baseline tab, and selectProbe leaving the
tab and hash consistent (ops probe drilldown).
2026-06-02 13:05:58 -07:00
Jordan Ritter b6f865adce fix(showcase): persist overlays in setTab for storage symmetry
setTab wrote the URL hash but, unlike toggle/updateOverlays, never called
saveToStorage, so a tab switch dropped overlay persistence asymmetrically.
Persist the current overlay set in setTab so the user's overlay selection
survives tab switches and reloads. Covered by a red-green test in the
useOverlays suite.
2026-06-02 13:05:58 -07:00
Jordan Ritter e6da6ba3ed refactor(showcase): re-export overlay/preset definitions from overlay-types
OverlayToggleBar redefined ALL_OVERLAYS, PRESETS, and OverlayPreset as local
literals duplicating src/lib/overlay-types.ts (drift hazard if an overlay or
preset is added to one but not the other). Replace the local definitions with
re-exports from overlay-types so there is a single source of truth. Behavior
identical; existing component-level imports keep working via the re-export.
2026-06-02 13:05:58 -07:00
Jordan Ritter e408489313 fix(showcase): correct cell renderer memo keys and d6 overlay blank matrix
ComposedCell.arePropsEqual watched the wrong liveStatus keys: it omitted
agent/chat/tools (which its only consumer, deriveDepth, reads for D2/D4) and
watched an unused smoke key. Watch exactly deriveDepth's reads and fix the
stale "keep in sync with resolveCell" comment.

UnifiedCell rendered a blank cell for a {d6}-only overlay set because d6 is
consumed only by AdaptiveStatsBar and produced no per-cell content. Treat d6
as content-bearing: surface the depth chip + health row (which renders the
per-cell D6 badge). Default overlay set (links/health/depth) is unchanged.
2026-06-02 13:05:56 -07:00
Jordan Ritter 7f5c3ac16e fix(showcase): correct live-status/depth-utils CR findings
- Rename module-private D5_STATE_RANK to WORST_STATE_RANK (used by both
  resolveD5Row and resolveD6Row) and move the misplaced resolveD5Row doc
  block onto resolveD5Row.
- Add a test asserting every CATALOG_TO_D5_KEY mapping value is free of the
  ':' / '/' key delimiters (keyFor's guard did not cover mapping values).
- mergeRowsToMap: fire the collision warning only on genuine state
  divergence (rowsAreNoop content compare) instead of reference inequality,
  eliminating noisy false warnings.
- isD6Green JSDoc: note the caller only invokes it after D5 is green
  (contiguous ladder), so D6 can never be credited over a broken D5.
- computeMaxPossible: treat stub like unshipped (maxPossible=0) so a
  not-yet-wired stub cell no longer false-positives isRegression.
2026-06-02 13:05:55 -07:00
Jordan Ritter 461621af0e fix(showcase): return effective (downgraded) row from cell-model resolvers
resolveD4/D5/D6 returned the RAW status row in `.row` while `.status` was
derived from the stale-downgraded effective state, so a stale-green fold
reported `.row.state === "green"` but `.status === "amber"`. Store the
effective (downgraded) row instead so `.row.state` agrees with `.status`,
mirroring the invariant in live-status.ts `buildBadge`. Also replace
resolveD4's `worstState!`/`winner!` non-null assertions with a guard like
resolveD5/D6, and pin the resolveD3 producer-invariant (D1/D2 gate is
enforced upstream; buildCellModel never reads health:/agent: rows) with a
characterization test and comment.
2026-06-02 13:05:54 -07:00
Jordan Ritter 19a1f750de fix(showcase): point dashboard OPS_BASE_URL at harness, not itself 2026-06-02 12:37:58 -07:00
Jordan Ritter c32a877a91 test(showcase): add dashboard cell color/rollup matrix 2026-06-02 12:37:55 -07:00
Jordan Ritter a510aa08d6 feat(showcase): enable Depth (and D6) overlays by default 2026-06-02 12:37:55 -07:00
Maxim 6e1f955b2e docs(saas-demo): remove stale SQL/MSA references from README 2026-06-02 21:29:21 +02:00
Jordan Ritter acf2e135a2 feat(showcase/harness): env-gate LOCAL_SERVICES_JSON injection seam in railway-services discovery
Make LOCAL_SERVICES_JSON a permanent, env-gated feature of the railway-services
discovery source so the harness (especially the d6-all-pills-e2e probe driver)
can run against LOCAL backends instead of querying Railway.

When LOCAL_SERVICES_JSON is set, enumerate() builds the IDENTICAL
RailwayServiceInfo[] shape from the injected static list and returns it without
consulting Railway creds — only the service URLs differ (local container
hostnames vs Railway public domains). The same namePrefix/nameExcludes filter is
applied, shape is recomputed from the name via classifyShape (single source of
truth), and malformed JSON throws DiscoverySourceSchemaError (same taxonomy as a
Railway shape failure). When the var is unset OR empty, the Railway discovery
path is byte-identical to before.

Critically, the injected demos array is plumbed end-to-end
(demos: svc.demos ?? []) so the d6-all-pills driver's
demosToFeatureTypes(input.demos) produces a real feature matrix; an empty demos
would short-circuit the driver to a zero-cell false-green.
2026-06-02 12:18:10 -07:00
Maxim d0faa1ea28 chore(saas-demo): drop SQL/MSA feature and dedupe lockfile 2026-06-02 21:17:41 +02:00
Austin Merrick 19370f9bf9 Merge branch 'main' into austin/oss-85-reference-documentation-for-copilotkitcore 2026-06-02 12:08:32 -07:00
github-actions[bot] 601e7f17dc style: auto-fix formatting 2026-06-02 18:49:04 +00:00
Austin Merrick 83769e17ee fix(shell-docs): render reference code blocks with syntax highlighting
The reference route rendered fenced code blocks as bare, unstyled
<pre> (no highlighting, no copy button) because its MDXRemote call
omitted the rehypeCode plugin and the pre: MdxCodeBlock override that
the main docs pipeline uses. Wire both in (verbatim from the framework
route) so reference code blocks match the rest of the docs. Fixes
rendering for all reference SDKs (React v2/v1 + Core).
2026-06-02 11:46:44 -07:00
Tyler Slaton 4c6ecbb550 docs: simplify cookbook navigation (#5166)
## Problem

The cookbook sidebar reused the docs framework picker and showed extra
grouping chrome even though Daytona is the only cookbook page.

## Why

The cookbook routes render through the shared docs page view, which
always injected the framework selector into the sidebar and included the
cookbook overview/section header from `meta.json`.

## Fix

- Let cookbook pages explicitly suppress the shared sidebar selector.
- Redirect `/cookbook` to `/cookbook/daytona`.
- Keep the cookbook sidebar to the single Daytona page link.

Validation:
- `npm run lint` in `showcase/shell-docs` passes with existing warnings.
- `npm run build` in `showcase/shell-docs` passes with existing
Next/Turbopack warnings.
- Repo pre-commit package checks passed on both commits.
- `npm run typecheck` currently fails on existing `SignupLink` test prop
errors unrelated to this change.
2026-06-02 11:36:24 -07:00
Jordan Ritter 377b7e8163 test(showcase): complete D6 per-cell test migration
Rewrite the two stale live-status keyFor tests that still asserted the old
integration-scoped D6 model (and the wrong e2e-full driver) to assert the
per-cell d6:<slug>/<featureId> shape; expand the two beautiful-chat D5 fan-out
tests to emit all 5 sub-keys so the worst-state fold (not the missing-row path)
is what's exercised; drop the dead unmapped-feature else branch in unified-cell
arePropsEqual (resolvers never read a direct key for unmapped features).
2026-06-02 11:35:51 -07:00
Tyler Slaton 9ef184ec76 Merge branch 'main' into docs/cookbook-daytona-default 2026-06-02 11:35:26 -07:00
Tyler Slaton 2e540efdd4 docs(shell-docs): remove cookbook section header 2026-06-02 11:31:18 -07:00
Tyler Slaton 3486944356 fix(showcase): controlled gen-UI — reliable 2nd-suggestion render + sidebar tag (OSS-137) (#5029)
## What & why


[OSS-137](https://linear.app/copilotkit/issue/OSS-137/controlled-gen-ui-demo-optimize-2nd-suggestion-prompt-rename-sidebar)
— the **Controlled Generative UI** demo (`gen-ui-tool-based`) had two
issues, scoped here to **LangGraph-Python** and **Google ADK** (per the
ticket; other 16 integrations roll out later).

### 1. 2nd suggestion didn't reliably render UI
The "Traffic pie chart" chip (`"Show me a pie chart of website traffic
by source."`) names a subject but supplies no numbers, so the agent
**asked the user for data** instead of rendering a chart.

**Fix:** a system-prompt directive (both LGP + ADK agents) instructing
the agent to invent plausible illustrative sample values, call
`render_*` immediately, and **never** reply with a clarifying question.
The suggestion copy stays clean — behavior is carried by the system
prompt, not by leaking "(use sample data)" hints into the UI.

### 2. Sidebar tag → product language
Retagged the demo from `generative-ui` → `controlled-generative-ui` (LGP
+ ADK), so the dojo sidebar pill reads **"Controlled Generative UI"** —
the established taxonomy already used in `shared/feature-registry.json`
and the dashboard catalog.

## Tests
Added D5 aimock fixture entries mirroring all three suggestion chips
(bar / traffic-pie / market-share) so the suggestion-click path has
deterministic coverage. The existing `"revenue by category"` probe
message is **preserved**, so the
[dashboard](https://dashboard.showcase.copilotkit.ai/#matrix:links,health)
D5 row for the edited row stays green.

## Acceptance check
- [x] 2nd suggestion renders UI without asking for data (system-prompt
directive; verified locally against the live agent)
- [x] Sidebar entry tagged "Controlled Generative UI"
- [x] Sample/hallucinated data supplied via system prompt
- [x] Scoped to LGP + ADK
- [x] Tests augmented (D5 fixtures for every chip)
- [x] D5 still shown for the edited row (probe message unchanged)

## Out of scope (left out deliberately)
`package-lock.json` churn from a local reinstall (un-pins `latest`) was
**not** committed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-02 11:31:17 -07:00