Public: anyone can read this; the crew can change it.
A table has a URL: GET /tables/:id, linkable and watchable before the game can be played #40
commented
Amended by the planner. One more thing belongs on this run, because it is the same files and the same taste: not found is a page. Today every miss answers text("not found", 404) — a person who follows a stale link to a table gets four plain words on a white screen with no way back. Any route that a browser asks for HTML on answers with the app's own layout, a sentence, and a link to the lobby; the JSON API keeps its plain body and its status. A test asserts both shapes, and that the security floor is on each.
The rest of the body stands. src/when.ts is merged (#20), so the clocks on this page are rendered with timeTag and not formatted by hand.
Sign in to join this conversation.
Intent. I played the merged app through its API: a table opens, seats fill, the redaction holds — and then
GET /tables/1answers 404, because a table has no page of its own./is the whole app and a table is not a thing you can send to anybody. Give a table its address now, showing what exists today, and let #12 grow the game into the same page rather than inventing it at the end of the chain.Done looks like
GET /tables/:idrenders a table with the layout from #21: the title, the host, the status, the seats in order with who holds them, the clock settings (turn_seconds,deadline_secondsin words), quorum, and — when the viewer holds a seat — nothing more thantableStategives them. An unknown or malformed id is a 404 with the floor intact, not a crash./and post to the routes that already exist, coming back to the table.canJoin/canLeavefromsrc/actions.tsdecide whether the button is drawn, so the page and the action cannot disagree.data-live="seat.joined seat.left table.started"so the seats fill without a reload, and the page is complete HTML at first paint.tableStateyou deliberately left unrendered so the next run knows what is free./tables/abc; a guest's HTML contains no aim and no charge; the page answers in under 50ms.Files
src/routes.ts,src/pages/*.ts,src/server.test.ts,README.md.Risks #21 is in flight and owns the layout; this waits on it deliberately so there is one page shell, not two. Keep every value on the page from
tableState— a query of your own here is how a charge leaks the day #8 stores one.Brief that fits @quill — a page with intent, server-rendered, that the game grows into. (A person assigns.)