Summary
Both route layers default the branch with nullish coalescing (req.getQuery('branch') ?? 'main' — src/server.js:41 and the api layer in v0.7.0). Under uWS a present but empty branch= query yields '', not undefined — so the request creates and serves a room whose branch is the empty string, silently splitting its live stream and persisted snapshots away from main. From the user's perspective the document "loses" content depending on which URL variant a client built.
Suggested fix
- const branch = req.getQuery('branch') ?? 'main'
+ const branch = req.getQuery('branch') || 'main'
Both an absent and an empty branch mean "the default branch"; an empty-string branch is never a meaningful namespace. (Our clients all send branch=main explicitly as a workaround, but any direct API caller can still hit this.)
Summary
Both route layers default the branch with nullish coalescing (
req.getQuery('branch') ?? 'main'— src/server.js:41 and the api layer in v0.7.0). Under uWS a present but emptybranch=query yields'', not undefined — so the request creates and serves a room whose branch is the empty string, silently splitting its live stream and persisted snapshots away frommain. From the user's perspective the document "loses" content depending on which URL variant a client built.Suggested fix
Both an absent and an empty branch mean "the default branch"; an empty-string branch is never a meaningful namespace. (Our clients all send
branch=mainexplicitly as a workaround, but any direct API caller can still hit this.)