From 9dde82801aca9b989ea32220b55a68a9572cadf4 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Wed, 19 Aug 2026 06:05:31 +0200 Subject: [PATCH] feat(prefs): remember which reading of the board the reader wants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whether unstarted events keep to their own block or sit in one deadline order with the running ones. Both are right for somebody, so it is the reader's answer and it survives a reload like the rest of the board's shape does. Defaults to the block, which is the board as it was before the choice existed. Only read while `timelineUpcoming` is on — with nothing unstarted plotted there is no block to keep apart — but stored either way, so switching that back on restores what they said rather than a default. The Controls test builds a whole `Prefs`, so a new required field lands there in the same commit or nothing typechecks in between. Co-Authored-By: Claude Opus 5 (1M context) --- src/client/state/usePrefs.ts | 19 +++++++++++++++++++ test/controls.test.tsx | 1 + 2 files changed, 20 insertions(+) diff --git a/src/client/state/usePrefs.ts b/src/client/state/usePrefs.ts index 6f03aa2..690574d 100644 --- a/src/client/state/usePrefs.ts +++ b/src/client/state/usePrefs.ts @@ -99,6 +99,24 @@ export interface Prefs { * header says how many are being held back. */ timelineUpcoming: boolean; + /** + * Whether those unstarted events keep to their own block on the board, under + * a "Not started yet" heading, or sit in one deadline order with everything + * else. + * + * Two readings of the same board, and both are right for somebody. Split + * answers "what is on now, and what is queued behind it" — the shape of a + * patch. Mixed answers "what runs out first", full stop, which is the + * question a Gantt chart is for: an event opening on Friday and closing on + * Sunday is a nearer deadline than one running now until October, and the + * split order can never show that. + * + * Defaults to `true`, the board as it was before this existed. Only read when + * `timelineUpcoming` is on — with nothing unstarted plotted there is no block + * to keep apart — but stored either way, so switching the parent back on + * restores the answer they gave rather than a default. + */ + timelineSplitUpcoming: boolean; /** * Whether to guess which events repeat daily from what the source printed. * Off leaves only the ones the reader marked themselves; it never discards a @@ -138,6 +156,7 @@ function defaults(): Prefs { timelineDayWidth: DEFAULT_DAY_WIDTH, timelineGroup: "game", timelineUpcoming: false, + timelineSplitUpcoming: true, detectDaily: false, showCompleted: true, showIgnored: false, diff --git a/test/controls.test.tsx b/test/controls.test.tsx index ddf44a2..8b784b7 100644 --- a/test/controls.test.tsx +++ b/test/controls.test.tsx @@ -23,6 +23,7 @@ const PREFS: Prefs = { timelineDayWidth: 32, timelineGroup: "game", timelineUpcoming: false, + timelineSplitUpcoming: true, detectDaily: false, showCompleted: true, showIgnored: false,