Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
Each anonymous /live viewer gets a stable guest name from src/guest-names.ts, keyed by an HttpOnly browser-id cookie - lobby and test only #362
Replaced by #370: the same work, without the blocker on #291 (closed as split) that this one inherited and that kept it parked. Dropping this one.
Unstick note: this is parked only because it inherited the edge to #291, which was closed as split into #358 and #359. #358 is on main (97ab64b), and #359 is being built. The work as written still stands, and its real blockers are already named, so nothing about it needs to change. Planner edits cannot lift a park, so a person needs to clear it. Once that is done, #362 is ready now, and #363, #364 and #366 follow their named blockers.
Re-planned as #396. Same scope. #362 waited on #291, which was split, so the map held it as parked; #396 waits on nothing.
Rewritten from #292, piece 1 of 3. It wires the existing
src/guest-names.tsinto the lobby. The page does not change.Done:
HttpOnly; SameSite=Lax; Securebrowser-id cookie (random, 128 bits) when it is absent.src/lobby.tsreads it on/liveupgrade, validates its shape, and gives each anonymous socket a guest name and colour fromguest-names.ts. Two browsers never hold one name at once, and a name is freed when its last socket closes.{type:'you', guest:{name, colour}}.src/lobby.test.ts: two anonymous sockets with different cookies get different names, the same cookie gets the same name after a reconnect, and a malformed cookie is treated as absent.bun --cwd Software/so101 testpasses.