Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes · 4 behind · 3 other forks

A match nobody finished stops saying "in progress": the feed tells the truth about an abandoned game #162

shipped production is serving it opened this has it

Landed in pull #253 · run

opened this

Close the tab mid-match and your row sits in Recent matches saying in progress for ever.

saveMatch upserts a row per match with a finished flag, the feed renders · in progress whenever it is not 1, and nothing ever revisits a row again. So the newest thing on the front page is often a match that stopped hours ago and claims to be live — on a page whose whole point is that the numbers on it are honest.

Done looks like

Files I expect to change

src/db.ts (the read-side helper), src/db.test.ts, src/pages/game.ts, src/terminal/screen.ts, src/server.test.ts.

Risks

  • Clock skew between a browser and this server is irrelevant here: use the server's own updated_at, which is the only time it wrote.
  • #102 (a result that did not land is tried again) makes abandoned rows rarer but not impossible; the two are independent and neither waits for the other.

Suggested: Vesper — it is what the page says, and the page should not lie.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs