Repository navigation
Conversation
…context-visibility-events
This was referenced Nov 4, 2026
size-limit report 📦
|
Session Replay Browser E2E ResultsDetails
Flaky testschromium › e2e/shadow-dom.spec.ts › captureAdoptedStyleSheets option › SDK initializes without error and captures shadow host with default (true) |
# Conflicts: # packages/amp-semantic/README.md # packages/amp-semantic/package.json
…visibility-recorder
jxiwang
marked this pull request as ready for review
November 10, 2026 17:15
Collaborator
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5b99f6f. Configure here.
Contributor
…lity-recorder # Conflicts: # packages/amp-semantic/README.md # packages/amp-semantic/e2e/replay.spec.ts # packages/session-replay-browser/test/config/joined-config.test.ts # test-server/session-replay-browser/sr-semantic-test.html # test-server/session-replay-browser/sr-semantic-test.js
This was referenced Nov 11, 2026
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
Add
amp-semantic/visibilityto the established capture runtime and Session Replay integration. The recorder emits deduplicated hidden/visible transitions, includes runtime-provided version and identity, and removes its listener on stop. Focus/blur alone do not emit events; context already supplies the initial visibility state.Include the visibility payload/schema, default registration and budget, listener cleanup tests, playground description, and Chromium tests of visibility delivery and timestamp ordering. Native tab scheduling remains browser-dependent; browser tests use deterministic visibility notifications.
Capture uses the locally supplied
semanticCapture.createCapture: createSemanticCapturecallback introduced in #2127. The base Session Replay SDK has no production dependency on amp-semantic. Adding visibility leaves the base Session Replay bundle at 142.78 kB gzip within its limit.Stack
Base: #2127 (
codex/semantic-replay-integration). Merge runtime, context, and Session Replay integration first, then retarget this PR to main.Validation
Node 24: install, full workspace build, docs, lint, dependency checks, typecheck, and tests across all 32 workspace projects passed. Seven Chromium transport tests and existing bundle-size limits passed. Session Replay is 142.78 kB gzip and unified is about 231 kB gzip; source maps contain no amp-semantic modules. Semantic and affected Session Replay packages retain 100% coverage.
Existing blocker retained with prior maintainer approval:
pnpm test:examplescannot start becausejest.setup.examples.jsis absent on main.Note
Low Risk
Additive recorder and schema behind existing opt-in semantic capture; changes are covered by unit, schema, and Playwright tests with no auth or sensitive data handling changes.
Overview
Adds a
visibilitysemantic event family alongside context, wired throughcreateSemanticCapturedefaults, schema, and Session Replay transport.The new
visibilityRecorderlistens for deduplicateddocument.visibilitychangetransitions (hidden/visible), ignores focus/blur-only signals, tears down on stop, and emits runtime-stampedamp-semantic/visibilitycustom events with the same per-session budget as context.defaultRecorders,SEMANTIC_CAPS, and payload types now include visibility;schema.jsonvalidates the new tag and tracks visibility incaps_hit.Playwright replay tests, unit tests, the local semantic harness, README, and joined-config coverage are updated so both families can be gated remotely/locally and visibility shows up in end-to-end delivery checks.
Reviewed by Cursor Bugbot for commit 823c6a8. Bugbot is set up for automated code reviews on this repo. Configure here.