Commit Graph

1800 Commits

Author SHA1 Message Date
Martha Schumann 7f61d628fd fix(web-inspector): address debugger review feedback 2026-06-30 11:12:56 -07:00
Markus Ecker cffd577a2f fix(web-inspector): subscribe to memory store when Memories tab is active on boot 2026-06-30 18:14:09 +02:00
Markus Ecker 0e82ae01d6 test(memory): cover context/realtime/idempotency edges, store teardown, angular mutation parity 2026-06-30 16:49:42 +02:00
Markus Ecker 546454a7c3 fix(web-inspector): create memory store lazily on tab activation; inline mutation errors; distinct old-SDK teaser 2026-06-30 16:41:57 +02:00
Ran Shem Tov 258cdce49a feat(vue): export vueBasicCatalog for the catalog-on-provider path
A2UI's catalog-on-provider path needs a catalog to pass to
`a2ui.catalog`, but the library build tree-shook the nested barrel
re-export so vueBasicCatalog was unreachable at runtime (present only in
the .d.ts). Re-export it explicitly from the v2 entry, mirroring React's
`basicCatalog` export from @copilotkit/a2ui-renderer. Add an export test
guarding against the regression.
2026-06-30 16:33:12 +02:00
Markus Ecker f5086be167 feat(memory): surface realtime connection status (connecting/connected/unavailable) 2026-06-30 16:26:32 +02:00
Markus Ecker ac6e83ef79 feat(core): memory error registry with stable codes 2026-06-30 16:07:37 +02:00
Markus Ecker 9bb49d9c76 fix(core): reset availability on stop, per-store request counter, deep-freeze server state 2026-06-30 16:02:40 +02:00
Ran Shem Tov e1de6d412e fix(vue): enable A2UI via catalog-on-provider path
The Vue CopilotKitProvider gated all A2UI activation on the runtime
signal (core.a2uiEnabled), so passing an a2ui.catalog to the provider
did nothing: surfaces never rendered locally and the runtime was never
told to inject the render tool. React already supports the
catalog-on-provider path (1.61.2).

Mirror React: a provided catalog now activates A2UI locally and forwards
the a2uiCatalogAvailable property so the runtime injects the render tool
without a runtime-side a2ui config. User-provided properties are
preserved alongside the signal.

Fixes #5774
2026-06-30 16:01:43 +02:00
Markus Ecker 95ed596d3a fix(memory): tighten mutation-response and runtime boundary validation 2026-06-30 15:58:35 +02:00
Markus Ecker 993a0f1322 docs(memory): align react/angular binding docs; re-export public memory types 2026-06-30 15:54:00 +02:00
Markus Ecker f5560ead32 fix(core): harden memory mutation/refresh paths (validate response, settle refresh on context switch, freeze server) 2026-06-30 15:38:10 +02:00
Markus Ecker 8907c41ff7 fix(core): scope memory availability to the list route; settle refresh on unavailable; treat 422 as not-configured 2026-06-30 15:27:32 +02:00
Markus Ecker 8a7ac74e94 fix(runtime): validate sourceThreadIds elements are strings in memory body 2026-06-30 15:14:20 +02:00
Markus Ecker e7d6724e04 fix(web-inspector): gate memories tab telemetry on telemetryDisabled; reset memory state on detach 2026-06-30 15:10:30 +02:00
Markus Ecker 47d40938da fix(react-core): add getServerSnapshot to useMemories for SSR safety 2026-06-30 15:06:12 +02:00
Markus Ecker 0e1fc83485 fix(core): session-guard mutations, handle credentials events, add getServerState 2026-06-30 14:59:49 +02:00
Markus Ecker 3c472bc581 test(core): import test() from vitest in memory.test
Three snapshot tests (lines 751/771/789) call test() while the file uses
explicit vitest named imports. They pass at runtime via vitest's global
but fail tsc check-types (TS2593). Add test to the import.
2026-06-30 13:53:43 +02:00
Markus Ecker 111aca5688 refactor(core): drop ɵ prefix from hook-facing memory types
Memory, NewMemory, MemoryChanges, MemoryKind, and MemoryScope are the
memory types surfaced by the useMemories / injectMemories hook result
shapes, so export them unprefixed as supported public API instead of
behind the ɵ "internal" marker. Internal memory plumbing (MemoryStore,
the selectMemories* selectors, state/context/event types,
createMemoryStore) keeps the ɵ prefix.

