refactor: the event row takes its clock instead of reading one
Every other surface here is handed `now` — the headline, the board, the dailies strip, the detail sheet — for the reason the parsers are: a function that reads the clock cannot be rendered against a fixed instant, so nothing about it can be asserted. The list row was the one exception, calling the wall clock twice for its window caption and its "starts in". Two things follow from fixing it. Those numbers were counted from a different instant than the `clock` sitting beside them in the same row, which is a disagreement nobody would ever notice and nobody could ever prove. And the countdown is now testable: rendering one row at two instants gives the two answers the injected clock implies, which is what the new test pins. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
fb390c1af8
commit
7bb7dc843c
@@ -348,6 +348,7 @@ export function App() {
|
||||
<EventRow
|
||||
key={row.event.id}
|
||||
row={row}
|
||||
now={now}
|
||||
completed={isDone(row.event.id)}
|
||||
status={prog.progress[row.event.id]?.status}
|
||||
effort={prog.progress[row.event.id]?.effort}
|
||||
|
||||
Reference in New Issue
Block a user