feat: track events that repeat daily, and each game's dailies

A login campaign is not one job with a deadline. It is twenty small jobs
on twenty separate deadlines, and a day you miss is gone whatever you do
afterwards — which a single "done" tick cannot express.

Repeating events now get a checklist: today's tick, a strip of every day
in the run showing what you got and what you missed, the streak, and how
many chances are left. Past days stay editable, because people tick up
later and a checklist you cannot correct stops being trusted after the
first mistake. Alongside it sits today's dailies — commissions, sanity,
daily training — one tick per game, keyed `dailies:<game>`, since no
source publishes those and they are the only thing on the page that
expires tonight rather than next patch.

Days roll at 04:00 server time per region, not midnight: finishing at
02:00 is still yesterday, and a naive UTC date would tick the wrong box
for four hours every night.

Dailiness is read off what the source published — a login event type, or
"daily"/"check-in"/"7-day" wording — never from a game's habits or an
event's length. That adds no schema field, so the feed contract and every
event ID are untouched. An unannounced end yields a tick count, not a
checklist of invented length, and a tick is never removed except by the
reader, including ticks outside the window the feed now claims: a source
quietly moving a date must not erase a fortnight's streak that exists
nowhere else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5 committed 2026-08-15 21:18:22 +02:00
1 parent ad3647bee2
commit ccc5d369bd
11 files changed
+947 -16

No files matched your search

+26
View File
@@ -5,6 +5,9 @@ import type { RowEvent } from "./EventRow.tsx";
import { pressure, pressureReason, type Effort } from "../../shared/effort.ts";
import type { Status } from "../state/useProgress.ts";
import { ProgressControls } from "./ProgressControls.tsx";
import { DailyChecklist } from "./DailyChecklist.tsx";
import { isDaily } from "../../shared/daily.ts";
import type { Region } from "../../shared/schema.ts";
import { Meter, URGENCY_COLOR } from "./Meter.tsx";
export function EventDetail({
@@ -14,6 +17,10 @@ export function EventDetail({
status,
effort,
note,
region,
now,
dailyDays,
onToggleDay,
onToggle,
onIgnore,
onStatus,
@@ -27,6 +34,11 @@ export function EventDetail({
status: Status | undefined;
effort: Effort | undefined;
note: string;
region: Region;
now: number;
/** Days already ticked off, for events that repeat. */
dailyDays: string[];
onToggleDay: (id: string, day: string) => void;
onToggle: (id: string) => void;
onIgnore: (id: string) => void;
onStatus: (id: string, s: Status | undefined) => void;
@@ -118,6 +130,20 @@ export function EventDetail({
</p>
)}
{/* A repeating event gets the checklist instead of nothing but a
"mark done" — its work is spread over every day of the run, and one
tick cannot express that. */}
{isDaily(event) && (
<DailyChecklist
startsMs={clock.startsMs}
endsMs={clock.endsMs}
region={region}
now={now}
logged={dailyDays}
onToggleDay={(day) => onToggleDay(event.id, day)}
/>
)}
<ProgressControls
status={status}
effort={effort}