9457 Commits

Author SHA1 Message Date
Jordan Ritter 4e1b5ad373 chore: release monorepo v1.57.3 (#4922)
## Release monorepo v1.57.3

**Scope:** `monorepo` | **Bump:** `patch`

---

### How this release process works

1. **This PR was created automatically** by the "release / create-pr"
workflow.
   It bumped the `monorepo` packages to `1.57.3`
   and generated AI-enhanced release notes.

2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
   must pass before merging. This is the review gate.

3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.

4. **When this PR is merged**, the `release / publish` workflow
automatically:
   - Builds all packages
   - Publishes the `monorepo` packages to npm at version `1.57.3`
   - Creates git tag `monorepo/v1.57.3`
   - Creates a GitHub Release with the final release notes

### Before merging

- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)

---

> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
v1.57.3
2026-05-19 09:08:48 -07:00
tylerslaton efae3dfb5b chore: release monorepo v1.57.3 2026-05-19 15:59:44 +00:00
Tyler Slaton e02908d688 Fix rAF teardown errors in CopilotChat perf tests and lefthook script (#4921)
## What does this PR do?

This PR addresses two issues:

1. **CopilotChat perf test flakiness**: Fixes unhandled errors from
`@tanstack/virtual-core` 3.13.18's `scrollToIndex` method, which
schedules nested `requestAnimationFrame` callbacks without null-checking
`targetWindow`. When the virtualizer unmounts and sets `targetWindow =
null`, pending rAF callbacks throw "Cannot read properties of null
(reading 'requestAnimationFrame')". The fix wraps both
`globalThis.requestAnimationFrame` and `window.requestAnimationFrame` to
catch and swallow this known tanstack teardown error while allowing
other errors to propagate.

2. **Lefthook script robustness**: Fixes the pre-commit
oxlint/oxfmt/ruff hook to properly handle staged files with spaces or
special characters. The old `[ -n "{staged_files}" ]` check failed with
"unexpected operator" errors because lefthook interpolates file lists as
space-separated words. The fix uses `set --` to convert the file list
into positional arguments, enabling proper shell-portable testing and
quoting.

## Related PRs and Issues

- Addresses flakiness in `CopilotChat perf — re-render regression` test
suite
- Improves reliability of pre-commit linting hooks

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] Changes are covered by existing test infrastructure (perf tests
now pass reliably)
- [x] "Allow edits by maintainers" is checked

https://claude.ai/code/session_01MvPWxQAVmUmZRB6dTnJyjU
2026-05-19 08:57:32 -07:00
Claude ce3084700c fix(release): swallow tanstack/virtual rAF teardown error in perf test
The release-PR workflow's pre-commit hook ran the full test suite and
failed because @tanstack/virtual-core 3.13.18 has a latent bug — its
scrollToIndex schedules a nested rAF that calls
`this.targetWindow.requestAnimationFrame(verify)` with no null-check.
The virtualizer's cleanup nulls `targetWindow` on React unmount, so the
queued rAF fires post-unmount and throws. All 1170 tests passed, but
vitest exited non-zero from the unhandled error.

Wrap rAF on both globalThis and window (separate bindings in
vitest+jsdom; tanstack uses `targetWindow.rAF` which resolves to
`window.rAF`) so callbacks hitting this specific error are swallowed.

