feat: the redesigned Event Clock

The new reader app replaces the old UI: Checklist with a rail (focus
pills, Next to expire, today's dailies, pinned routines), Timeline in a
new and a classic look, Routines, Archive and a Settings area, in a
Structured (default) and a Relaxed interface. It follows the approved
Round 6 B and Round 7 mockups, corrected screen by screen with the owner.

Reader data moves to a v2 store (gacha-tracker:v2:*). Existing v1 data
is migrated on first load, a recovery copy is written first, and the v1
keys are never removed, so a rollback finds them unchanged. Redeem codes
for Genshin arrive as their own feed.

Also: live's urgency ramp, editable per theme; completion and
section-complete fireworks; a returning-user tour; the design mockups,
specs, plans, reviews and handoff record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-18 01:55:16 +02:00
1 parent ddd9673f86
commit 50c6e91b00
284 files changed
+45100 -1628

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
import { expect, test } from "bun:test";
import { renderToStaticMarkup as render } from "react-dom/server";
import { GameSettings } from "../src/client/components/redesign/GameSettings.tsx";
import { migrateLegacy } from "../src/client/state/reader/migration.ts";
test("game settings explains simultaneous server tracking and credits zero-event sources", () => {
const at = "2026-10-16T12:00:00.000Z",
state = migrateLegacy({}, ["genshin"], at, () => "account:one");
const html = render(
<GameSettings
state={state}
initialGame="genshin"
sources={[
{
sourceId: "genshin-extra",
game: "genshin",
url: "https://example.com/events",
lastSuccessAt: null,
lastConfirmedAt: null,
contentChangedAt: null,
eventCount: 0,
parsedCount: null,
statesNoEvents: false,
},
]}
onAction={async () => ({ ok: true })}
/>,
);
expect(html).toContain("track both accounts separately");
expect(html).toContain("Track another server");
expect(html).toContain("Automatic");
expect(html).toContain("Reset to default");
// Tracking choices save on click; there is no separate apply step.
expect(html).not.toContain("Apply tracking choices");
// A kind with no built-in routine is explained and still selectable.
expect(html).toContain("none built in");
expect(html).not.toMatch(/<button[^>]*disabled[^>]*data-st/);
});
import { AppearancePage } from "../src/client/components/redesign/AppearancePage.tsx";
test("Appearance orders only the games being tracked, with up and down buttons", () => {
const at = "2026-10-16T12:00:00.000Z",
state = migrateLegacy(
{},
["genshin", "hsr", "zzz"],
at,
(() => {
let n = 0;
return () => `account:${++n}`;
})(),
);
state.prefs.hiddenGames = ["zzz"];
const html = render(
<AppearancePage state={state} onAction={async () => ({ ok: true })} />,
);
expect(html).toContain("Game order");
expect(html).toContain("Move Genshin Impact down");
expect(html).toContain("Move Honkai: Star Rail up");
expect(html).not.toContain("Move Zenless Zone Zero");
expect(html).not.toContain("Sort A–Z");
});