Repository navigation
STE-58 + STE-69: record a finish list, enforce the closing date, and cancel a race - #71
Merged
Merged
Conversation
…ole mockup (STE-58) The empty tab is the drop card and nothing else, and a loaded file is shaped like Entries with the signing button in the header: both were settled on 2026-09-13 and are reproduced rather than redesigned. What this file adds is everything after that button, which did not exist then because recording results was one signature per runner. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU
…(STE-58) The last tab of the race console, and the last of the five things STE-17 asked for. It was deferred while the preview endpoint took only timed rows and recording meant one wallet prompt per runner; STE-44 and STE-60 removed both, and the contract has taken 120 results in one signature since this morning. A 312-runner race is three prompts. Every screen here is shaped by one fact: a result is terminal on chain. Nobody can correct or remove a published result, so the file is reviewed before a signature is spent, and nothing the review held can be sent at all. There is no "send it anyway" on a flagged row, because a corrected file costs nothing and a published wrong time costs forever. The two severities the backend reports are said in words rather than codes. A row the chain would refuse costs a failed transaction; a row the chain would accept with the wrong runner's time is false for good, and that is the kind the review exists for. The organiser reads "bib 88 exists in both 10K and 5K", not `ambiguous_bib`. Batches are planned with the contract's own maximum and labelled by runner rather than by transaction, since a line number stops meaning anything once rows have been held. A batch records every row in it or none, so a failure leaves what came before it recorded, the dialog says so, and the button is Continue rather than "try again". A failed batch is not believed. The chain is asked, and because the batch is atomic, reading one of its runners answers for all hundred and twenty: the scanner's rule from race day at a hundredth of the cost. If it landed after all, the error is cleared instead of inviting a second send nobody could undo. Two things moved up on their second reader, as the repo requires: the challenge and its three headers (`lib/api/signed.ts`), and `formatFinishTime`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU
Stacked on feat/58-results-upload, which the header it changes is built on. The contract has enforced a close date since this morning and the web app calls none of it, so a race page can promise a date the contract ignores. This is the shape that closes it: the wizard sets what it publishes, the header folds its three entry controls into one button and a menu, moving the date is one form with a signed announcement, and a runner is told which of the two refusals they met. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU
…with an announcement (STE-69) The contract has enforced a close date since this morning (STE-46). The web app called none of it: the wizard wrote the date into the event document, which is what runners read, and nothing put it on chain. So a race page could promise that entries close on 12 October while the contract took entries on the 13th. That is the promise STE-46 was built to keep, still broken from the only side that matters. The wizard now sets what it publishes, as one more signature straight after the race exists, from the same field the document took it from. The wizard already requires a registration window, so every race created from now on has a date that is actually enforced. Moving it is the same shape as raising a quota: one form holding the new date, the sentence the page writes from the two dates, an optional note, and three signatures in the order that makes a decline free. The runner behind both is now one file; add-places is a thin wrapper over it, and its 56 tests pass untouched, which is what makes the extraction safe to believe. The date moves either way. A date already past stops entries the moment it is signed, said in a hint under the field rather than a panel, because it is information and not an alarm. Moving it earlier is allowed for a reason that matters: Close entries already stops entries instantly, so an earlier date adds no power to harm anyone. It does take away days a runner was promised, which is why it carries the same announcement. The header now holds one button and a menu, which restores the one-action rule STE-57 broke on purpose. Which button leads is a pure function: a Draft race leads with opening, an Open race with adding entries because a sold-out distance is money not being taken right now, and a race closed by a date that has passed leads with the date, because reopening the status alone changes a word and lets nobody in. A runner finally learns which refusal they met. "Entries closed on 12 October" is a date that will not come back; "The organiser has closed entries" is a decision that may be undone. They used to share a sentence. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU
Two changes that turned out to be one. The console could open entries, close them and reopen them, and never cancel. That was deliberate in STE-17 and it left a hole: an organiser who published a race by mistake had no way to withdraw it, and a name on chain cannot be edited. No contract work was needed for any of this. `set_event_status` has taken `Cancelled` since v2; the status was simply left out of the input type while nothing offered it. Everything about the dialog follows from the one fact that cancelling is terminal. It opens with what cancelling costs other people, read from the chain, because there is no escrow: the fee moved to the organiser as each runner entered, so a cancelled race leaves a refund owed off chain, and a screen that stays quiet about that helps somebody forget. The race name has to be typed, which is the only guard that scales with a cost nothing can undo. The way out reads Keep the race, because two buttons that both say cancel is how people press the wrong one. And it never promises a delete: the page keeps its URL, a search still reaches it, and what changes is that entries stop for good and the directory drops it. Adding a fourth control to the header forced the second change. Everything now lives in one labelled Manage race menu, and nothing leads on a live race: none of these is what somebody opens the page to do, and the one that would have led, Close entries, is a button whose accidental press stops a race selling. A draft keeps its button, because a draft exists in order to be opened and burying that leaves a first race looking like a page nothing can be done to. The menu rows lost the sentences under them and gained marks instead. A menu whose every item carries a paragraph turns choosing into reading, and the mark does the work the sentence was doing: two rows here both stop entries, and the shape tells them apart before the words are read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three pieces of the organiser console, in one branch because each one changed the header the next one needed.
STE-58 — record a finish list
The last of the five things STE-17 asked for, deferred while the preview endpoint took only timed rows and recording meant one wallet prompt per runner. STE-44 and STE-60 removed both, and the contract now takes 120 results in one signature, so a 312-runner race is three prompts.
Every screen is shaped by one fact: a result is terminal on chain. The file is reviewed before a signature is spent, and nothing the review held can be sent at all. There is no "send it anyway" on a flagged row, because a corrected file costs nothing and a published wrong time costs forever.
ambiguous_bib.STE-69 — the registration close date
The contract has enforced a close date since STE-46. The web app called none of it: the wizard wrote the date into the event document, which is what runners read, and nothing put it on chain. A race page could promise 12 October while the contract took entries on the 13th.
Cancelling a race, and the header that had to change
The console could open, close and reopen entries, and never cancel. An organiser who published a race by mistake had no way to withdraw it. No contract work:
set_event_statushas takenCancelledsince v2; the status was simply left out of the input type while nothing offered it.The dialog follows from cancelling being terminal. It opens with what it costs other people, read from the chain, because there is no escrow and the fee already moved to the organiser, so a cancelled race leaves a refund owed off chain. The race name has to be typed. The way out reads Keep the race. And it never promises a delete: the page keeps its URL and a search still reaches it.
A fourth control forced the header into one labelled Manage race menu, with nothing leading on a live race (the one that would have led, Close entries, stops a race selling if mispressed) and a draft keeping its Open entries button. Menu rows lost their explanatory second lines and gained lucide marks instead.
Checks
lint,typecheckand the module suites are green locally: organiser 507, entry 204, shared components and lib 391, the other modules 582. A full-suite run on this laptop showed 2 failures that pass when the same files run alone, the known parallel-load flake; CI is the clean-room proof.Unblocks STE-70: once this deploys, the seven TESTING races can be cancelled from the console, which is the only way to take them off the directory.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PkgGbz4eNSdzzzAPiqV1ZU