Also fix the lint-fix lefthook command — `[ -n "{staged_files}" ]`
broke on multi-file expansion ("[: <path>: unexpected operator")
because lefthook interpolates files as space-separated words, not a
quoted string. Use `set --` to put them in positional args.
2026-05-19 15:28:07 +00:00
Jordan Ritter 3981a7e6fb fix(showcase): un-skip declarative-gen-ui KPI + StatusReport tests (#4918)
## Summary
- Un-skip KPI dashboard and Status report tests in declarative-gen-ui
- Fix CSS selector mismatch: tests used inline-style selectors but
components use Tailwind classes
- Switch to existing `data-testid` attributes (`declarative-metric`,
`declarative-status-badge`)

## Root cause
Tests were skipped citing "Railway slowness" (W8-7) but the real issue
was CSS selector mismatch — inline-style queries never matched
Tailwind-rendered components.

## Test plan
- [x] 6/6 declarative-gen-ui tests pass on LGP (port 3100)
- [x] 6/6 pass on LGT (port 3101)
- [x] Specs byte-identical between LGP and LGT

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-19 07:58:50 -07:00
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
Jordan Ritter 379923f984 fix(showcase): un-skip hitl-in-app downgrade + fix beautiful-chat networkidle (#4917)
## Summary
- Un-skip hitl-in-app downgrade test — upstream bug is fixed, test
passes on both LGP and LGT
- Remove `page.waitForLoadState("networkidle")` from beautiful-chat Task
Manager test — persistent SSE connections prevent networkidle from ever
resolving

## Test plan
- [x] 16/16 tests pass on LGP (port 3100) — hitl-in-app + beautiful-chat
specs
- [x] 16/16 tests pass on LGT (port 3101)
- [x] All specs byte-identical between LGP and LGT

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-19 05:47:43 -07:00
Jordan Ritter c804fb7f51 fix(showcase): un-skip hitl-in-app downgrade test + remove networkidle from beautiful-chat 2026-05-19 05:39:50 -07:00
Alem Tuzlak cd6300cd68 fix(showcase): lockfile-pinned npm ci in all integration Dockerfiles + reclaim BuildKit cache on build (#4915)
## Summary

Fixes the disk-bloat root cause that crashed Docker repeatedly during
yesterday's MAF showcase port session — eventually ballooning the WSL2
`docker_data.vhdx` past 300 GB on the Windows host.

**Root cause:** 17 of 18 integration Dockerfiles copy `package.json` but
ignore the existing `package-lock.json`, then run `npm install
--legacy-peer-deps` instead of `npm ci`. Despite a ~700 KB lockfile
sitting in every integration directory, none of them inform the build.

## Effects

1. `npm install` re-resolves package versions from scratch on every
rebuild, downloading ~1.1 GB into the build container's writable layer
plus hundreds of MB of `~/.npm/_cacache` *inside the same layer*
(BuildKit can't dedupe across builds because the layer hash varies with
each non-deterministic resolution).
2. The install layer's BuildKit cache key is just `package.json`'s hash
+ base image — but with `npm install` (not `npm ci`) the install itself
is non-deterministic, so a cached layer that resolved successfully can
produce a different node_modules tree than a fresh resolution. Even when
the layer is reused, interrupted rebuilds (host OOM during install)
leave dangling cache that's only reclaimed after 24 h.
3. WSL2's `docker_data.vhdx` grows monotonically — it never shrinks
until `wsl --shutdown` + `Optimize-VHD`. Repeated rebuilds compound into
a VHDX file that can reach hundreds of GB on the Windows host before any
reclaim happens.

Only `built-in-agent` had the correct pattern; the other 17 were
copy-pasted from each other.

## Changes

1. **Lockfile-pinned, deterministic install** in all 18 Dockerfiles:
   ```dockerfile
   COPY package.json package-lock.json ./
   RUN npm ci --legacy-peer-deps
   ```
- `npm ci` is faster, deterministic, and writes ~half the temporary
state of `npm install`.
- With the lockfile in the COPY, BuildKit's layer cache key is stable
across rebuilds — once warm, it stays warm.
   - Matches the pattern `built-in-agent` already uses.

2. **Reclaim dangling BuildKit cache in `bin/showcase build`** with
`docker builder prune --filter "until=24h"`. Keeps the warm cache for
day-of work, reaps orphans from interrupted builds.

## Verification

After the patch every integration shows the same install header:

```bash
for d in showcase/integrations/*/; do
  grep -E "^(COPY package|RUN npm)" "$d/Dockerfile" | head -2
done
```

returns identical:
```
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
```

for all 18.

## Out of band (already done locally, not in this diff)

- `docker volume prune -af` — reclaimed **16.11 GB** from 236 orphaned
anonymous Postgres volumes from 2023.
- `Optimize-VHD F:\Docker\wsl\disk\docker_data.vhdx -Mode Full`
(elevated PowerShell, after `wsl --shutdown`) — each developer runs this
on their own host when disk gets tight; not something CI or this script
can do.

## Test plan

- [ ] CI green
- [ ] `bin/showcase build ms-agent-python` from clean cache succeeds +
cold-build time roughly matches pre-PR baseline
- [ ] Second `bin/showcase build ms-agent-python` (warm cache) is faster
than first (because lockfile-pinned layer now actually hits cache)
- [ ] `docker images | grep showcase-` produces same image sizes as
before (~2.3-3 GB per integration)
2026-05-19 13:00:30 +02:00
Alem Tuzlak a98c591044 chore(showcase): ratchet validate-pins baseline 95 -> 105
Main has been red on Validate Showcase since #4912 landed
("bump deps to v1.57.2") -- that PR bumped Dojo's @copilotkit/*
pins to 1.55.2 which exposed 10 new showcase=next vs Dojo=1.55.2
mismatches across ms-agent-python, pydantic-ai, and strands.

The count on origin/main is also 105 (verified against run
26082332924's logs); my branch produces an identical 105 FAIL set
with matching hash. So this ratchet absorbs unrelated drift from
#4912 -- needed to unblock CI for this PR (and every other PR
that touches showcase/).

Sign-off: this is a documented baseline ratchet per the fail
threshold instructions in fail-baseline.json's _comment field.
2026-05-19 12:50:28 +02:00
Alem Tuzlak 03bed3b76b fix(showcase): regenerate 18 lockfiles in isolation; switch to npm ci
Lockfiles committed in 8ba692c42 were generated inside the monorepo
while pnpm's hoisted node_modules tree was present. npm-arborist
resolved transitive deps against pnpm's symlinks and wrote ~40
`../../../node_modules/.pnpm/...` paths into each lockfile's
`packages` map.

npm 10 can parse the JSON, but its arborist bombs out walking the
tree at those pnpm-relative entries with the misleading error:

    npm error code EUSAGE
    npm error The `npm ci` command can only install with an
    npm error existing package-lock.json or npm-shrinkwrap.json
    npm error with lockfileVersion >= 1.

`npm install --dry-run` surfaces the real cause:

    Cannot read properties of undefined (reading 'extraneous')

A fresh lockfile generated in an isolated container works.
- broken: 1259 packages, 43 with `../../../node_modules/.pnpm/...`
- fresh:  1321 packages, all `node_modules/...` paths

This commit regenerates every integration's lockfile inside an
isolated `node:22-slim` container via `npm install
--package-lock-only --legacy-peer-deps` and verifies with `npm ci`.
2026-05-19 12:12:57 +02:00
Alem Tuzlak 4b5f976016 fix(showcase): split COPY into two explicit lines + probe to diagnose CI failure
Glob form 'COPY package*.json ./' didn't fix CI -- only package.json
ended up in /app, despite the build context transferring 1.38 MB
(lockfile is 705 KB so it's clearly in the source).

This commit:
1. Splits the COPY into two unambiguous lines.
2. Adds a 'RUN ls -la /app/' probe before npm ci.

If the probe shows package-lock.json present in /app, the issue is in
npm ci discovery. If absent, the issue is in build context upload.
Probe to be reverted once root cause is known.
2026-05-19 11:38:08 +02:00
Alem Tuzlak 8ebd7dfe36 fix(showcase): use glob COPY package*.json ./ to bust poisoned Depot cache
CI failed on the 16 integrations whose explicit two-file COPY
`COPY package.json package-lock.json ./` hit a poisoned Depot remote
BuildKit cache entry: the cached layer reported CACHED but only
contained `package.json`, so the subsequent `npm ci` failed with
"command can only install with an existing package-lock.json".

Depot's cache had a layer indexed against the prior `COPY package.json
./` instruction; the new two-file instruction was matching it by some
internal cache-key collision. Two of 18 integrations (langgraph-python,
langgraph-typescript) passed only because they had a fully-cached
`RUN npm ci` layer from a sibling build that short-circuited the
broken COPY.

The glob form `COPY package*.json ./` produces an instruction string
that has never appeared in Depot's cache, so the layer is computed
fresh against the actual build context and includes both files. It
also reads cleaner than the explicit two-file enumeration.

No-Op when no cache poisoning is present -- the glob expands to exactly
package.json and package-lock.json on every integration (verified
locally; only those two files match per directory).
2026-05-19 11:19:24 +02:00
Alem Tuzlak 604ea658ec fix(showcase): drop bin/showcase build cache prune (out of scope for shared daemon)
`docker builder prune` operates on the entire Docker daemon, not on a
specific project's images. Reaping cache that's older than 24h would
also reap unrelated projects' cache that a teammate happens to share
the daemon with -- a colleague rebuilding a sibling Node project the
next day would face an unnecessary cold-cache build.

BuildKit doesn't expose a filter that's scoped to a project's cache
entries (only `until=<time>`, `type=<cachetype>`, `label=<k>=<v>` --
and labels can't be applied to cache entries from inside a Dockerfile).

Drop the prune. The lockfile-pinned `npm ci` change in the prior commit
is the actual root-cause fix and is enough on its own -- every rebuild
now hits a stable cache layer instead of redoing a 1.1 GB `npm install`
from scratch. Per-developer manual housekeeping (`docker builder prune
--filter "until=168h"`) remains the right escape hatch for accumulated
orphans.
2026-05-19 11:05:15 +02:00
Alem Tuzlak 998be411bd fix(showcase): use lockfile-pinned npm ci in all integration Dockerfiles + reclaim BuildKit cache on build
## Root cause

17 of 18 integration Dockerfiles copy `package.json` but NOT
`package-lock.json`, then run `npm install --legacy-peer-deps`. Despite a
~700KB lockfile sitting in every directory, none of them are consulted at
build time. Only `built-in-agent` was already doing it right.

Effect on Windows / WSL2:

1. `npm install` re-resolves package versions from scratch on every
   rebuild, downloading ~1.1 GB into the build container's writable layer
   plus ~hundreds of MB of `~/.npm/_cacache` that lives in the same
   layer (BuildKit can't dedupe across builds because the layer hash
   varies with each non-deterministic resolution).
2. The npm install layer's BuildKit cache key is just `package.json`'s
   hash + base image — but with `npm install` (not `npm ci`) the install
   itself is non-deterministic, so a cached layer that resolved
   successfully can produce different node_modules trees than a fresh
   resolution. Worse, intermediate state from interrupted rebuilds
   (e.g. host OOM during `npm install`) is not reclaimed by `docker
   builder prune` until 24h later.
3. WSL2's `docker_data.vhdx` grows monotonically — it never shrinks
   until `wsl --shutdown` + `Optimize-VHD`. Repeated rebuilds compound
   into a VHDX that can reach hundreds of GB on the Windows host
   filesystem before any reclaim happens.

## Fix

Two-part:

1. **Lockfile-pinned, deterministic install** in all 18 Dockerfiles:
   ```
   COPY package.json package-lock.json ./
   RUN npm ci --legacy-peer-deps
   ```
   - `npm ci` is faster, deterministic, and writes ~half the temporary
     state of `npm install`.
   - The lockfile in COPY makes the install layer's BuildKit cache key
     stable across rebuilds, so once the layer is warm it actually stays
     warm.
   - Matches the pattern `built-in-agent` already uses.

2. **Reclaim dangling BuildKit cache in `bin/showcase build`** with a
   24h-window `docker builder prune --filter "until=24h"`. Keeps the
   warm cache for day-of work, reaps orphans from interrupted builds.

## Verification

```
for d in showcase/integrations/*/; do
  grep -E "^(COPY package|RUN npm)" "$d/Dockerfile" | head -2
done
```

now prints identical:
```
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
```

for every integration.

## Out of band (cannot land in this PR)

- `docker volume prune -af` -- one-time recovery, ran locally, reclaimed
  16.11 GB from 236 anonymous Postgres volumes dating back to 2023.
- `Optimize-VHD` to compact the WSL2 docker_data.vhdx -- requires elevated
  PowerShell after `wsl --shutdown`. Each developer runs this themselves
  when their host drive gets tight; not something CI or this script can
  do.
2026-05-19 10:47:18 +02:00
Jordan Ritter 4749ac138c fix(showcase): replace networkidle with timed wait for LangGraph state persistence (#4913)
## Summary
- Replace `page.waitForLoadState("networkidle")` with
`page.waitForTimeout(1000)` in hitl-in-chat back-to-back test
- `networkidle` never resolves because the SPA maintains persistent
connections (CDN polling, telemetry)

## Root cause
After HITL resolution, CopilotKit AG-UI emits `RUN_FINISHED` before the
LangGraph server finishes persisting thread state. Starting Flow 2
immediately hits an active interrupt state → `UserInterrupt` /
`RUN_ERROR`. The 1-second delay gives the server time to complete async
state persistence.

## Test plan
- [x] 5/5 hitl-in-chat tests pass on LGP (port 3100)
- [x] 5/5 hitl-in-chat tests pass on LGT (port 3101)
- [x] Test specs byte-identical between LGP and LGT

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-19 00:16:33 -07:00
Jordan Ritter 2b5e4a6620 fix(showcase): replace networkidle with timed wait for LangGraph state persistence 2026-05-18 23:53:38 -07:00
Jordan Ritter a83d8d288f fix(showcase): resolve remaining test failures + bump deps to v1.57.2 (#4912)
## Summary
- Fix 4 non-release-blocker test failures (declarative-gen-ui,
open-gen-ui-advanced, reasoning-default, hitl-in-chat back-to-back)
- Bump all @copilotkit deps to v1.57.2 (unblocks 6
tool-rendering-default-catchall tests via
data-testid="copilot-tool-render")
- Work around web-inspector workspace:* leak with npm/pnpm overrides

## Changes
- **declarative-gen-ui**: Split content+toolCalls fixtures to prevent
frontend turn-closure race
- **open-gen-ui-advanced**: Replace `fill()` with `pressSequentially()`
for sandboxed iframe input
- **reasoning-default (LGT)**: Add missing route registration for
reasoning-default agent
- **hitl-in-chat back-to-back (LGT)**: Add networkidle wait between
sequential HITL flows
- **deps**: All @copilotkit/* packages 1.56.5 → 1.57.2 in both LGP and
LGT

## Test plan
- [x] 12/12 tool-rendering-default-catchall + reasoning-chain pass on
LGP (port 3100)
- [x] 12/12 same specs pass on LGT (port 3101)
- [x] All 4 targeted failures verified green on both ports

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-18 23:20:42 -07:00
Jordan Ritter 13df3107a2 fix(showcase): update @copilotkit deps to v1.57.2 for tool-render testid
Bumps all @copilotkit packages from 1.56.5 to 1.57.2 in both
langgraph-python and langgraph-typescript showcase integrations.
v1.57.2 adds data-testid="copilot-tool-render" needed by the
tool-rendering-default-catchall e2e tests.

Adds npm/pnpm overrides to work around a publish bug in
@copilotkit/web-inspector@1.57.2 where workspace:* leaked
into the published package.json for its @copilotkit/core dep.
2026-05-18 23:04:24 -07:00
Jordan Ritter 2436adba61 Fix intermittent declarative-gen-ui test failures (PieChart + BarChart)
The generate_a2ui aimock fixtures were returning content+toolCalls in a
single response. When aimock streams this, content text is emitted first,
then the tool call. The CopilotKit frontend sometimes processes the
content text and closes the assistant turn before the tool call (and its
subsequent A2UI operations) can be processed, causing the chart to never
render.

Split the fixture response: generate_a2ui now returns only toolCalls
(the tool invocation), and the descriptive text content moves to the
toolCallId follow-up fixture (the post-tool-result response). This
ensures the runtime processes the tool call first, executes generate_a2ui,
receives A2UI operations, and only then emits the text response.

Verified 10/10 passes on LGP (3100) and 5/5 on LGT (3101), vs ~40%
failure rate before the fix.
2026-05-18 22:29:41 -07:00
Jordan Ritter f1f18650c4 fix(showcase): fix reasoning-default and hitl back-to-back tests on LGT
Two LGT-only test failures fixed:

1. reasoning-default: The demo page sends agent="reasoning-default" but
the LGT route.ts only registered "reasoning-default-render". Added the
missing "reasoning-default" -> "agentic-chat-reasoning" mapping (same
graph used by reasoning-custom and reasoning-default-render).

2. hitl-in-chat back-to-back: After the first HITL flow completes on
LGT, sending a second message immediately triggers a RUN_ERROR race
condition in the CopilotKit runtime ("Cannot send event type: The run
has already errored"). Root cause is the LangGraph TypeScript server
takes slightly longer to finalize thread state after the interrupt ->
resume -> confirmation cycle. Fix adds page.waitForLoadState
("networkidle") between flows so all in-flight SSE streams are closed
before the next message is sent. Applied to both LGP and LGT test
copies for consistency.
2026-05-18 22:14:37 -07:00
Jordan Ritter 6e6878349a fix(showcase): use pressSequentially instead of fill for sandboxed iframe input
fill() silently no-ops inside sandbox="allow-scripts" iframes on some
Playwright/Chromium combos because the null origin blocks the
set-value protocol message. The input.value stays empty, so the
host-side evaluateExpression handler rejects it with "Unsupported
characters" and the test never sees a console log.

pressSequentially sends individual key events that always reach the
input regardless of sandbox restrictions.
2026-05-18 21:41:37 -07:00
Tyler Slaton 5d14af973c chore(vue): bump package version to match mono-repo (#4910) 2026-05-18 21:31:49 -07:00
Tyler Slaton ca86c3623e chore(vue): bump package version to match mono-repo
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-05-18 21:21:05 -07:00
Jordan Ritter 861e56b90e fix(showcase): LGT remaining delta — 16 test fixes + component extraction + cleanup (#4906)
## Summary
Closes the LGT-vs-LGP delta from PR #4879. Fixes 16 of 17 LGT-only test
failures, extracts inlined components to match LGP's factored pattern,
removes orphan demos, and ports infrastructure.

## Changes

### Test fixes (16 of 17 LGT-only failures)
- **headless-complete**: `normalizeResponse()` for
additional_kwargs.tool_calls + missing `get_revenue_chart` tool
- **readonly-state**: Removed aimock `systemMessage: "Atai"` gate
(gpt-5.4 sends role:developer)
- **reasoning-custom**: Created missing demo page + wired route to
existing reasoning graph
- **reasoning-default**: Renamed from `reasoning-default-render` + added
`suggestions.ts`
- **declarative-gen-ui**: Fixed A2UI tool name (`render_a2ui` →
`_design_a2ui_surface`) + state-aware ToolNode wrapper
- **beautiful-chat**: A2UI v0.9 operation format + ExampleCanvas agentId
+ manage_todos Command + copilotkitEmitState

### Component extraction (inlining → LGP pattern)
- **hitl**: 7 inlined components extracted to separate files
(step-selector, steps-feedback, suggestions, 4 shadcn components)
- **declarative-hashbrown**: All files aligned to LGP
- **declarative-json-render**: All files aligned to LGP
- **shared-state-read**: Extracted recipe-card.tsx + types.ts from
460-line page.tsx
- **reasoning-default**: Extracted suggestions.ts
- **beautiful-chat**: Extracted home-page.tsx

### Cleanup
- Removed `agentic-chat-reasoning` (deprecated, untested, covered by
reasoning-custom)
- Removed `shared-state-write` (unimplemented stub, superseded by
shared-state-read-write)
- Ported `layout.tsx` from LGP (per-demo title metadata)

## Variance after this PR
- Frontend files: 240 identical (96%), 10 justified diffs, 0 functional
gaps
- Tests: 37 identical (100%)
- API routes: 15 identical (100%)

## 1 remaining LGT-only failure
- reasoning-default "Show reasoning pill" — fixture doesn't produce
reasoning tokens for LGT pipeline

## Test plan
- [ ] Full LGP suite on production-parity local cluster
- [ ] Full LGT suite on production-parity local cluster
- [ ] CI checks
v1.57.2
2026-05-18 21:02:44 -07:00
github-actions[bot] c03c65df15 style: auto-fix formatting 2026-05-19 03:56:11 +00:00
Jordan Ritter 3682b24f3b fix(showcase/langgraph-typescript): fix stale manifest entries for renamed/missing demos 2026-05-18 20:54:36 -07:00
Jordan Ritter b475431570 fix(showcase/langgraph-typescript): add missing UI components from LGP 2026-05-18 20:49:52 -07:00
Tyler Slaton da6cfaf0b1 fix(ci): exclude node_modules from release artifact to avoid OOM (#4909)
## Summary

The release/publish workflow's build job uploads the entire workspace as
an artifact for the publish job to download. With `node_modules`
included, this monorepo produces **~6.4M files**, which OOMs
`upload-artifact`'s Node process at its 4 GB heap limit during file
enumeration:

```
With the provided path, there will be 6392019 files uploaded
...
FATAL ERROR: Ineffective mark-compacts near heap limit
Allocation failed - JavaScript heap out of memory
```

This was uncovered when the `workflow_dispatch` escape hatch added in
#4808 was first exercised — the upload step hung for 12+ minutes and
then crashed.

## Fix

1. **`Upload workspace` exclusions** — exclude `**/node_modules/**`,
`**/.next/**`, `**/.turbo/**`, `**/.nx/**`. Drops the file count by
orders of magnitude (almost all of those 6.4M files are pnpm's hoisted +
nested `node_modules`).
2. **`Install Dependencies` in the publish job** — runs `pnpm install
--frozen-lockfile` after `Download workspace`, so the publish step
operates against exactly the same resolved tree the build job used
(`pnpm-lock.yaml` is carried in the artifact).

The published `packages/*/dist/` outputs from the build job are
unaffected by the exclusions, so npm publish still has everything it
needs.

## Test plan

- [ ] Merge to main
- [ ] Dispatch `release / publish` against `monorepo` (or wait for the
next merged release PR)
- [ ] Confirm `Upload workspace` and `Download workspace` both finish in
seconds (not minutes), and `Install Dependencies` runs in the publish
job before `Publish to npm`
- [ ] Confirm the published tarballs on npm are byte-identical to what
the previous flow would have produced (same lockfile → same install →
same build outputs already in the artifact)


---
_Generated by [Claude
Code](https://claude.ai/code/session_01VnqgZdq8QaS15yknCKKcff)_
2026-05-18 20:49:40 -07:00
Jordan Ritter 74691ff119 fix(showcase/langgraph-typescript): add missing yaml dependency 2026-05-18 20:45:25 -07:00
Claude bbff324aaf fix(ci): exclude node_modules from release artifact to avoid OOM
The release/publish workflow's build job uploads the entire workspace
as an artifact for the publish job to download. With node_modules and
build caches included, this monorepo produces ~6.4M files, which OOMs
upload-artifact's Node process at its 4GB heap limit during
enumeration:

  FATAL ERROR: Ineffective mark-compacts near heap limit
  Allocation failed - JavaScript heap out of memory

Excluding node_modules, .next, .turbo, and .nx cuts the file count by
orders of magnitude. The publish job runs `pnpm install --frozen-lockfile`
after download to restore node_modules deterministically from
pnpm-lock.yaml (carried in the artifact), so the publish step still
runs against exactly the resolved dependency tree the build job used.

Fixes the upload step that hung for 12+ minutes and then OOM'd when
the workflow_dispatch trigger added in #4808 was first exercised.
2026-05-19 03:44:30 +00:00
Jordan Ritter 68482898a9 fix(showcase): sync agentic-chat spec — add race guard to LGT
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 20:39:53 -07:00
Jordan Ritter 872760e205 fix(showcase/aimock): remove stale recorded hitl fixtures that shadow feature-parity
Two recorded fixtures from a d5 run (2026-05-15) had wrong data
(attendee: "User" instead of "Sales team") and random toolCallIds
with no matching confirmation fixtures. They intercepted hitl-in-chat
requests before the correct feature-parity.json fixtures could match.
2026-05-18 20:39:52 -07:00
Jordan Ritter e69e67ea12 Fix 5 shared test failures in auth, chat-customization-css, and chat-slots
Two root causes:

1. Tests used messages ("Hello", "Hi", "hello", "Say something short")
   that don't match any aimock fixture. With --proxy-only mode, unmatched
   requests fall through to real OpenAI which rejects the mock API key
   (sk-mock-local-dev) with 502/401. Replaced all test messages with
   exact d5-all.json fixture entries: "Say hello in one short sentence",
   "Tell me a one-line joke", "Give me a fun fact".

2. The "second assistant turn" test in chat-slots sent its second message
   immediately after the first assistant bubble appeared. The assistant
   message becomes visible on the first streaming chunk, but the chat
   input stays disabled until the full stream ends (aimock streams at
   60ms/8-char-chunk). Added a text-stabilization poll between turns to
   wait for streaming to finish before sending the next message.

All tests copied identically to both LGP and LGT. Verified 16/16 pass
on both ports (3100 and 3101) across multiple runs.
2026-05-18 20:39:11 -07:00
Jordan Ritter 54717e61bf fix(showcase/aimock): fix shared-state-read + hitl multi-pill fixture gaps
Two aimock fixture issues caused e2e test failures on both LGP and LGT:

1. shared-state-read: no fixture matched "What recipe am I making?" —
   added a new fixture in feature-parity.json keyed on that substring.

2. hitl-in-app multi-pill test: the second pill's first-turn request
   failed because hasToolResult: false on the 1st-turn fixtures rejected
   conversations that already contained tool results from earlier pills.
   Removed hasToolResult: false from refund/downgrade/escalate 1st-turn
   fixtures — the more-specific post-tool-result fixtures (with
   toolCallId + hasToolResult: true) still win on the 2nd turn.
2026-05-18 20:39:11 -07:00
Jordan Ritter e7ebc786c3 fix(showcase): simplify agent-config route + fix race condition in test
Remove custom AgentConfigLangGraphAgent wrapper that broke SSE stream
lifecycle (data-copilot-running stuck at true). Use plain LangGraphAgent
matching LGP pattern — useAgentContext via ConfigContextRelay handles
config forwarding without the wrapper.

Test fix: filter out agent/stop POST bodies from captured requests and
wait for data-copilot-running=false between sends to prevent race.
2026-05-18 20:39:10 -07:00
Jordan Ritter c8187e3788 fix(showcase): gen-ui-agent 'message list container' test needs a message first
CopilotChat v2 renders a welcome screen when messages are empty,
which means the messageView.children callback (where the
copilot-message-list testid lives) is not invoked until the first
message is sent. Send "Hello" before asserting the container exists.

Fixes the test on both LGP (port 3100) and LGT (port 3101).
2026-05-18 20:39:10 -07:00
Jordan Ritter 31c536020f fix(showcase): add aimock fixtures for agentic-chat e2e + fix
multi-turn race on LGT

Two shared agentic-chat tests failed on both LGP and LGT because
the test messages had no matching aimock fixtures, and the
multi-turn test had a race condition on LGT where the second
Enter keypress was swallowed during a component re-render.

- Add 3 fixtures to feature-parity.json for the agentic-chat e2e
  test messages (hello, Alice turn 1, Alice turn 2)
- Wait for suggestion pills to reappear before sending the
  follow-up message in the multi-turn test
2026-05-18 20:39:10 -07:00
Jordan Ritter b90dc89833 fix(showcase/langgraph-typescript): extract components matching LGP for reasoning-default + shared-state-read + beautiful-chat
reasoning-default: add suggestions.ts, use extracted hook in page.tsx
shared-state-read: extract types.ts, recipe-card.tsx from 460-line
  inlined page.tsx; add README.md
beautiful-chat: extract HomePage to home-page.tsx matching LGP pattern
2026-05-18 20:39:10 -07:00
Jordan Ritter 9f9d4fd60b fix(showcase/langgraph-typescript): extract hitl components matching LGP pattern 2026-05-18 20:38:33 -07:00
Jordan Ritter 9800affe0e fix(showcase/langgraph-typescript): rename reasoning-default-render to reasoning-default matching LGP 2026-05-18 20:38:33 -07:00
Jordan Ritter e74a9c6ed0 chore(showcase/aimock): remove stale recorded fixtures from prior session
Delete 9 recorded fixture files from showcase/aimock/d5-recorded/recorded/
that were captured during a previous real-API recording session. These
fixtures are not needed -- the existing feature-parity.json fixtures
already cover all 4 test cases (Task Manager, Search Flights, PieChart,
BarChart) for both LGP and LGT.
2026-05-18 20:38:33 -07:00
Jordan Ritter 96bd3404e4 fix(showcase/langgraph-typescript): fix beautiful-chat A2UI format + agentId + declarative-gen-ui tool naming 2026-05-18 20:38:33 -07:00
Jordan Ritter a8388dc851 fix(showcase/langgraph-typescript): fix readonly-state fixtures + add reasoning-custom demo + headless-complete agent fixes 2026-05-18 20:38:33 -07:00
Jordan Ritter e4d42f9fc5 fix(showcase/langgraph-typescript): align headless-complete agent to LGP gold standard
Add missing get_revenue_chart tool and normalizeResponse to fix two
LGT-only test failures in headless-complete.spec.ts (weather pill
and revenue chart pill).

Root causes:
- get_revenue_chart tool was missing from the LGT agent, so the
  aimock fixture tool call had no ToolNode handler.
- @langchain/openai 1.4.x streaming places tool_calls in
  additional_kwargs when content is also present. shouldContinue
  only checked the top-level tool_calls array, so weather tool
  calls were silently dropped.

normalizeResponse promotes additional_kwargs.tool_calls to the
top-level tool_calls array so shouldContinue works uniformly.
2026-05-18 20:38:32 -07:00
Jordan Ritter be0c400359 feat(ci): add workflow_dispatch escape hatch to release/publish (#4808)
## Summary

Adds a `workflow_dispatch` trigger to
`.github/workflows/publish-release.yml` so the release/publish workflow
can be manually retriggered against the latest commit on `main`.

This is the escape hatch for the current edge case: a release failed
mid-flight, `main` already has the bumped versions, but nothing was
published and the normal PR-merge trigger can't fire again without a
fresh release PR.

## What this covers

✅ Failures **before** the `Publish to npm` step succeeded:
- Build errors
- Infrastructure blips (runner crash, OIDC token issue, npm registry
hiccup)
- Pre-publish workflow bugs (e.g. the `git config --local` issue fixed
in #4874)

## What this does NOT cover

❌ Failures **after** `Publish to npm` succeeded:
- If npm publish ran but tag push or GitHub Release creation failed,
dispatching this workflow will fail at `Publish to npm` with an `already
published` error.
- The `Check for pre-existing tags` step will also block retries where
the tag was pushed but later steps failed.

For those cases: finish the release by hand using `release-notes.md`
from the merged release PR — manually create the git tag at the publish
commit and create the GitHub Release. Don't dispatch.

Both the in-file YAML comment above `workflow_dispatch:` and the
dispatch form's `scope` input description spell this out so operators
see it before triggering.

## Change

Minimal: 33 insertions, 7 deletions in one workflow file.

- New `workflow_dispatch` trigger with a required `scope` choice input
(`monorepo` | `angular`)
- `if` condition widened to also accept `workflow_dispatch` runs
- Scope-extraction step now uses `inputs.scope` when present, falls back
to the existing PR-branch parsing otherwise
- YAML comment above the trigger documents the coverage limits

The normal PR-merge trigger and the entire downstream publish pipeline
are unchanged.

## Test plan

- [ ] Merge to main
- [ ] Actions → "release / publish" → "Run workflow" → pick scope →
confirm publish proceeds against current main versions
- [ ] Confirm a normal release-PR merge still triggers and behaves
identically
- [ ] Confirm dispatch against a state where npm publish already
succeeded fails fast at "Publish to npm" (does not corrupt anything)
2026-05-18 20:09:53 -07:00
Tyler Slaton f9dfd3d5be fix(shell-docs): stack sidebar under banner when banner is visible (#4908)
## Summary

- The DocsLayout sidebar uses `position: fixed` with hardcoded `top:
76px / 96px` (md / xl) in
[showcase/shell-docs/src/app/globals.css](showcase/shell-docs/src/app/globals.css).
When the rotating banner is visible, body-flow chrome (Banners +
BrandNav) shifts down by the banner's height (~54px), but the fixed
sidebar stays pinned — so the framework picker overlaps the BrandNav
row.
- Wrap both top overrides in `calc(... + var(--fd-banner-height, 0px))`
so the sidebar follows the banner's height (54px shown, 0px dismissed).
`Banners` already writes that variable on `<html>`, and `MobileTopNav`
already uses the same pattern.

## Before / after

Before: with banner showing, the sidebar's "framework" pill sits at
viewport `top: 96px`, while BrandNav occupies 54-142px — the pill
obscures the "CopilotKit DOCS" mark and nav links.
After: sidebar resolves to `top: 150px` (96+54) at xl and `top: 130px`
(76+54) at md, sitting cleanly below BrandNav. Snaps back to 76 / 96px
when the banner is dismissed.

## Test plan

- [x] Banner visible @ 1280px viewport — sidebar `top: 150px`, no
overlap with BrandNav
- [x] Banner visible @ 1024px viewport — sidebar `top: 130px`, no
overlap with BrandNav
- [x] Banner dismissed @ 1024px viewport — sidebar `top: 76px`, flush
under BrandNav
- [x] Visual screenshot review in light theme across both breakpoints

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-18 20:08:20 -07:00
Tyler Slaton 2b08523e9e fix(shell-docs): stack sidebar under banner instead of overlapping BrandNav
The DocsLayout sidebar uses `position: fixed` with hardcoded `top: 76px / 96px`
overrides at md/xl. When the rotating banner is visible, body-flow `Banners` +
`BrandNav` shift down (banner ~54px + BrandNav 68/88px), but the fixed sidebar
stays pinned — so the "LangGraph (Python)" framework picker overlaps the
BrandNav row.

Wrap both top overrides in `calc(... + var(--fd-banner-height, 0px))` so the
sidebar slides down by the banner's height when shown and snaps back when
dismissed. `Banners` already writes that variable on `<html>` (54px / 0px),
and `MobileTopNav` uses the same pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 20:03:52 -07:00
Tyler Slaton 7bc0835f81 fix(shell-docs): repair stale imports left behind by Fumadocs migration (#4907)
## Summary

The Fumadocs UI adoption PR (#4898) removed `highlight.js` +
`rehype-highlight` from `showcase/shell-docs/package.json` and swept the
bespoke nav rendering over to Fumadocs's `DocsLayout` + page-tree
bridge, but **four stale call sites survived the sweep** and broke the
Docker build of `showcase-shell-docs` on main ([run
26071347282](https://github.com/CopilotKit/CopilotKit/actions/runs/26071347282/job/76653308716)):

- **`agentcore-command-tabs.tsx`** still imported the now-uninstalled
`highlight.js` to syntax-highlight inline bash (the immediate Webpack
error: `Module not found: Can't resolve 'highlight.js'`). Rebuilt the
body on Fumadocs's `<DynamicCodeBlock>` so the AgentCore command tabs
share Shiki + the native copy-button chrome with every other code block
— matching `Snippet` / `DemoSource`, which already moved off `hljs`.
- **`[[...slug]]/page.tsx`** still defined `nodeKey` +
`OverviewNavItem`, which reach for the removed `SidebarLink` and
`NavNode` references. The functions are unreachable — `DocsOverview`
renders the sidebar via `ShellDocsLayout(tree=pageTree)` — so they were
deleted outright instead of patched.
- **`docs-page-view.tsx`** had the same dead `renderNavItem` helper for
the same reason; deleted.
- **`brand-nav.tsx`** referenced `<ExternalLinkIcon />` without
importing it.

The `highlight.js` Webpack error was the only one surfaced in CI because
Next.js's compile pass aborts before typecheck; the other three would
have surfaced as `Failed to compile` typecheck failures on the next push
regardless. Fixed all four at once so the next `next build` is clean
end-to-end.

## Test plan

- [x] `next build` of `showcase/shell-docs` locally — all 30 static
pages generate, no Webpack or TS errors
- [x] Pre-commit hooks (`oxlint`, `oxfmt`, `nx test
--projects=packages/**`, `check:packages`) green
- [ ] CI green on this PR — the `Showcase: Build & Push` shell-docs leg
should now succeed

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-18 19:20:46 -07:00
Tyler Slaton 20a2433984 fix(shell-docs): repair stale imports left behind by Fumadocs migration
The Fumadocs UI adoption PR (#4898) removed highlight.js + rehype-highlight
from package.json and replaced the bespoke nav rendering with Fumadocs's
DocsLayout + page-tree bridge, but four stale call sites survived the
sweep and broke the Docker build of showcase-shell-docs on main:

- agentcore-command-tabs.tsx still imported the now-uninstalled
  highlight.js to syntax-highlight inline bash. Rebuilt the body on
  Fumadocs's DynamicCodeBlock so the AgentCore command tabs share Shiki
  + the native copy-button chrome with every other code block.
- [[...slug]]/page.tsx still defined nodeKey + OverviewNavItem, which
  reach for the removed SidebarLink. The functions are unreachable —
  DocsOverview renders the sidebar via ShellDocsLayout(tree=pageTree) —
  so they were deleted outright instead of patched.
- docs-page-view.tsx had the same dead renderNavItem helper; deleted.
- brand-nav.tsx referenced ExternalLinkIcon without importing it.

Verified with `next build` of showcase/shell-docs locally: all 30 static
pages generate cleanly and no Webpack/TS errors remain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 19:15:37 -07:00