feat(csr): add worker self-hosting helpers - #432
Open
nicklasl wants to merge 6 commits into
Open
Conversation
- Add `workerUrl` to `InitSessionRecorderOptions`, plumbed to `createUploader`. - Export `workerScript` from `@spotify-confidence/session-recording/worker` so customers can serve it at a same-origin route. - Emit `dist/confidence-worker.js` as a standalone file in the npm package that can be copied directly to static assets. - Add CSP section to README with required directives, three hosting options (copy, build-tool, serve-from-route), and troubleshooting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
csr-common now emits dist/confidence-worker.js as a first-class build artifact. session-recording copies it instead of extracting the worker string from source. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
nicklasl
requested review from
AHB,
Billlynch,
andreas-karlsson,
fabriziodemaria,
mfranberg,
sam-cook and
vahidlazio
as code owners
August 17, 2026 13:02
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
confidence-copy-workercommand with stale-copy checkingThis is stacked on #412 and should be reviewed after it.
Validation
yarn install --immutableyarn build:csryarn test:csr(140 tests)yarn workspace @spotify-confidence/session-recording typecheck