Repository navigation
docs: CopilotThreadsDrawer guide + Threads updates + React reference (closes ENT-1021) - #5780
Conversation
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
Production Digest-Pinning AuditAll 41 services digest-pinned. Run 2026-07-07 15:55:05 PDT — 0 finding(s). |
samjulien
left a comment
There was a problem hiding this comment.
A few small things and then one themed question around this upgrade upsell thing. Will talk on Slack.
| } | ||
| ``` | ||
|
|
||
| That's the whole integration — no `threadId` state, no `onSelect` plumbing. |
There was a problem hiding this comment.
This line doesn't make much sense if you haven't compared to the other type of implementation
| | `label` | Accessible label + default header text. Defaults to `"Threads"`. | | ||
| | `onThreadSelect` | Escape hatch to take over thread selection yourself. | | ||
| | `onNewThread` | Escape hatch to handle "+ New" yourself. | | ||
| | `onUpsell` | Called when the unlicensed upgrade CTA is clicked (React only). | |
There was a problem hiding this comment.
what is this? why expose this to users?
| - **Per-row content** — the `renderRow` prop projects custom content into each row while the element keeps selection, archived styling, and the action buttons. | ||
| - **CSS parts + variable tokens** — restyle structural `::part()`s or override `--cpk-drawer-*` tokens. The full list is in the [reference](/reference/components/CopilotDrawer#customization). | ||
|
|
||
| ## Angular |
There was a problem hiding this comment.
This should be split into a separate complete doc probably using the new frontend structure so that it shows up when a user selects Angular (including the stuff above)
| ## License | ||
|
|
||
| Threads run on the Enterprise Intelligence Platform. While unlicensed (or with | ||
| no license configured) the drawer shows an upgrade upsell instead of the list |
There was a problem hiding this comment.
really strange to use "upgrade upsell" in a user-facing page
|
|
||
| `CopilotDrawer` does not declare its own outputs. The element's intents (select, new, archive, unarchive, delete, filter-change, retry) are handled internally and routed to `injectThreads` mutations and the `CopilotChatConfiguration` service. Use the optional `onThreadSelect` / `onNewThread` inputs to intercept the two active-thread intents. | ||
|
|
||
| The Angular drawer is **always licensed** (the Angular SDK is ungated), so it does not surface the element's `upsell` event. |
| configuration so the welcome screen shows with no host wiring. | ||
| </PropertyReference> | ||
|
|
||
| <PropertyReference name="onUpsell" type="() => void"> |
| **[`CopilotDrawer`](/prebuilt-components/copilot-drawer)** — drop | ||
| `<CopilotDrawer />` next to your chat and it lists, switches, renames, | ||
| archives, and deletes threads with no active-thread wiring. The `useThreads` | ||
| steps below are the **headless** path, for when you want to build the thread |
There was a problem hiding this comment.
if we were to rename this page, would "Headless Threads" make sense? Or more like "Custom Threads Drawer"? Trying to rethink our info spread here.
af76c5d to
b8d6025
Compare
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/bot
@copilotkit/bot-discord
@copilotkit/bot-slack
@copilotkit/bot-teams
@copilotkit/bot-telegram
@copilotkit/bot-ui
@copilotkit/bot-whatsapp
@copilotkit/core
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
b8d6025 to
b1de455
Compare
MikeRyanDev
left a comment
There was a problem hiding this comment.
Found a docs accuracy issue that should be fixed before merge.
The new CopilotThreadsDrawer docs repeatedly say the prebuilt drawer lets users rename threads: the guide says it can “list, switch, start, rename, archive, and delete” and advertises “rename ... with zero wiring”; the React reference says the same in its overview; and the shared Threads callout says the drawer “lists, switches, renames, archives, and deletes”. That does not match the current drawer implementation/API in the companion drawer PR: the row kebab exposes Archive/Unarchive and Delete, and there is no rename event, prop, or built-in rename UI. Rename is available through the headless useThreads path, but not through the prebuilt drawer.
Please remove “rename” from the prebuilt drawer capability claims, or document it explicitly as something you implement yourself with useThreads/custom UI. The useThreads page can still describe rename as a headless capability.
While touching the reference, it would also be worth making the CSS parts list align with the actual exposed parts from the current drawer implementation; it currently omits newer exposed parts such as collapse-toggle, close-toggle, launcher-cluster, launcher-new-thread, load-more, fetch-more-error, and fetch-more-retry, despite the guide sending readers there for the “full list”.
CI is green; this is a content/API accuracy blocker, not a build failure.
…larify the zero-wiring line (#5780 review) - Remove 'rename' from the prebuilt CopilotThreadsDrawer capability claims (guide, React reference, shared Threads callout) — the row kebab only does archive/unarchive + delete. Add an explicit note that rename is available via the headless useThreads path. (MikeRyanDev) - Reference CSS parts list now matches the shipped element: adds row/row-active, collapse-toggle, close-toggle, backdrop, launcher-cluster, launcher-new-thread, load-more, fetching-more, fetch-more-error, fetch-more-retry, licensed, licensed-cta; grouped by area. (MikeRyanDev) - Rewrite the 'no threadId state / no onSelect plumbing' line to stand on its own by contrasting with a hand-rolled sidebar. (samjulien)
…otThreadsDrawer on prebuilt pages (#5780 review) - /threads page title -> 'Headless Threads' to distinguish the headless useThreads path from the prebuilt drawer (slug kept, so no inbound links break; sidebar label follows the frontmatter title). (samjulien #9) - prebuilt-components index: the 'saved conversations' line now leads with the drop-in CopilotThreadsDrawer and offers Headless Threads as the DIY path, plus a companion-sidebar mention in 'Pick a surface' — the drawer was absent from the prebuilt landing page. - chat page: same, point at the prebuilt drawer first, headless second.
|
Thanks for the reviews @MikeRyanDev @samjulien — addressed in @MikeRyanDev — accuracy blocker
@samjulienSeveral of your notes were on the pre-rename
Known gap
|
MikeRyanDev
left a comment
There was a problem hiding this comment.
Rereviewed current head 0ec526d. The prebuilt drawer docs no longer claim built-in rename support and now route rename to the headless useThreads path. The React reference CSS parts list also covers the new drawer parts from the companion implementation. CI is green.
…ign (ENT-1051) (#5823) Redesigns the shared `<copilotkit-threads-drawer>` element (`@copilotkit/web-components`) to the new Figma UX, keeping the React, Vue, and Angular wrappers in lockstep. Pure-VIEW change — no `@copilotkit/core`, runtime, or `useThreads` changes. **Ticket:** [ENT-1051](https://linear.app/copilotkit/issue/ENT-1051) · **Figma:** [Thread Drawer](https://www.figma.com/design/feSsBJw1qCfLp0JNnOurrJ/CopilotKit-Intelligence?node-id=723-78) · **Spec:** [Notion](https://app.notion.com/p/3953aa381852819ab464dae3894e7f18) ## What changed - **Header** → right-aligned icon row. On desktop it holds the **collapse** toggle (sidebar glyph); on mobile the **close** toggle. No title text, no "+ New" pill. Optional `slot="header"` preserved (empty by default; the toggle right-aligns after it). - **New Conversation** row (plus-square + label) below the header — keeps `part="new-thread-button"` + the `new-thread` event. - **Recent Conversations** heading + **funnel** filter icon → Active/All popover. Preserves `_filter` + `filter-change` and `part="filter-active"`/`filter-all"`. - **Per-row kebab menu** (⋮) holding Archive/Unarchive + Delete — preserves those events + parts. An open kebab now shields the rest of the list from hover so it reads as a single surface (see Review fixes). - **Delete confirm** is a native `<dialog>` opened with `showModal()` (browser top layer), centered over the drawer's visible box — it can't paint under other UI or drop below the fold. jsdom falls back to the `open` attribute. - **Archived rows** render italic/muted inline in the "All" view. - **Desktop collapse** → `collapsed` / `collapsible` props (default **expanded**) + a `collapse-change` event / `CollapseChangeDetail`. Collapsing sets `--cpk-drawer-reserved-width: 0` on the document root so the host grid reclaims the column with no hydration flicker. - **Unified floating cluster** (Figma "closed" mockup) = `[sidebar-toggle] [+ New Conversation]`, shown in both the mobile-closed and desktop-collapsed states. Mobile stays an off-canvas modal (backdrop / Escape / focus-trap). ## Compatibility - All existing `::part()` names and events are preserved; only **additive** parts are introduced: `collapse-toggle`, `close-toggle`, `section-heading`, `filter-toggle`, `row-menu`, `row-menu-popover`, `launcher-cluster`, `launcher`, `launcher-new-thread`, plus `confirm-dialog`/`confirm-cancel`/`confirm-delete`/`backdrop`. One additive event: `collapse-change`. - Additive wrapper props: `recentLabel` (all frameworks); `collapsible`/`collapsed` + `onCollapseChange` (React) / equivalents in Vue & Angular. - **Usage note (now in the docs):** the drawer and `<CopilotChat>` must share a chat-configuration provider so the drawer drives the chat — `CopilotChatConfigurationProvider` (React/Vue) / `provideCopilotChatConfiguration()` (Angular). The v2 `CopilotKitProvider` does not provide that context on its own. - Verified: **no example `::part()` theme changes required** — every example themes the drawer via inherited `--cpk-drawer-*` custom properties. ## Descoped / changed during development (re: earlier review) - **Client-side search was removed at the designer's request.** There is **no** search UI, `search` event, `search-toggle`/`search-input` part, or `onSearch` wrapper prop in the shipped element. Any remaining "search" mention in older comments is stale. - **Desktop collapse was briefly backed out, then re-restored** per the designer (commit `8bfd245305`). The shipped element **has** collapse (`collapsed` is a live public property — it was not removed). ## Review fixes (commit `0b4f6ca392`) Addressing @MikeRyanDev and @marthakelly: - **`core/threads.ts`** — a full-list refetch (filter-change / retry) now clears `fetchMoreError` on both `listRequested` and `listSucceeded`, so the inline "couldn't load more — retry" banner no longer survives onto a fresh list. - **Escape while confirming delete** — the host keydown handler now consumes Escape while a confirmation is open; previously the bubbled keydown fell through and closed the whole mobile drawer along with the confirmation. - **Open kebab menu shields the list** — `.list.menu-open .row:not(.menu-open)` gets `pointer-events: none`, so other rows no longer reveal their kebab / paint a host `::part(row):hover` background around or behind the open popover. Click-away dismissal is preserved via the existing document pointerdown handler. (Verified live in the langgraph-js example.) - **Docs token** — dropped the removed `--cpk-drawer-rail-width` from the web-components README. ## Testing All suites run via `nx`, green through each package's lefthook pre-commit gate: - `@copilotkit/web-components` — **92** drawer element tests + `:build` green. Covers header collapse/close toggles, New Conversation, funnel filter switch, `recentLabel`, kebab open + archive/delete routing, confirm-dialog gating + native cancel + **backdrop-click dismiss**, **Escape-while-confirming (no drawer close)**, **open-menu row shield**, collapse/cluster/column-reclaim, archived-italic, preserved parts/events, `header` slot + `label` aria-labels. - `@copilotkit/core` — **553** tests incl. the new `clears a lingering fetchMoreError when a full list refetch succeeds`. - `@copilotkit/react-core` — CopilotThreadsDrawer suite + full package **1419** green. - `@copilotkit/vue` — **32** incl. SSR + the `collapsible` boolean-prop-default regression test. - `@copilotkit/angular` — CopilotThreadsDrawer spec **35** (incl. **scoped-chat-input focus**: prefers the ancestor `copilot-chat-view` over the document-global fallback); full package **178**. ## Follow-on - Docs (screenshot + reference/guide) on the release-gated docs PR **#5780**. - Release (`web-components` + `react-core` + `vue` + `angular`, lockstep) + CLI scaffolding bump. - Example grid/theme updates ride the release in **#5828**. - **[ENT-1080](https://linear.app/copilotkit/issue/ENT-1080)** — dedup the per-wrapper `findChatInput` / open-state fallback (marthakelly #6, deliberately deferred as a cross-package refactor). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…ds updates - New prebuilt-components guide (docs/prebuilt-components/copilot-drawer.mdx) + nav registration; React drop-in, customization, Angular usage. - New React + Angular reference pages. - Threads how-to (shared snippet): recommend CopilotDrawer as the prebuilt path, frame useThreads as the headless alternative, cross-link. Release-gated: merges with/after the drawer ships (ENT-1021).
Per review: defer the Angular drawer docs. Removes the Angular reference page, the guide's Angular section, and Angular cross-links; keeps the React guide + reference + the Threads how-to callout.
…eworks - Guide: lead with the user benefit (less reference-y opening), reframe the headless useThreads alternative to stand alone, add the OpsPlatformCTA sign-up callout (per review). - Add threads.mdx (shared-snippet include) for a2a, adk, agent-spec, deepagents + register each under Intelligence Platform in meta.json.
… line Per review: remove the onUnlicensed prop, the unlicensed slot, and the unlicensed/unlicensed-cta parts from the guide + reference so neither humans nor agents surface them. Replace with a single neutral line: threads require Intelligence; a locked view shows without a license key.
Match the final component name. Renames the guide and reference pages (copilot-drawer.mdx -> copilot-threads-drawer.mdx, CopilotDrawer.mdx -> CopilotThreadsDrawer.mdx), their slugs/URLs, the nav meta entry, the data-testid default, the <copilotkit-threads-drawer> element mention, and all prose/import references. The --cpk-drawer-* CSS tokens and ::part names are unchanged.
Stand-in for a live showcase example (out of scope for this PR): a real screenshot of <CopilotThreadsDrawer> beside <CopilotChat>, rendered from the v2 react demo against the Intelligence platform. Embedded as a <Frame> preview right under the intro.
…n [ENT-1051] Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…redesign [ENT-1051] New parts, recentLabel, and search; header/kebab/funnel changes.
…ENT-1051] Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…-canvas on mobile [ENT-1051] Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… chrome) [ENT-1051] Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…1051] Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… control [ENT-1051]
…tale 'no collapse control' prose [ENT-1051]
…Provider so selection drives the chat [ENT-1051]
…larify the zero-wiring line (#5780 review) - Remove 'rename' from the prebuilt CopilotThreadsDrawer capability claims (guide, React reference, shared Threads callout) — the row kebab only does archive/unarchive + delete. Add an explicit note that rename is available via the headless useThreads path. (MikeRyanDev) - Reference CSS parts list now matches the shipped element: adds row/row-active, collapse-toggle, close-toggle, backdrop, launcher-cluster, launcher-new-thread, load-more, fetching-more, fetch-more-error, fetch-more-retry, licensed, licensed-cta; grouped by area. (MikeRyanDev) - Rewrite the 'no threadId state / no onSelect plumbing' line to stand on its own by contrasting with a hand-rolled sidebar. (samjulien)
…otThreadsDrawer on prebuilt pages (#5780 review) - /threads page title -> 'Headless Threads' to distinguish the headless useThreads path from the prebuilt drawer (slug kept, so no inbound links break; sidebar label follows the frontmatter title). (samjulien #9) - prebuilt-components index: the 'saved conversations' line now leads with the drop-in CopilotThreadsDrawer and offers Headless Threads as the DIY path, plus a companion-sidebar mention in 'Pick a surface' — the drawer was absent from the prebuilt landing page. - chat page: same, point at the prebuilt drawer first, headless second.
0ec526d to
af10862
Compare
Dismissing on the author's behalf: the requested changes are addressed (rename documented as headless-only, CSS parts list completed, upsell wording softened to a neutral locked-view line, sign-up CTA + screenshot + Basic-setup example added, and /threads retitled to 'Headless Threads'). @samjulien is out today and delegated this review to @MikeRyanDev, who has approved. Open naming/IA discussion can continue separately.
There was a problem hiding this comment.
Is this the default or a headless implementation? This doesn't seem to be using our default components.
There was a problem hiding this comment.
Hm, it would be the new default thread drawer. But I didn't really consider the other components. I can have it regenerated.
There was a problem hiding this comment.
Yeah, lets just have the default drawer and default chat for consistency
review) The prior preview paired the real <copilotkit-threads-drawer> with a hand-coded mock chat panel (from the screenshot harness), so the chat half wasn't an actual CopilotKit component — which is what the reviewer flagged. Re-captured with the real default <CopilotThreadsDrawer> + <CopilotChat> together, stock (untheme d) light styling, showing a thread's replayed conversation.
3efa375
Documents the new CopilotDrawer prebuilt threads drawer (component PR #5746).
Changes
docs/prebuilt-components/copilot-drawer.mdx(new) + registered inprebuilt-components/meta.json. React drop-in (<CopilotDrawer />beside<CopilotChat />, zero active-thread wiring), props table, customization (slots /::parts /--cpk-drawer-*tokens), Angular usage, license.snippets/shared/threads/threads.mdx(shared → propagates to ~10 integration threads pages +/threads): a callout recommendingCopilotDraweras the prebuilt path and framing theuseThreadssteps as the headless alternative (kept, not removed) + Next-steps cross-links.reference/components/CopilotDrawer.mdx(React) andreference/angular/components/CopilotDrawer.mdx(Angular), hand-authored with<PropertyReference>.Validation
npm run buildinshowcase/shell-docsis green locally — compiled successfully, 215/215 static pages generated, no MDX errors. All internal links verified to resolve onmain.Why draft / release-gated
Merges with or after the drawer release (
@copilotkit/web-componentspublished +react-core/@copilotkit/angular> 1.61.2 containingCopilotDrawer). Until then the documented imports don't exist in a published package.Follow-ups (out of scope)
<InlineDemo>of the drawer (needs a demo-registry entry) — uses plain code blocks for now.injectThreads/CopilotChatConfigurationreference pages (named without links here; they don't exist onmainyet).Spec: https://app.notion.com/p/38f3aa381852814e8884e3153d3d4688 · Tracking: ENT-1021
🤖 Generated with Claude Code