Skip to content

Add a photosensitivity warning to visual games - #237

Merged
acrosman merged 4 commits into
mainfrom
feat/202-flash-warning
Oct 19, 2026
Merged

acrosman merged 4 commits into
mainfrom
feat/202-flash-warning

Conversation

@acrosman

@acrosman acrosman commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a highlighted photosensitivity warning box to the welcome panel of every game that flashes visual stimuli, just above the Start button. Fixes #202.

What changed and why

  • Markup: <p class="game-flash-warning"> added to Card Rat, Directional Processing, Fast Piggie, Field of View, High-Speed Memory, Orbit Sprite Memory, and Otter Stop. Fine Tuning and Sound Sweep are audio-only, and Object Track's balls move but do not flash, so those three don't get it.
  • Style: A shared .game-flash-warning rule in app/styles/game-shared.css reuses the existing --color-warning-* tokens (text 7.1:1 on the fill) and adds a heavier left border.
  • Template and docs: _template/interface.html includes the warning, with a note to delete it only for audio-only games. The convention is documented in app/games/CLAUDE.md, app/CLAUDE.md, and _template/CLAUDE.md.
  • Test: app/games/flashWarning.test.js scans every game directory and requires the warning, placed before the Start button, in every game not on a NO_FLASH_GAMES list. A new visual game is caught by default.

How it was tested

  • npm run lint and npm test: all 2156 tests pass.
  • Removed the warning from Fast Piggie temporarily and confirmed the new test fails.
  • Launched the app with an isolated user-data dir and checked the Fast Piggie and Otter Stop welcome panels.

Review closely

  • The warning text, which is shared word for word across games.
  • Placement just above Start, rather than at the top of the panel. The first-run tutorial starts only when Start is pressed, so players see the warning before any flashing.

🤖 Generated with Claude Code

acrosman and others added 4 commits October 18, 2026 21:31
Games that flash visual stimuli (Card Rat, Directional Processing, Fast
Piggie, Field of View, High-Speed Memory, Object Track, Orbit Sprite
Memory, Otter Stop) now show a highlighted warning box just above the
Start button. The shared .game-flash-warning style uses the existing
warning tokens (7.1:1 text contrast). The template carries the warning,
and flashWarning.test.js requires it in every game except the audio-only
ones (Fine Tuning, Sound Sweep).

Fixes #202

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Object Track's balls move and highlight but do not flash images, so it
joins the audio-only games on the test's NO_FLASH_GAMES list.

Refs #202

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix "as been" and "Cat rat" typos, tighten the Directional Processing
wording, and end each warning with "Stop and seek professional advice if
you notice anything that could indicate a problem."

Refs #202

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@acrosman
acrosman merged commit d0ef012 into main Oct 19, 2026
7 checks passed
@acrosman
acrosman deleted the feat/202-flash-warning branch October 19, 2026 02:06
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.

All visual games: flash warning

1 participant