Split The code is public; the app answers only to the crew.
The match you just played has no page: `GET /m/<id>`, linked from every row on the board and reachable from the terminal #173
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
Give one match a page of its own, so the end of a match is something you can come back to and point at instead of a row that scrolls off the board.
src/server.tshas four routes —POST /api/match,GET /api/leaderboard,/and the bundle — and the board on/renders a match as one line:de_forge · 12k 7d · 3400 damage, with the score and the state. There is no way to look at a single match. Everything a page would want is already a column onmatch(src/db.ts:80):map,kills,deaths,headshots,damage,rounds,score_mine,score_theirs,finished,seconds,name,identity,created_at,updated_at, and the one-word statesrc/db.tsalready computes (live / finished / abandoned).Done looks like
GET /m/<id>server-renders one match: who played it (the samesigned/guestdistinction the board draws, never a name that could be faked), the map, the score, kills/deaths/headshots, damage, rounds, how long it took, the state word, and when.HEADanswers likeGET.src/server.tsunchanged, and the page getscache-control: private, no-cachefor the same reason/does. Every field is escaped through the helpersrc/pages/game.tsalready uses.Enteron a row in the matches tab shows the match,Escgoes back. AGENTS.md's rule — what a person can do on the page they can do here too.src/pages/match.tsbesidegame.ts, and the query is one function insrc/db.ts.src/routes.tsis worth making if the table of paths inserver.tsstops fitting in one read; say which you chose.HEADmatchesGET; the headers are the floor plusprivate, no-cache; the terminal's detail view shows the same numbers as the page.Files I expect to change:
src/server.ts,src/pages/match.ts(new),src/pages/game.ts,src/db.ts,src/tty.ts,src/server.test.ts,src/tty.test.ts,src/db.test.ts,README.md.Risks: the board is public, so this page is too — keep it to the fields already on the board or it becomes a way to learn something about another player. The
/route's cookie-setting path must not grow a second copy: a match page does not need to mint a session.Brief that fits: scout.