Skip to content

feat(amp-semantic): capture clicks, fields, and form submissions - #2153

Draft
jxiwang wants to merge 4 commits into
codex/semantic-recordingfrom
codex/semantic-interaction-events
Draft

jxiwang wants to merge 4 commits into
codex/semantic-recordingfrom
codex/semantic-interaction-events

Conversation

@jxiwang

@jxiwang jxiwang commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add amp-semantic/click, amp-semantic/field, and amp-semantic/submit with accessible target descriptions, privacy-aware field values, validity, and stable rrweb node IDs.
  • Reuse Session Replay’s rrweb native mouse interaction hook with the existing heatmap click handler, including selector caching for the same click. Keep the DOM click fallback for hosts without the native hook.
  • Extend the schema, local inspector, browser tests, and package documentation. Supersedes the interaction portion of the older draft feat(amp-semantic): add package contracts and interaction capture #2079.

Stack

Base: #2152. Merge after #2128, #2150, #2151, and #2152.

Validation

  • pnpm --filter @amplitude/amp-semantic... build
  • pnpm --filter @amplitude/session-replay-browser... build
  • pnpm --filter @amplitude/amp-semantic test: 134 passed, 100% coverage
  • pnpm --filter @amplitude/session-replay-browser test: 1,183 passed, 100% coverage
  • pnpm --filter @amplitude/amp-semantic test:playwright: 11 passed
  • pnpm lint, pnpm lint:deps, pnpm test:examples

The full workspace build stalls in the unchanged Segment Session Replay Rollup step, and the full workspace test run has two existing analytics-react-native failures. These are tracked on the earlier stack drafts.

Linear: SRAI-57, SRAI-59, SRAI-60.

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
packages/analytics-browser/lib/scripts/amplitude-min.js.gz 68.41 KB (0%)
packages/session-replay-browser/lib/scripts/session-replay-browser-min.js.gz 141.27 KB (+0.32% 🔺)
packages/unified/lib/scripts/amplitude-min.umd.js.gz 227.79 KB (+0.22% 🔺)
@amplitude/element-selector (gzipped esm) 3.48 KB (0%)
@amplitude/analytics-browser/lite (gzipped CDN bundle) 21.34 KB (0%)

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Session Replay Browser E2E Results

passed  158 passed
flaky  1 flaky

Details

stats  159 tests across 18 suites
duration  4 minutes, 32 seconds
commit  9ea8ba4

Flaky tests

chromium › e2e/shadow-dom.spec.ts › captureAdoptedStyleSheets option › SDK initializes without error and captures shadow host with captureAdoptedStyleSheets=false

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant