Feat 83 recording (socket profiler recording & replay) - #200
Draft
theultimatewasteofspace wants to merge 145 commits into
Draft
Feat 83 recording (socket profiler recording & replay)#200theultimatewasteofspace wants to merge 145 commits into
theultimatewasteofspace wants to merge 145 commits into
Conversation
- Add userId column to trace table (nullable FK to user) - Refactor recorder to use server-wide activeRecordingId flag - Attach/detach trace listeners on every connected user's socket - New mid-recording connections auto-attach listeners on init - Each trace tagged with the userId that emitted it - Add recordingGetTraces endpoint for edit modal
…cator - Add userId to trace table for per-user event tagging - Refactor recorder to server-wide capture across all connected sockets - Add participantUserIds filter on recording (null = everyone) - Start Recording modal with user picker and online status - Edit Recording modal with trace pruning - Discard Recording button in save modal - New endpoints: recordingGetTraces, recordingGetOnlineUsers
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
- Server.recoverInterruptedRecordings() runs on startup to mark stale 'recording' rows as 'interrupted' after a server restart, freeing the Start Recording button - RecordingModal confirm() now waits for rename + trace deletions before closing modal and reporting success
Each socket connection now writes a distinct socketId on every trace, so admin's two tabs are recorded as two separate streams instead of being collapsed into one merged userId stream. Foundation for per-session replay. - Migration: collapsed three trace migrations into one create-trace with userId + socketId from the start - Model: added socketId field - Recorder: writes socket.id on every trace
- Pre-select admin inside the getOnlineUsers callback so userTable is stable when we resolve the row, fixing 'Record 2 User(s)' when only admin was checked - getOnlineUsers now returns per-user session count, exposed as Sessions column in the start-recording table
groupTracesBySocket replaces groupTracesByUser. Each session (socket connection) becomes one replay client, so admin's two recorded tabs replay as two parallel clients instead of one merged stream. Falls back to per-user grouping for legacy recordings without socketId.
dennis-zyska
requested changes
Jul 29, 2026
dennis-zyska
left a comment
Collaborator
There was a problem hiding this comment.
I did not reviewed all files yet, but already made some suggestions for improvement. Please have a look.
added 15 commits
August 2, 2026 23:23
dennis-zyska
requested changes
Aug 7, 2026
added 10 commits
August 8, 2026 02:15
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
(OUTDATED)
Implements Issue #83 — Socket Profiler recording & replay tool for stress-testing CARE.
What's included
Recording side
recordingandtracetables with full lifecycle (start → recording → finished/interrupted → soft-deleted)interruptedon next bootReplay side
success: truewithin 2s (will adjust later)UI
Architectural decisions
publicTable: trueon Recording model: needed so non-admin participants get the recording row in their store and the topbar icon can render.Known issues or observations
Roadmap (out of scope for this PR)
Migration & merge notes
dev(53 commits behind at last sync). The merge was clean at the file level except for.gitignoreandpackage-lock.json, both auto-resolved.restructure-nav_groupmigration relocated nav elements but didn't touch Socket Profiler since it lived on this branch. A small follow-up migration (20260506220447-move-socket-profiler-to-manage) moves Socket Profiler into the Manage group.Testing
End-to-end manual testing covered:
Closes #83