Skip to content

feat: witness first event broadcast page context#260

Merged
ab116699 merged 4 commits intomasterfrom
ab/feat/export-page-context-in-witness-v2
Feb 13, 2026
Merged

feat: witness first event broadcast page context#260
ab116699 merged 4 commits intomasterfrom
ab/feat/export-page-context-in-witness-v2

Conversation

@ab116699
Copy link
Contributor

Why this change?

Add support for sending pageContext data with witness events. This enables the SDK to capture and send page context information (URL, referrer, semantic content) to the backend for future processing.

The backend currently accepts but ignores this field for forward compatibility - this allows SDK releases to happen independently of backend releases.

What is changed?

  • Renamed context to pageContext in witness payload for consistency across SDK and backend
  • Added test to verify pageContext is sent on first witness call and omitted on subsequent calls
  • 100% test coverage on witness.ts

How to test the changes?

pnpm test

Specific test: witness with pageContext sends context on first call only

Dependency changes?

  • Yes
  • No

@ab116699 ab116699 changed the title feat: test witness first event broadcast page context feat: witness first event broadcast page context Feb 10, 2026
@ab116699 ab116699 merged commit 9ea0a57 into master Feb 13, 2026
7 checks passed
@ab116699 ab116699 deleted the ab/feat/export-page-context-in-witness-v2 branch February 13, 2026 15:00
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.

3 participants