fix(dailies): a built-in on another server's clock leaves the header countdown alone
Beyond the Rails rolls on Asia's reset, and the header took the soonest reset of every chip, so a Europe NTE reader read "next reset in 1h" at 20:00 UTC when their day rolls in seven. The countdown now counts the reader's own clocks. Found in the whole-branch review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4427f6c2e5
commit
5080397999
2 files changed
+22
-2
No files matched your search
@@ -502,8 +502,12 @@ export function Dailies({
|
||||
|
||||
// With mixed reset clocks there is no single "resets in", so the header
|
||||
// reports the next one to land and says that it is the next one.
|
||||
const soonest = Math.min(...items.map((i) => i.resetsIn));
|
||||
const mixed = new Set(items.map((i) => i.resetsIn)).size > 1;
|
||||
// A built-in on another server's clock (`clock`) rolls a cycle, not the
|
||||
// reader's day: counting it would announce a reset nothing daily follows.
|
||||
const own = items.filter((i) => i.clock === undefined);
|
||||
const clocks = own.length > 0 ? own : items;
|
||||
const soonest = Math.min(...clocks.map((i) => i.resetsIn));
|
||||
const mixed = new Set(clocks.map((i) => i.resetsIn)).size > 1;
|
||||
const open = items.find((i) => i.key === editing && i.goal?.measure === "amount");
|
||||
|
||||
const { today, longer } = splitByCadence(items);
|
||||
|
||||
Reference in new issue
Block a user