From 2f690385f428876fb91bf510d28407178c911ff4 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Sun, 1 Nov 2026 04:39:49 +0100 Subject: [PATCH] fix(settings): put Genshin TCG tracking in Setup --- docs/DESIGN.md | 2 +- docs/PRD.md | 2 +- .../2026-11-01-content-classification.md | 4 +- ...026-11-01-content-classification-design.md | 10 +++-- .../components/redesign/GameSettings.tsx | 38 +++++++++---------- test/reader-tcg.test.tsx | 6 ++- 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 7573e7e..2436126 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -708,7 +708,7 @@ legend on the same baseline as "Next: …". ## Content tracking additions (2026-11-01) -Genshin's About tab has an Event tracking group before Data sources. The native +Genshin's Setup tab has an Event tracking group below What to track. The native checkbox **Track TCG events** uses the existing settings row, with the copy “Show Genius Invokation TCG events in your lists and timeline.” The setting is saved immediately; while saving it is disabled, and failure keeps the prior diff --git a/docs/PRD.md b/docs/PRD.md index 60b03e7..49e6acd 100644 --- a/docs/PRD.md +++ b/docs/PRD.md @@ -690,7 +690,7 @@ windows spec, without changing its source/date requirements. On transition, existing event followers retain pass-family pins in enabled lanes; newly offered Miliastra remains hidden until enabled. -Genshin → About → Event tracking provides **Track TCG events**, on by default, +Genshin → Setup → Event tracking provides **Track TCG events**, on by default, across that reader's Genshin servers. Off hides classified source TCG activities from live lists, timeline, counts, next-deadline guidance and event-derived daily instructions. It preserves notes, completion and Archive history; turning it diff --git a/docs/superpowers/plans/2026-11-01-content-classification.md b/docs/superpowers/plans/2026-11-01-content-classification.md index bf81526..deb3571 100644 --- a/docs/superpowers/plans/2026-11-01-content-classification.md +++ b/docs/superpowers/plans/2026-11-01-content-classification.md @@ -55,7 +55,7 @@ Rebase account-scoped `fieldTimes` paths for classified IDs, preserving the late **Interfaces:** Reader event rows use logical destination game and existing IDs. Shared category filtering excludes TCG when `prefs.genshinTcg === false`. Retain classified snapshots for migration and source-backed pass rows even when ordinary Events is off. Freshness/source lookup maps logical Miliastra to supplying Genshin sources. - [x] Add failing tests for lane independence, hidden-lane policy, cached snapshots, source attribution and unchanged Genshin rows. -- [x] Route row rendering and lane discovery; offer Miliastra independently without synthetic dailies; point to its settings from Genshin About. +- [x] Route row rendering and lane discovery; offer Miliastra independently without synthetic dailies; point to its settings from Genshin Setup. - [x] Run focused reader/view tests and typecheck. ### Task 4: Feed-backed battle-pass cycles @@ -72,7 +72,7 @@ Rebase account-scoped `fieldTimes` paths for classified IDs, preserving the late **Files:** `src/client/components/redesign/GameSettings.tsx`, `src/client/state/reader/eventRows.ts`, `routines.ts`, `test/reader-tcg.test.tsx` (new). -**Interfaces:** `prefs.genshinTcg` absent means true. Genshin About renders Track TCG events, supporting copy from spec, immediate save and failure rollback. All live surfaces use the shared reader classification predicate; history remains readable. +**Interfaces:** `prefs.genshinTcg` absent means true. Genshin Setup renders Track TCG events, supporting copy from spec, immediate save and failure rollback. All live surfaces use the shared reader classification predicate; history remains readable. - [x] Add failing tests for default/on/off/cached snapshot behavior, multiple accounts, saved-history preservation and rejected save. - [x] Implement existing-style accessible toggle and shared filtering; no ignored/completed writes. diff --git a/docs/superpowers/specs/2026-11-01-content-classification-design.md b/docs/superpowers/specs/2026-11-01-content-classification-design.md index 732c024..98246fd 100644 --- a/docs/superpowers/specs/2026-11-01-content-classification-design.md +++ b/docs/superpowers/specs/2026-11-01-content-classification-design.md @@ -24,7 +24,9 @@ To Temper pairs. ReaderApp already filters ended rows and reconciles previously seen ones into Archive: old rows in the feed do not establish a display bug. The owner chose source-driven classification over a maintained title table, and -requested a show/track TCG toggle in Genshin's About tab. +originally requested a show/track TCG toggle in Genshin's About tab, then +explicitly moved it to Setup after trying the release. The current location is +Setup, immediately below What to track. ## Approaches @@ -42,7 +44,7 @@ title classifier or a replacement for source labels. - Miliastra Wonderland is an independently selectable built-in lane. - Source-dated battle passes are tracked through Cycles, once per pass window. -- Genshin's About tab controls whether its TCG events are tracked. +- Genshin's Setup tab controls whether its TCG events are tracked. - Notes, completion, ignores, daily logs, amounts, history and clock references survive reclassification, import/restore and repeated application. - Keep IDs, source URLs, source IDs, dates, precision and the current matching @@ -96,7 +98,7 @@ Like other newly added lanes, it arrives off for existing readers and is available in setup for new readers. This lane setting takes precedence over preserving a relocated pass's visibility: Silvery Moonlight Chronicle stays hidden until Miliastra is enabled, with its follow/pin preferences and progress -retained. Enabling the lane restores its eligible placements. Genshin's About tab includes a short pointer +retained. Enabling the lane restores its eligible placements. Genshin's Setup tab includes a short pointer to Miliastra's settings so the relocated activities are discoverable. Reclassification resolves storage as well as presentation. Use a persisted @@ -149,7 +151,7 @@ routines. Hidden lanes remain hidden, including newly offered Miliastra. New readers follow passes through Cycles. An account can follow passes with ordinary Events turned off. Silvery Moonlight Chronicle is a pass under Miliastra. -## Genshin About: TCG switch +## Genshin Setup: TCG switch Use the existing settings control style, with label **Track TCG events** and supporting copy **Show Genius Invokation TCG events in your lists and timeline.** diff --git a/src/client/components/redesign/GameSettings.tsx b/src/client/components/redesign/GameSettings.tsx index 8ff6ef4..08e60c5 100644 --- a/src/client/components/redesign/GameSettings.tsx +++ b/src/client/components/redesign/GameSettings.tsx @@ -217,25 +217,6 @@ export function GameSettings({ )} - {selected === "genshin" && ( -
-

