Repository navigation
Conversation
…context-visibility-events
# Conflicts: # packages/amp-semantic/README.md # packages/amp-semantic/package.json
# Conflicts: # packages/amp-semantic/README.md # packages/amp-semantic/e2e/replay.spec.ts # packages/amp-semantic/schema.json # packages/amp-semantic/src/index.ts # packages/amp-semantic/src/types.ts # packages/amp-semantic/test/schema.test.ts # packages/session-replay-browser/src/semantic-types.ts # test-server/session-replay-browser/sr-semantic-test.html # test-server/session-replay-browser/sr-semantic-test.js
cely404
reviewed
Nov 19, 2026
cely404
reviewed
Nov 19, 2026
cely404
reviewed
Nov 19, 2026
cely404
approved these changes
Nov 19, 2026
# Conflicts: # packages/session-replay-browser/src/session-replay.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ac2a6d7. Configure here.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Captures compact
amp-semantic/recordingstart, stop, and resume boundaries from Session Replay lifecycle decisions. Start/resume follows the first accepted full snapshot. Terminal stop is emitted before rrweb teardown, including customer stop and opt-out paths. The family contract also supports pause for future SDK use.Stacked on #2151. This is the clean replacement for the recording portion of older draft #2080, using the current injected capture runtime.
Validation
pnpm install --frozen-lockfile— passedpnpm lint,pnpm lint:deps,pnpm test:examples— passedpnpm buildon the parent stack stalled in unchanged Segment Session Replay Rollup. Full workspacepnpm teston the parent stack failed in unchangedanalytics-react-nativetests. This draft remains open pending green workspace gates.Note
Medium Risk
Changes session-boundary teardown, re-init, and event-compressor ordering paths where mis-ordering could corrupt replay sequences; behavior is heavily covered by new unit and Playwright tests.
Overview
Adds
amp-semantic/recordingas a default semantic family: the host supplies start/stop/pause/resume plus a reason, and the recorder only stamps identity and transports the event (new schema branch andfamilies.recordingdisable switch).Session Replay drives those signals:
ReplaySemanticAdapteremits start/resume on the first accepted full snapshot and a terminal boundary before rrweb teardown;session-replay.tsthreads reason codes through customer stop, opt-out, sampling/targeting gates, recorder restart, new session, re-init, and errors. Session changes and re-init now close the old recorder with a semantic stop, flush the compressor, then send—so closing boundaries are not lost behind idle/worker queues.EventCompressor.enqueueEventgainsforceSyncfor recording custom events: it drains pending worker/idle work, ignores stale worker replies, and writes boundaries in order. Terminal recording events are exempt from the emit guard that would otherwise drop events during stop.Reviewed by Cursor Bugbot for commit 465f941. Bugbot is set up for automated code reviews on this repo. Configure here.