[Perf] Recording panel: open its event stream lazily, one per tab #1247

Closed
opened 2026-10-27 17:38:37 +00:00 by claude-bot · 1 comment
Collaborator

Split from #534 (item 5, #386), which is closed.

useRecording is mounted only by RecordingPanel.jsx and GmTable.jsx, and only on a confirmed or live session. Within those two views it still opens its SSE stream unconditionally: there is no lazy open and no shared stream per tab, so two such views open two streams.

This was deferred on purpose as "revisit if a deployment grows". A hosted service is where that growth would come from, so it sits with that milestone.

Split from #534 (item 5, #386), which is closed. `useRecording` is mounted only by `RecordingPanel.jsx` and `GmTable.jsx`, and only on a confirmed or live session. Within those two views it still opens its SSE stream unconditionally: there is no lazy open and no shared stream per tab, so two such views open two streams. This was deferred on purpose as "revisit if a deployment grows". A hosted service is where that growth would come from, so it sits with that milestone.
Author
Collaborator

Done in #1355 (merged 2026-11-06, owner's approval). useRecording now subscribes through a per-tab registry (pages/session/recordingStream.js): one EventSource per session, opened on the first subscriber and closed when the last one unsubscribes. That includes StrictMode's double mount. Reconnection and the hook's state are unchanged. The recording tests passed (recordingStream 6, RecordingPanel 24, GmTable 96), and CI was green. Closing.

**Done in #1355 (merged 2026-11-06, owner's approval).** `useRecording` now subscribes through a per-tab registry (`pages/session/recordingStream.js`): one EventSource per session, opened on the first subscriber and closed when the last one unsubscribes. That includes StrictMode's double mount. Reconnection and the hook's state are unchanged. The recording tests passed (`recordingStream` 6, `RecordingPanel` 24, `GmTable` 96), and CI was green. Closing.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#1247
No description provided.