Repository navigation
Conversation
size-limit report 📦
|
Session Replay Browser E2E ResultsDetails
Flaky testschromium › e2e/set-session-id.spec.ts › setSessionId no-op (SR2-3635) › session id change still restarts recording |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 2d02b62. Configure here.
| const suppressName = | ||
| description.source === 'value' || | ||
| (description.source === 'text' && | ||
| !!target.closest('input,textarea,select,[contenteditable]:not([contenteditable="false"])')); |
There was a problem hiding this comment.
Editable names leak across shadow
Medium Severity
Name suppression for editable content uses closest(), which stops at shadow roots, while blocked-target detection already walks composedPath(). A focused node inside an open shadow tree can still contribute its accessible name when a contenteditable ancestor sits outside that tree, so editor chips or other web components can leak user-authored text into amp-semantic/keys events.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2d02b62. Configure here.


Summary
amp-semantic/keysfor navigation keys and Ctrl/Meta K, P, and F shortcuts only.Stack
Base: #2153. Merge after #2128 and #2150–#2153.
Validation
pnpm --filter @amplitude/amp-semantic... buildpnpm --filter @amplitude/session-replay-browser... buildpnpm --filter @amplitude/amp-semantic test: 140 passed, 100% coveragepnpm --filter @amplitude/session-replay-browser test: 1,183 passed, 100% coveragepnpm --filter @amplitude/amp-semantic test:playwright: 12 passedpnpm lint,pnpm lint:deps,pnpm test:examplesThe full workspace build stalls in the unchanged Segment Session Replay Rollup step, and the full workspace test run has two existing
analytics-react-nativefailures, as documented in earlier stack drafts.Linear: SRAI-81.
Note
Medium Risk
New document-level keydown capture with explicit privacy filters, but keyboard instrumentation still needs careful review so no typed content or sensitive target names leak.
Overview
Adds a new
amp-semantic/keyssemantic family and wires it into default capture with a 1,000 events/session cap andfamilies: { keys: false }opt-out.The new recorder listens on
keydownbut only emits allowlisted navigation keys (Escape, Enter, Tab, arrows, Home/End, Page Up/Down, F1–F12) and Ctrl/Meta shortcuts for K, P, and F. It skips ordinary typing, repeats, IME/composition, and sensitive targets (password/hidden fields, blocked hosts, masked names from editable content). Each event carries the key combo plus a privacy-safe target (rrweb id, role, accessible name source, states).Schema, types, README, the local semantic playground, unit tests, and a Playwright replay test (Escape on a focused button) cover the new tag and validation.
Reviewed by Cursor Bugbot for commit 2d02b62. Bugbot is set up for automated code reviews on this repo. Configure here.