This exposes additional rrweb session replay options in the settings menu#4308
This exposes additional rrweb session replay options in the settings menu#4308JacobSussan wants to merge 3 commits into
Conversation
|
@JacobSussan is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR exposes three new rrweb session-replay capabilities — canvas recording, a
Confidence Score: 5/5Safe to merge; all previously raised concerns have been resolved and the new features are properly opt-in with safe defaults. Canvas recording defaults to off, the lax mask level keeps rrweb's built-in password masking intact, console capture restores original console methods on stop, and input validation is consistent across the Zod schema, recorder.ts, and the client-side script. The only remaining gap is a hardcoded 'entries' string that doesn't affect runtime correctness. No files require special attention; the one i18n nit in ReplayPlayback.tsx is cosmetic. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Browser (recorder/index.js)
participant API as /api/websites/:id/recorder
participant DB as Website Config (DB)
participant Player as ReplayPlayer / ReplayPlayback
Browser->>API: GET recorder config
API->>DB: fetch website.config
DB-->>API: "{ maskLevel, consoleLevel, recordCanvas, canvasFps, canvasQuality, ... }"
API-->>Browser: config (with ?? defaults)
Note over Browser: beginReplayCapture()
Browser->>Browser: "record({ ...getMaskConfig(maskLevel), recordCanvas, sampling.canvas })"
Browser->>Browser: startConsoleCapture(consoleLevel) → patch window.console methods
loop Per console call
Browser->>Browser: serialize args → record.addCustomEvent("umami.console", payload)
end
Browser->>API: POST /replays (flush events incl. custom console events)
Note over Player: Viewing replay
Player->>Player: ReplayPlayer renders rrweb events (UNSAFE_replayCanvas: true)
Player->>Player: "ReplayConsoleLogs filters events by tag="umami.console""
Player->>Player: Display log level + offset + message
Reviews (2): Last reviewed commit: "address review feedback" | Re-trigger Greptile |
|
will change 'none' to 'lax', still block passwords, & default canvas recording to disabled. |
Please let me know if there are any other issues you'd like me to address. |
|
@greptile review again |
Changes include:
nonemask level optionrrweb already supports these capabilities; this PR makes them configurable through the settings UI.
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.