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 <[email protected]>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { expect, test } from "bun:test";
|
|
import { renderToStaticMarkup as render } from "react-dom/server";
|
|
import { ArchivePage } from "../src/client/components/redesign/ArchivePage.tsx";
|
|
import { migrateLegacy } from "../src/client/state/reader/migration.ts";
|
|
import { sampleEvent } from "./helpers/reader.ts";
|
|
test("per-game archive retains the description, outcome, Restore and optional history view", () => {
|
|
const at = "2026-10-16T12:00:00.000Z",
|
|
s = migrateLegacy({}, ["genshin"], at, () => "account:test");
|
|
s.archive.a = {
|
|
accountId: "account:test",
|
|
event: { ...sampleEvent, summary: "Saved description" },
|
|
outcome: "done",
|
|
outcomeAt: at,
|
|
resolvedEnd: null,
|
|
clockRevision: "initial",
|
|
progress: {},
|
|
days: [],
|
|
amounts: {},
|
|
};
|
|
const html = render(
|
|
<ArchivePage
|
|
state={s}
|
|
now={Date.parse(at)}
|
|
onAction={async () => ({ ok: true })}
|
|
onOpen={() => {}}
|
|
/>,
|
|
);
|
|
for (const label of [
|
|
"Saved description",
|
|
"Restore",
|
|
"History timeline",
|
|
"Your recorded history",
|
|
"completed this month",
|
|
])
|
|
expect(html).toContain(label);
|
|
});
|