Repository navigation
feat(react-core)!: start Trajectory capture for every learning object - #7747
Conversation
An object passed to `learning` without `trajectoryId`, such as
`learning={{ onError }}`, only configured capture and waited for a manual
`startTrajectory()`. Switching from `learning` to an object to add one
option therefore stopped recording without any error.
Every enabled `learning` value now starts capture after mount. Without
`trajectoryId` the provider generates the ID; it stays the same across
rerenders, reconnects and option changes. `autoStart: false` keeps the
manual start, and `autoStart` is not passed to Core.
BREAKING CHANGE: a `learning` object without `trajectoryId` now starts capture after mount.
To keep starting capture yourself with `startTrajectory()`, add `autoStart: false`,
for example `learning={{ onError, autoStart: false }}`.
Refs PE-674
…ual start Refs PE-674
Production Digest-Pinning AuditAll 43 services digest-pinned. Run 2026-10-09 05:23:42 PDT — 0 finding(s). |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe provider now supports automatic or manual learning capture. It generates and retains trajectory IDs under the documented conditions, and ignores a prop-level ID in manual mode. Tests and documentation cover configuration and trajectory transitions. ChangesLearning capture startup and trajectory IDs
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete issue remains that would block merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-telegram
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/mcp-apps-renderer
@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: |
|
Size Change: +571 B (+0.03%) Total Size: 1.79 MB 📦 View Changed
ℹ️ View Unchanged
|
Capitalize the #7754 note and drop the duplicated #7747 migration text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#7949) ## What does this PR do? Puts `@copilotkit/learning` back in the `monorepo` release scope, so it ships with everything else and Core always uses the matching Learning version. **Why:** Learning had its own release lane. It shipped once (`0.0.1`, Oct 2) and was never cut again. Core declared it as `workspace:^`, so `@copilotkit/[email protected]` on npm depends on `@copilotkit/learning@^0.0.1`. That version is missing everything Learning has gained since, including privacy-safe click labels (#7769), debounced text edits and retired capture sockets (#7692), and the Trajectory changes in #7645, #7698, and #7747. **Changes:** - `release.config.json`: adds `@copilotkit/learning` to `monorepo` and removes the `learning` scope. Learning moves from `0.0.1` to the monorepo version (`1.79.1`, then `1.80.0` at the next release). - `packages/core`: depends on Learning via `workspace:*`, like `@copilotkit/shared`, so it's pinned to the exact same-release version. - Removes the `learning-preview` canary composition (`scripts/release/lib/learning-preview.ts`), the separate `packages/learning/CHANGELOG.md`, and the `learning` / `learning-preview` dropdown options in the canary, publish, and create-pr workflows. A normal `monorepo` canary now includes Learning. - Updates the release tests and regenerates the public API manifest. ## Verification - `npx vitest run --config scripts/release/vitest.config.mts`: 19 files, 258 tests pass - `verify-release-scope-dropdowns.sh`, `verify:cross-scope-pins`, and `check:public-api-manifest` all OK - `prepare-release.ts --scope monorepo --bump minor --dry-run` lists 18 packages, including `@copilotkit/learning: 1.79.1 -> 1.80.0` ## Follow-up Open release PR #7948 was cut before this change and doesn't bump Learning. After this merges, close #7948 and re-run **release / create-pr** (`monorepo`, `minor`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Release Changes** * The Learning package now shares the monorepo’s version and release cycle rather than having an independent release scope. * The Learning package version is aligned with the monorepo release version. * Learning and Learning Preview are no longer separate choices in release and canary workflows; the remaining configured scopes and the `all` option remain available. * Canary releases now accept non-main branches only. * Release packages are processed in dependency order. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What does this PR do?
learning={{ ... }}withouttrajectoryId, for examplelearning={{ onError }}, only configured Trajectory capture and waited for a manualstartTrajectory(). Adding one option to<CopilotKitProvider learning>therefore stopped recording without any error.Now
learningis one switch: every enabled value starts capture after mount.learning/learning={true}learning={{ onError }}(notrajectoryId)startTrajectory())learning={{ trajectoryId }}learning={{ autoStart: false }}startTrajectory()(the old{}behavior)learning={false}/ omittedtrue→{ onError }. Turning capture off,autoStart: falseor a suppliedtrajectoryIdends it; the next generated Trajectory gets a new ID.autoStartis provider-only and is not passed to Core.autoStart: falsetogether withtrajectoryIddoes not start and warns once.packages/learning/README.mdandintelligence/capture-interactions(main example now relies on the generated ID; the manual-start section usesautoStart: false).BREAKING CHANGE: a
learningobject withouttrajectoryIdnow starts capture after mount.To keep starting capture yourself with
startTrajectory(), addautoStart: false, for examplelearning={{ onError, autoStart: false }}.Related PRs and Issues
Checklist
!and the description has aBREAKING CHANGE:line with migration stepsSummary by CodeRabbit
autoStart: falseto start capture manually. Manual starts can use a supplied ID or generate one automatically.copilotkit.trajectoryId.