From 1579ba8680ce46f1b4ca1c0ad24e6eefed3604c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 8 Aug 2026 00:57:58 +0000 Subject: [PATCH 01/16] Initial plan From 85a96dd6c8765af6a45adb118f2681fd43845d42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 8 Aug 2026 01:05:41 +0000 Subject: [PATCH 02/16] feat: add reusable tutorial framework (tutorialService.js) Co-authored-by: acrosman <2972053+acrosman@users.noreply.github.com> --- .github/copilot-instructions.md | 102 ++++- app/components/tests/tutorialService.test.js | 431 +++++++++++++++++++ app/components/tutorialService.js | 290 +++++++++++++ app/styles/game-shared.css | 152 +++++++ 4 files changed, 974 insertions(+), 1 deletion(-) create mode 100644 app/components/tests/tutorialService.test.js create mode 100644 app/components/tutorialService.js diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 53f869a..9abc643 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -254,6 +254,7 @@ Mock `electron-log` with `jest.unstable_mockModule('electron-log', ...)` in Node For renderer-side tests that exercise code which calls `logger.*`, set `global.window.api.invoke` to a `jest.fn()` and assert on `'log:send'` calls, or simply verify the call count is correct. + --- ### 5b — Shared Game Screen Components @@ -302,8 +303,107 @@ See `app/games/_template/interface.html` for a complete annotated example. --- +### 5d — Tutorial Service (`app/components/tutorialService.js`) + +All games **may** offer a tutorial shown automatically the first time the player opens the game. +The Tutorial Service provides a shared framework so every game's tutorial looks and behaves the +same way, with no repeated boilerplate. + +#### Stored state + +Tutorial seen-state is persisted under the top-level `tutorials` key of the player's progress +file — separate from game scores stored under `games`. The key for each game is its manifest `id`: + +```json +{ + "playerId": "default", + "games": { ... }, + "tutorials": { + "my-game-id": true + } +} +``` + +#### Defining tutorial steps + +Define tutorial steps as an array of `{ title, content }` objects. `content` may contain inline +HTML (e.g. ``, ``, `