f7ad9e7ecd8f3e13734ad4e5ef9ff78002855ac6
- save.test.ts: add regression test proving loop actions do NOT start or yield during offline catch-up (applyOfflineProgress replays tickGame directly; maybeStartLoopAction is never called, so an enabled loop with no active action stays idle and yields 0). - purity.test.ts: extend FORBIDDEN list to catch environment APIs (Date.now(), localStorage., indexedDB., idb-keyval import, document., window., requestAnimationFrame()) in addition to the existing React/react-dom/zustand import guards. Patterns are scoped to call sites and member-access forms so prose comments (e.g. save.ts's "Date scheduling" doc comment) do not false-positive. lz-string is intentionally omitted — it is a pure compression library. - NavRail.tsx: add sr-only "New story" span alongside the aria-hidden pulse dot so screen readers can perceive the unread-story badge.
Idlegame
Idle/incremental text-fantasy RPG, built as a responsive web app and PWA.
Stack
- TypeScript strict
- Vite + React 19
- Zustand for view state
- Pure TypeScript engine under
src/engine - Zod-validated content and saves
- Biome, Vitest, Tailwind v4, vite-plugin-pwa
Development
pnpm install
pnpm dev
Before pushing a branch:
pnpm typecheck
pnpm lint
pnpm test:coverage
pnpm build
Current Scope
M0 is a walking skeleton: one resource, one timed action, fixed-timestep engine, versioned saves, offline credit, persistence, and a minimal React shell. M1 adds the first playable vertical slice.
Documentation
- Architecture:
docs/architecture.md - Tech stack ADR:
docs/adr/0001-tech-stack.md - M0 plan:
docs/plans/2026-06-11-m0-bootstrap.md
Design, story, decisions, credentials, and durable session memory live in the
Obsidian vault under Idlegame/, not in this repository.
Languages
TypeScript
99.5%
CSS
0.3%
HTML
0.2%