feat(next-up): show the next three deadlines, not one
A reader with two games switched on said the list lost its point at twenty-one rows and asked for the three closest deadlines up front. One row was also fragile on its own terms: ticking off the headline event left the panel pointing at something the reader had no context for. Three equal panels would be a stat grid, and a reader arrives with one question — so the shape is one answer at full size and two follow-ups under it, with no meter, summary or badges to turn the panel into a second copy of the list below it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6e95e54ec6
commit
41046899f9
+12
-3
@@ -23,7 +23,7 @@ import { compareRows, SORT_MODES, type Activity, type SortMode } from "./state/s
|
||||
import {
|
||||
advanceFocus,
|
||||
countByGame,
|
||||
firstToExpire,
|
||||
nextToExpire,
|
||||
outstanding,
|
||||
resolveFocus,
|
||||
} from "./state/lens.ts";
|
||||
@@ -40,6 +40,15 @@ import { metaFor } from "../shared/games.ts";
|
||||
|
||||
type View = "soon" | "timeline";
|
||||
|
||||
/**
|
||||
* How many deadlines the headline carries.
|
||||
*
|
||||
* One was the whole panel, and one is what a reader who has just finished it
|
||||
* needs replacing. Three is what they asked for: enough to plan an evening
|
||||
* around, few enough that the closest one still owns the page.
|
||||
*/
|
||||
const HEADLINE_DEADLINES = 3;
|
||||
|
||||
/**
|
||||
* Connection state. Offline is not an error here — the service worker serves
|
||||
* the last feed it saw and countdowns run off the local clock — but it does
|
||||
@@ -245,7 +254,7 @@ export function App() {
|
||||
* them on screen, not keep nagging me about them.
|
||||
*/
|
||||
const todo = outstanding(live, isDone, isIgnored);
|
||||
const next = firstToExpire(todo);
|
||||
const headline = nextToExpire(todo, HEADLINE_DEADLINES);
|
||||
|
||||
// Counted across every game the reader plays, not just the focused one — a
|
||||
// chip has to say what is waiting behind it to be worth tapping.
|
||||
@@ -356,7 +365,7 @@ export function App() {
|
||||
{view === "soon" ? (
|
||||
<>
|
||||
<NextUp
|
||||
row={next}
|
||||
rows={headline}
|
||||
focused={focus === null ? null : gameMeta(focus).name}
|
||||
onOpen={setOpenId}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user