Updates the react-core and angular hook signatures, the web-inspector
Memories tab, and the affected tests to the unprefixed names.
2026-06-30 13:49:48 +02:00
github-actions[bot] ffca613e41 style: auto-fix formatting 2026-06-30 08:42:53 +00:00
Markus Ecker b1e845b6c6 refactor(angular): adapt injectMemories to the de-scoped user-scoped memory API 2026-06-30 10:42:02 +02:00
Lukas Moschitz ec86c101f3 feat(angular): injectMemories binding on the core memory store 2026-06-30 10:42:02 +02:00
Ran Shemtov c45f471330 Merge branch 'main' into claude/happy-dirac-f6ed5e 2026-06-29 23:07:27 +02:00
Ran Shem Tov 8582f59381 fix(react-core): render nothing for unhandled tool calls instead of auto default card
- Revert the v2 useRenderToolCall fallback: when no per-tool or wildcard renderer is
  registered, return null instead of auto-painting DefaultToolCallRenderer. Showing the
  card is opt-in via useDefaultRenderTool().
- The auto-card default shipped silently in v1.57.2 (commit ba60df5d33, buried in a
  showcase per-tool-testids commit, no CHANGELOG entry) and leaked internal tool names +
  raw args/result JSON (e.g. generate_a2ui) into every v2 app's chat in production.
- Remove the now-dead defaultToolCallRenderAdapter + __testOnly_ export + unused imports.
- Rewrite the resolver test to assert the 3-state opt-in contract: useDefaultRenderTool()
  -> card, useDefaultRenderTool({render}) -> custom, no hook -> nothing.
