Skip to content

STE-58 + STE-69: record a finish list, enforce the closing date, and cancel a race - #71

Merged
AncungAulia merged 5 commits into
mainfrom
feat/69-registration-close-date
Sep 27, 2026
Merged

AncungAulia merged 5 commits into
mainfrom
feat/69-registration-close-date

Conversation

@AncungAulia

Copy link
Copy Markdown
Owner

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.

  • The two severities are said in words, never as codes: a row the chain would refuse costs a failed transaction, a row it would accept with the wrong runner's time is false for good. The organiser reads "bib 88 exists in both 10K and 5K", not ambiguous_bib.
  • Batches are labelled by runner ("Runners 1 to 120"), since a line number stops meaning anything once rows have been held.
  • A failed batch is checked against the chain, and one read settles it. A batch is atomic, so reading one of its runners answers for all 120. If it landed after all, the error is cleared rather than inviting a second send nobody could undo. That is the scanner's rule (STE-62) at a hundredth of the cost.

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.

  • The wizard now sets what it publishes, as one more signature after the race exists, from the same field the document took it from.
  • Moving it is one form: the new date, the sentence the page writes from the two dates, an optional note, then sign the announcement, move the date, publish. The chain cannot check that anybody was told, so the console is the only thing that can. That runner is shared with STE-57 rather than copied, and add-places is now a thin wrapper over it, with its 56 tests passing untouched.
  • The date moves either way. A date already past stops entries the moment it is signed, said in a hint rather than a panel. Moving it earlier is allowed because Close entries already stops entries instantly, so it adds no power to harm; it does take days a runner was promised, which is why it carries the same announcement.
  • The bound is race pack collection where the document names one: handing packs out while entries are open means somebody paying for a race whose pack has already gone out.
  • A runner is told 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.

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_status has taken Cancelled since 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, typecheck and 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

AncungAulia and others added 5 commits September 24, 2026 19:28
…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
@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sterun-app Ready Ready Preview Sep 27, 2026 1:24am UTC
sterun-fe Ready Ready Preview Sep 27, 2026 1:24am UTC
sterun-landing-page Ready Ready Preview Sep 27, 2026 1:24am UTC

This branch was successfully deployed

3 active deployments
Preview – sterun-app — ced46940 Deployed Sep 27, 2026 by vercel[bot]
Preview – sterun-fe — ced46940 Deployed Sep 27, 2026 by vercel[bot]
Preview – sterun-landing-page — ced46940 Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant