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]>
31 lines
917 B
TypeScript
31 lines
917 B
TypeScript
import { expect, test } from "bun:test";
|
|
import {
|
|
createAccount,
|
|
changeAccountRegion,
|
|
retireAccount,
|
|
} from "../src/client/state/reader/accounts.ts";
|
|
const at = "2026-10-16T12:00:00.000Z";
|
|
test("additional accounts start events-only with fresh placements", () => {
|
|
const a = createAccount("genshin", "asia", at, "account:second");
|
|
expect(a.intent).toEqual({
|
|
events: true,
|
|
dailies: false,
|
|
weeklyMonthly: false,
|
|
cycles: false,
|
|
});
|
|
expect(a.routines).toEqual({});
|
|
});
|
|
test("changing a server preserves account identity and historical clock", () => {
|
|
const a = createAccount("genshin", "europe", at, "account:one");
|
|
const b = changeAccountRegion(
|
|
a,
|
|
"asia",
|
|
"2026-10-17T12:00:00.000Z",
|
|
"clock2",
|
|
);
|
|
expect(b.id).toBe(a.id);
|
|
expect(b.clocks).toHaveLength(2);
|
|
expect(b.clocks[0]?.region).toBe("europe");
|
|
expect(retireAccount(b, at).clocks).toEqual(b.clocks);
|
|
});
|