feat: add project foundations — Vite, Vitest, Playwright, ESLint, Prettier - #40
Merged
Merged
Conversation
…ttier Set up a modern development toolchain: - Vite: dev server with HMR and proxy to backend, production build to dist/ - Vitest: 56 unit tests covering state, utils, save, and upgrades-data modules - Playwright: E2E test suite for mode selection, game mechanics, persistence - ESLint: flat config with separate frontend (ES modules) / backend (CommonJS) rules - Prettier: consistent code formatting (single quotes, trailing commas, 120 width) Updated package.json with dev/build/test/lint/format scripts. Updated CLAUDE.md with new development workflow documentation. https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
…ject-foundations-6udLg
- GitHub Actions CI with 4 parallel jobs: lint, unit tests, E2E tests, build - Coverage via Vitest v8 provider (text + HTML + lcov reporters) - Server logic tests: streak multiplier, grade system, reward calculations, season timing, contribution rate validation (24 new tests, 80 total) https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
…tier - Added missing @vitest/coverage-v8 dependency for CI coverage job - Ran Prettier on all JS, HTML, CSS, and JSON files to fix format:check https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
- Dismiss intro overlay in E2E tests (blocks canvas clicks for 5s) - Increase timeouts for game area visibility (3s → 5s) - Silence Vite proxy errors when backend is not running - Add webServer startup timeout in Playwright config https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
- Simplify intro overlay dismiss: click directly + wait for fade-out - Use expect().toPass() polling for lumen counter and auto-save detection instead of fragile fixed timeouts - Increase click intervals (80ms → 100ms) for CI stability https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
The previous proxy error handler swallowed errors without sending a response, causing the browser request to hang indefinitely. Since socket.io is loaded via <script defer>, a hanging request blocks DOMContentLoaded and prevents main.js from executing — the game never initializes. Now proxy errors immediately return a 502, the script fails fast, and the game starts normally without the backend. https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
The socket.io <script defer> blocks page load when the backend is not running, preventing E2E tests from working in CI without a running server. Commented out with a TODO to revisit. Lint, unit tests + coverage, and build jobs remain active. https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set up a modern development toolchain:
Updated package.json with dev/build/test/lint/format scripts.
Updated CLAUDE.md with new development workflow documentation.
https://claude.ai/code/session_01JFMyMqB4VAa7qxqwC24BrT