Skip to content

fix #8: Feature: Tutorial Mode - #42

Merged
CuriosityQuantified merged 1 commit into
mainfrom
feat/tutorial-mode
Aug 9, 2026
Merged

CuriosityQuantified merged 1 commit into
mainfrom
feat/tutorial-mode

Conversation

@CuriosityQuantified

Copy link
Copy Markdown
Owner

Closes #8

Summary

Adds an interactive first-run tutorial that teaches new users the core game loop, with a replay path from Settings and an in-game hint. Entirely client-side and static — no new dependencies, no backend changes.

What changed

  • components/TutorialOverlay.jsx (new) — 6-step guided walkthrough mapping 1:1 to the issue's tutorial flow: Welcome/overview → Scenario presentation → First response → Turn progression → Scoring → Encourage exploration. Includes a fixed sample scenario ("A coastal city has lost power…") with a predictable sample score (Impact 80 / Clarity 90 / Overall 85). Steps are gated (choose a response, advance the demo turn, reveal the score) so the tutorial is interactive rather than passive. Skip / Back / Finish controls; role="dialog" aria-modal="true".
  • pages/simulation.jsx — launches the tutorial once for new users via the save-the-world:tutorial-status localStorage flag (read inside useEffect, SSR/hydration-safe, storage failures caught); adds a Settings panel with a Replay Tutorial control; adds a dismissible gameplay hint shown during play.
  • tests-e2e/tutorial.spec.js (new) — hermetic regression suite covering all four acceptance criteria.
  • Legacy e2e fixtures (difficulty, mobile, save-resume, simulation) seed tutorial-status=completed so the first-run modal never intercepts post-onboarding gameplay flows.
  • .github/workflows/ci.yml — runs the tutorial suite in the regressions job. The repo's 3-job CI shape (unit-tests / regressions / build) is preserved; no code-graph job (repo has no graph).

Acceptance criteria

  • Tutorial launches for new users
  • Clear, concise instructions
  • Interactive rather than passive (Continue is gated on interaction each step)
  • Can be replayed from Settings

Review pipeline

Implemented via four sequential fresh subagents — implementation+CI, code-review (mattpocock), code-simplifier, and Claude security review. No blockers found; security review reported zero new attack surface and zero new dependencies.

Verification (local, CI-equivalent)

  • Python unit: 160 passed, 1 skipped, 8 deselected
  • npm run build: clean
  • Playwright chromium bundle (save-resume, analytics, leaderboard, difficulty, tutorial): 49 passed
  • Playwright mobile (mobile-chrome): 8 passed

Graph status: N/A — repo has no graphify toolchain/graphify-out/; 3-job CI shape unchanged.

Add an interactive, first-run tutorial that walks new users through the
core game loop and can be replayed from Settings.

- components/TutorialOverlay.jsx: 6-step guided walkthrough (welcome,
  scenario presentation, first response, turn progression, scoring, and
  encouraging exploration) with a fixed sample scenario, an interactive
  response choice, a demo turn advance, and a sample score reveal. Steps
  are gated so users must interact before continuing (interactive, not
  passive). Includes skip/back/finish controls.
- pages/simulation.jsx: launch the tutorial once for new users via the
  save-the-world:tutorial-status localStorage flag (SSR-safe, storage
  failures handled); add a Settings panel with a Replay Tutorial control;
  add a dismissible gameplay hint during play.
- tests-e2e/tutorial.spec.js: hermetic regression suite covering all four
  acceptance criteria (first-time launch, interactive walkthrough,
  skip + replay from Settings, gameplay hint).
- Legacy e2e specs (difficulty/mobile/save-resume/simulation) seed
  tutorial-status=completed so the first-run modal never intercepts
  post-onboarding gameplay flows.
- .github/workflows/ci.yml: run the tutorial suite in the regressions job
  (3-job CI shape preserved; no code-graph job — repo has no graph).

Closes #8

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
save-the-world Ready Ready Preview Aug 9, 2026 10:21am
sim-local Ready Ready Preview Aug 9, 2026 10:21am

@CuriosityQuantified
CuriosityQuantified merged commit 05d6b03 into main Aug 9, 2026
6 checks passed
@CuriosityQuantified
CuriosityQuantified deleted the feat/tutorial-mode branch August 9, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Tutorial Mode

1 participant