Event tracking

- -

Show Genius Invokation TCG events in your lists and timeline.

-

Miliastra Wonderland has its own game settings. Enable it in Your games to track its activities separately.

- {message &&

{message}

} -
- )}

Data sources

{sources.filter((s) => s.game === sourceGameFor(selected)).length === 0 ? ( @@ -354,6 +335,25 @@ export function GameSettings({
)} + {selected === "genshin" && ( +
+

Event tracking

+ +

Show Genius Invokation TCG events in your lists and timeline.

+

Miliastra Wonderland has its own game settings. Enable it in Your games to track its activities separately.

+ {message &&

{message}

} +
+ )}

Servers diff --git a/test/reader-tcg.test.tsx b/test/reader-tcg.test.tsx index a1ea76a..5406893 100644 --- a/test/reader-tcg.test.tsx +++ b/test/reader-tcg.test.tsx @@ -19,8 +19,10 @@ test("TCG defaults on; off hides remembered events and dailies without changing expect(s.data["account:one"]!.progress[event.id]).toHaveProperty("note", "keep"); expect(s.seenEvents[pairKey("account:one", event.id)]).toBeDefined(); }); -test("Genshin About offers the TCG tracking preference", () => { +test("Genshin Setup offers the TCG tracking preference", () => { const s = migrateLegacy({}, ["genshin"], at, () => "account:one"); - const html = renderToStaticMarkup( ({ ok: true })} />); + const html = renderToStaticMarkup( ({ ok: true })} />); expect(html).toContain("Track TCG events"); + const about = renderToStaticMarkup( ({ ok: true })} />); + expect(about).not.toContain("Track TCG events"); });