Replace tabs registry with compact device snapshots#331
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6dfaeb1c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| this.sendError(ws, { | ||
| code: 'INVALID_MESSAGE', | ||
| message: `WebSocket message exceeds ${this.config.maxRegularWsMessageBytes} bytes`, | ||
| }) | ||
| return |
There was a problem hiding this comment.
Close oversized WS senders instead of only returning an error
When a message exceeds maxRegularWsMessageBytes, this branch sends INVALID_MESSAGE and returns without closing the socket, so a client can keep the connection open and repeatedly stream oversized frames. Because this check runs before authentication enforcement in the handler, unauthenticated peers can also consume server work until the hello timeout window expires. Restoring a close (for example code 1009) after this error would prevent repeated abuse and match the previous oversized-message containment behavior.
Useful? React with 👍 / 👎.
Summary
Testing
FRESHELL_TEST_SUMMARY="land tabs registry compact state on dev" npm run checkRestart note
The tabs-registry storage migration commits compact state before archiving the legacy JSONL file. Existing browser tabs running the old bundle will need a page refresh after the new server starts because the WebSocket protocol version changed.