Repository navigation
feat(learning): name clicked controls with a privacy-safe label (refs PE-712) - #7769
Conversation
…fs PE-712) The package was at 8127 of 8192 B before this change, and the click label rules add about 1.6 KiB.
… PE-712) Click events now carry target.label, the name Automatic Learning shows the model, instead of only the tag. It is taken from developer-written sources only (aria-labelledby, aria-label, caption/alt, title on controls, own text of real controls), and skips editable content, cards and rows, and suggestions. Emails, URLs and tokens are replaced; raw text, attributes and values are unchanged.
Production Digest-Pinning AuditAll 43 services digest-pinned. Run 2026-10-12 08:34:43 PDT — 0 finding(s). |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No confirmed issue blocks merging. Redaction of short normalized values remains an open question. Pre-merge checks |
|
@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: 0 B Total Size: 1.8 MB ℹ️ View Unchanged
|
tylerslaton
left a comment
There was a problem hiding this comment.
Reviewed together with CopilotKit/Intelligence#1824. Requesting changes for one reproduced privacy issue: autocomplete suggestion text can bypass the exclusion through aria-labelledby and reach Automatic Learning as target.label.
Standards: no actionable findings. Spec: one P1 finding against PE-712's requirement to keep typed input out of the model.
Validation: the existing 273 learning tests pass. A focused regression case using a combobox-controlled option labelled by its own text fails because the private-query canary appears in target.label. The companion renderer's allowlist/test is sound; the producer must enforce this boundary.
…ledby or title (refs PE-712) Suggestions and aria-labelledby references into suggestion lists now yield no label from any source.
tylerslaton
left a comment
There was a problem hiding this comment.
Re-reviewed 6c96513. The P1 is fixed: autocomplete suggestions and nested targets are excluded before any label source is read, and external aria-labelledby references into suggestion lists are rejected. No remaining actionable standards or spec findings in the follow-up delta.
Validation: all 279 learning tests and check-types pass. Independently checked the original reproduction, title/aria-label, nested controls/icons, external references, and ordinary listbox behavior. Some CI jobs were still running at review time; no failures observed.
…#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?
Automatic Learning reads Trajectory clicks as
click tag=button route=/, so "Switch to dark mode", "Copy Code" and a suggestion chip all look the same to the model. Click events now carrytarget.label, a short name of the clicked control. Intelligence already renders it.The label comes only from text a developer wrote, never from what a user typed or created:
aria-labelledby,aria-label, the caption oraltof inputs and images,titleon controls, and the visible text of real controls (button,a[href],summary, control roles).aria-labelledby,aria-labelandtitle, and references into a suggestion list resolve to nothing. Native checkbox<label>text and slotted web component text are not read.[url], emails[email], tokens[redacted], and remembered passwords are scrubbed. Invisible characters are stripped.text, attributes and values are unchanged. Input events get no label.data-copilotkit-actionstill names a control explicitly, anddata-copilotkit-ignoreor deletinglabelinbeforeSendremoves it.The size budget goes from 8 to 10 KiB. The package was at 8127 of 8192 B, and the label rules add about 1.6 KiB.
Related PRs and Issues
Testing
nx run @copilotkit/learning:testpasses (279 tests, 61 new ones covering each source, the privacy cases and the cleaning rules).trajectory-phoenix.test.tsin@copilotkit/coreasserts the exact click target, so it now expects the label too. The other packages the commit hook runs tests for pass.check-types,build,size(9759 B of 10240 B), oxlint and oxfmt pass.Invite [email]and[url].demos/trajectory-captureapp built from this branch. Stored clicks carrySwitch to dark mode,Copy Code,Conference travel · $480andApprove; textarea clicks have no label. The rendered session for Learning showsclick label="Switch to dark mode" tag=button route=/ordersinstead ofclick tag=button route=/orders, andfind-insightson that session returned "The user switched to dark mode immediately after reaching the orders page". A canary typed into the review note (with an email) appears only in raw input data, never in a label, the rendered session or the Insights.Checklist
!(for examplefeat(react-core)!: ...) and the description has aBREAKING CHANGE:line with migration steps. See VERSIONING.mdSummary by CodeRabbit