2026-06-29 22:49:15 +02:00
github-actions[bot] eae06ced22 style: auto-fix formatting 2026-06-29 19:58:11 +00:00
Martha Schumann 33fda98a41 Merge origin/main into unified thread debugger 2026-06-29 12:56:44 -07:00
Martha Schumann aed9ad924b fix(web-inspector): keep thread timeline populated 2026-06-29 12:24:17 -07:00
Ran Shemtov ead9ed75ea Merge branch 'main' into claude/trusting-carson-933f4b 2026-06-29 20:37:40 +02:00
github-actions[bot] a08b5f796d style: auto-fix formatting 2026-06-29 16:17:28 +00:00
greymoth 821c57e979 fix(angular): skip chat input submit during IME composition
The Angular CopilotChatInput sends the message on Enter without checking
for IME composition, so confirming a CJK candidate with Enter submits the
half-composed text. The React (react-core v2) and Vue (vue v2) bindings of
the same CopilotChatInput already guard this with isComposing/keyCode 229.
2026-06-30 01:16:51 +09:00
Markus Ecker 4a30b972bd fix(web-inspector): guard core.getMemoryStore() for older-core compatibility 2026-06-29 17:21:20 +02:00
Markus Ecker f40f3be41d test(web-inspector): memories tab + cpk-memory-list coverage 2026-06-29 17:14:49 +02:00
Markus Ecker 2e211c314d feat(web-inspector): memories view states + locked teaser 2026-06-29 17:03:49 +02:00
Markus Ecker d0aad77f1f feat(web-inspector): cpk-memory-list (card list + search + kind filter) 2026-06-29 17:00:11 +02:00
Markus Ecker bdacfbe0c7 feat(web-inspector): register the Memories tab + render dispatch + telemetry 2026-06-29 16:57:14 +02:00
Markus Ecker a37d86cfde feat(web-inspector): memories tab telemetry event + tracker 2026-06-29 16:52:55 +02:00
Markus Ecker 0e71e4900e fix(web-inspector): re-render on memory store updates 2026-06-29 16:50:52 +02:00
Markus Ecker 045414539a feat(web-inspector): subscribe to the core memory store 2026-06-29 16:47:53 +02:00
Markus Ecker ecbcd092ce feat(react-core): useMemories() is a no-arg consumer of the core memory store 2026-06-29 15:54:42 +02:00
Markus Ecker 0c1acf30c7 test(core): cover core-owned memory store singleton + context wiring 2026-06-29 15:34:54 +02:00
Markus Ecker 8650aa1129 feat(core): core owns a single user-scoped memory store (drop agentId registry) 2026-06-29 15:29:53 +02:00
Markus Ecker 35950615cf test(core): cover memory silent-degrade on unconfigured routes
Add three flat test cases verifying the silent-degrade contract:
404/501 list response sets available:false with no error; 500 response
sets error and keeps available:true; 404 subscribe response is silent
with no console.warn emitted.
2026-06-29 15:22:10 +02:00
Markus Ecker 4eadf9cbb5 feat(core): memory fetch/credentials tolerate unconfigured routes (404/501) 2026-06-29 15:19:51 +02:00
Markus Ecker 44147ff03a feat(core): add ɵselectMemoriesAvailable selector 2026-06-29 15:16:54 +02:00
Markus Ecker 8656aae530 feat(core): add listUnavailable/credentialsUnavailable actions and available state
Adds listUnavailable and credentialsUnavailable to memoryRestEvents, adds
available: boolean to MemoryState (defaulting to true), resets available to
true on contextChanged and listRequested, and handles listUnavailable by
clearing memories and setting available: false with a session guard.
2026-06-29 15:11:54 +02:00
Markus Ecker bb117b1ef7 Merge remote-tracking branch 'origin/main' into mme/memory-core
# Conflicts:
#	packages/core/src/index.ts
2026-06-29 13:37:52 +02:00
Ben Taylor ca28191042 feat(drawer): CopilotDrawer host theming, mobile launcher, action icons + thread-management/tooltip fixes (#5707)
## CopilotDrawer — SDK polish + thread-management fixes

Polish and fixes on top of the shipped `<copilotkit-drawer>`
([#5701](https://github.com/CopilotKit/CopilotKit/pull/5701)), surfaced
by real de-fork pilots run against a locally-built SDK + the hosted
Intelligence runtime: **langgraph-js** (rich canvas / inline
`CopilotChat` / dark theme) and **mastra** (the proverbs CoAgents demo /
`CopilotSidebar` / light theme / controlled→uncontrolled provider).
Spans **`@copilotkit/web-components`** and **`@copilotkit/react-core`**
— no example/de-fork changes here (those wait on a release that
publishes web-components + a `react-core` bump that includes
`CopilotDrawer`). Captured as Phase-5 acceptance requirements in the
[design doc](https://app.notion.com/p/3883aa3818528190b5d1f9b6ba26dca0).

### `react-core` — thread management
- **Thread switching works under `<CopilotKit>`.**
`CopilotChatConfigurationProvider` treated any `threadId` prop as
controlled, so the auto-minted, non-explicit threadId that
`<CopilotKit>`'s v1 bridge seeds blocked the drawer's imperative
`setActiveThreadId` / `startNewThread` — thread switching and "+ New"
were dead in every app wrapped in `<CopilotKit>`. A non-explicit
(`hasExplicitThreadId={false}`) threadId is now overridable; a genuine
caller-supplied threadId stays controlled.
- **"+ New" resets the chat.** `CopilotChat` clears messages when
switching to a fresh non-explicit thread so the welcome screen shows
instead of the prior thread's messages — including when a still-loading
`/connect` is superseded by the switch (the aborted connect's stale
snapshot is dropped instead of repopulating the view).
- **No upsell flash/stick.** `CopilotDrawer` treats a pending (`null`)
license status as loading, not unlicensed, so the upgrade upsell no
longer flashes (or sticks) before the runtime reports the license.
- **In-header drawer launcher is mobile-only.**
`CopilotModalHeader.DrawerLauncher` toggles `drawerOpen`, which only
drives the off-canvas *mobile* drawer; on desktop the drawer is a
persistent in-flow panel that ignores `open`, so the launcher was a dead
no-op there. It now renders only at ≤767px. On desktop the chat's own
open/close (the toggle FAB + the header close, both lucide `X`) is the
consistent pair.

### `web-components` — theming, launcher, icons, tooltips
- **Host-theme inheritance (incl. dark mode).** Each token now resolves
`--cpk-drawer-* override → host theme var
(`--background`/`--card`/`--foreground`/`--border`/…) → built-in light
default`. The drawer follows the host app's light/dark theme by
inheritance, instead of baking light-only values (it showed a light
drawer on a dark app). Custom properties aren't reset by the `:host {
all: initial }` guard, so the standalone fallback still holds.
- **Row actions are icon buttons with instant, on-brand tooltips.**
Archive / Unarchive / Delete render inline lucide-style SVGs
(`currentColor`). Native `title` is replaced by an instant CSS tooltip
(matches the React components' Radix `delayDuration: 0`; `title`'s
show-delay is browser-fixed at ~1.5s), styled to match the standard
CopilotKit tooltip — a primary-colored bubble with an arrow, not a
surface/bordered box — and positioned to the side so the list's
scroll-overflow never clips it. The tooltip is suppressed while the
delete-confirm dialog is open (the clicked trash button keeps
`:focus-visible` otherwise, leaving its "Delete" tooltip floating over
the dialog).
- **Clipped thread names get a tooltip.** A truncated name exposes its
full text via the same instant primary-bubble tooltip as the row actions
(not the native `title`), shown only when actually clipped. The name
text moved to an inner span (so the outer can host the un-clipped
bubble) and the hovered row is z-lifted (each row is its own stacking
context from the entry-animation transform, which otherwise painted the
bubble under later rows).
- **Archived rows are muted**, no longer struck through.
- **Refetch preserves the list.** A refetch (e.g. Active↔All toggle)
keeps the known threads visible; the full loading state only renders on
the initial empty fetch.
- **Empty `footer` region hides** (it rendered as a stray bordered box
at the bottom). Driven by a `slotchange` listener, mirroring the
`memories` region.
- **Self-owned mobile launcher.** When the drawer is a closed off-canvas
mobile modal it renders its own floating "open threads" launcher, so
it's always openable without the host wiring a header button. The icon
is swappable via a `launcher-icon` **slot**, position is themeable via
`--cpk-drawer-launcher-top` / `--cpk-drawer-launcher-left` (so a host
can center it on its own header controls), and it exposes
`part="launcher"`. The richer in-header
`CopilotModalHeader.DrawerLauncher` remains an optional integration.

### Tests
- **react-core**: thread-control + non-explicit-override cases on
`CopilotChatConfigurationProvider`, the "+ New" message reset on
`CopilotChat`, license-pending gating on `CopilotDrawer`, and the
mobile-only / desktop-hidden launcher on `CopilotModalHeader`. New
regression tests verified red-green; chat + provider suites green, `tsc
--noEmit` clean, build green. (The superseded-connect *race* guard is
covered by live verification + its synchronous sibling test — an
async-timing unit test would be flaky, which the repo treats as a bug.)
- **web-components**: element tests for the icon tooltips +
confirm-dialog suppression, the clipped-name tooltip (`data-tooltip` +
placeholder), archived styling, refetch-preserves-list, footer
hide-when-empty, and mobile launcher render/open + desktop-absent.
Drawer suite green, `tsc --noEmit` clean, build + `es-check` green under
`CI=true`. (Truncation detection + tooltip stacking are layout/CSS —
verified live, not in jsdom.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-28 08:44:06 -05:00
Jeel Gor 9632ca901c Merge branch 'main' into fix/5601-windows-cross-platform-scripts 2026-06-27 15:48:22 +05:30
Benjamin Taylor 9223fc476a fix(web-components): stamp name-clipped on the row so the tooltip z-lift fires
_syncNameClipping toggled name-clipped on .row-name, but the stacking fix in
styles.ts targets .row.name-clipped:hover — a different element — so the z-index
lift never matched and clipped-name tooltips still painted under later rows
(each row is its own transform stacking context). Stamp the flag on the owning
.row too; the tooltip bubble stays scoped to .row-name:hover so a row-action
hover never surfaces it. Adds a red-green contract test asserting the class
lands on both the row-name and the row.

Addresses MikeRyanDev review on #5707.
2026-06-26 17:11:25 -05:00
Benjamin Taylor 31f31eeebd fix(web-components): tooltip for clipped CopilotDrawer thread names
A long thread name is clipped with an ellipsis; expose the full text via the
same instant primary-bubble tooltip as the row actions (not the native `title`),
shown only when the name is actually truncated. The name text moved to an inner
span so the outer `.row-name` can host the un-clipped bubble, and the hovered
row is z-lifted so the bubble isn't painted under later rows (each row is its
own stacking context from the entry-animation transform).
2026-06-26 16:54:55 -05:00