Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
1d9244b
Add CLAUDE.md modular architecture refactor game plan
claude Feb 9, 2026
6b819ed
Session 1: Cleanup & quick wins — delete dead files, gate logging, op…
claude Feb 9, 2026
c079012
Session 2: Repo organization, component restructure, domain type extr…
claude Feb 9, 2026
1dbb52f
Session 3: Theme system foundation — harden tokens, brand layer, a11y…
claude Feb 9, 2026
d863c23
Session 4: UI primitives — Button, Input, Card, ToggleSwitch
claude Feb 9, 2026
ede400a
Session 5: Dialog primitive + HomeScreen CSS extraction
claude Feb 9, 2026
51d3571
Session 6: Quality tooling — jsx-a11y, strict TypeScript rules, impor…
claude Feb 9, 2026
0bff575
Session 7: Store separation — extract uiStore from gameStore (ADR-001)
claude Feb 9, 2026
c0ea489
Session 8: Extract vision raycasting module + HomeScreen business log…
claude Feb 9, 2026
c3407ce
Session 9: Extract App.tsx coordination hooks + campaign service
claude Feb 9, 2026
56be961
Session 10: Decompose CanvasManager — extract 4 hooks + DoorContextMenu
claude Feb 10, 2026
1a0934a
Session 11: Performance hardening — code splitting + Konva budget
claude Feb 10, 2026
d6e26e6
Session 12: Accessibility hardening — ARIA live region, keyboard nav,…
claude Feb 10, 2026
4d3d538
Session 13: Test hardening — 151 new tests across 8 test files
claude Feb 10, 2026
08c9d8c
Fix test review issues: DOM cleanup, assertion guards, noise suppression
claude Feb 10, 2026
a1c97d0
Harden test quality: stable mocks, StrictMode resilience, focus tests
claude Feb 10, 2026
101c1d3
Cleanup: remove re-exports, organize docs, update CHANGELOG
claude Feb 10, 2026
179a5da
Session 14: Bug fix & accessibility pass — 10 fixes across 14 files
claude Feb 10, 2026
ec9c2f0
Update docs: fix coverage badge, project structure, line counts
claude Feb 10, 2026
f7a78f3
Address PR #251 review feedback: fix imports, memory leaks, accessibi…
Copilot Feb 10, 2026
8a24eed
Condense CLAUDE.md to <200 lines, archive refactor history to docs/
kocheck Mar 7, 2026
218c906
Fix lint: install eslint-plugin-jsx-a11y, resolve 822 warnings across…
kocheck Mar 7, 2026
10369a7
Simplify: remove debug console.log, fix remaining || → ?? inconsistency
kocheck Mar 7, 2026
7d6e2c1
Fix: surface theme-load failure in HomeScreen instead of silently swa…
kocheck Mar 7, 2026
29889b7
Fix pre-existing silent failures surfaced by PR review
kocheck Mar 7, 2026
a0458a9
Simplify: extract SYNC_ACTION_TYPES to syncUtils, fix remaining quali…
kocheck Mar 7, 2026
fdbe574
chore: update npm
kocheck Mar 7, 2026
cbdd2e4
docs: add TTRPG Swiss design system spec (Var C & D)
kocheck Mar 17, 2026
886aa03
docs: add type safety and resilience design doc
kocheck Mar 17, 2026
2ba3b60
feat: add HexColor and PixelSize branded types with validators
kocheck Mar 17, 2026
43a43fe
fix: tighten HexColor regex to reject 4/5/7-char hex, add rejection t…
kocheck Mar 17, 2026
a9a596b
fix: createGridGeometry warns and falls back on unknown grid type ins…
kocheck Mar 17, 2026
7620678
feat: apply HexColor/PixelSize to Drawing, MapData, and DungeonGenera…
kocheck Mar 17, 2026
f1c4016
feat: apply HexColor/PixelSize to gameStore — validate at campaign lo…
kocheck Mar 17, 2026
f49212c
feat: apply HexColor/PixelSize to useToolState
kocheck Mar 17, 2026
2d57c7c
feat: apply HexColor/PixelSize to CanvasManagerProps
kocheck Mar 17, 2026
ec6c757
feat: apply HexColor/PixelSize to useCanvasInteraction props
kocheck Mar 17, 2026
9e44f05
feat: apply HexColor/PixelSize to DungeonGeneratorDialogProps
kocheck Mar 17, 2026
fdac9ec
feat: apply HexColor to MapSettingsSheet grid color picker
kocheck Mar 17, 2026
7c9e2f0
feat: apply HexColor/PixelSize casts to remaining call sites
kocheck Mar 17, 2026
0c8b31a
docs: add type-safety plan and Var E exploration
kocheck Mar 17, 2026
66dba61
Add canvas performance research: Rive evaluation & PixiJS migration a…
kocheck Mar 17, 2026
7365ec1
docs: add parchment & leather theme redesign design doc
kocheck Mar 17, 2026
3a2a013
Merge branch 'claude/refactor-modular-architecture-GUfVC' of https://…
kocheck Mar 17, 2026
acd497f
docs: add parchment & leather theme implementation plan
kocheck Mar 17, 2026
784756a
feat(theme): install DM Sans, Cormorant Garamond, JetBrains Mono via …
kocheck Mar 17, 2026
0571759
fix(theme): remove @ibm/plex dependency, update Konva fontFamily to D…
kocheck Mar 17, 2026
580c552
feat(theme): add color-parchment and color-leather token files
kocheck Mar 17, 2026
68f6423
fix(theme): add missing home-modal-backdrop and home-card-shadow dark…
kocheck Mar 17, 2026
e1afda5
feat(theme): add color-status and color-canvas token files
kocheck Mar 17, 2026
e93fe6f
fix(theme): add missing dark mode tokens for error boundary and door …
kocheck Mar 17, 2026
fe1d1d4
feat(theme): add typography, spacing, radius, motion token files
kocheck Mar 17, 2026
2c93f20
feat(theme): add paper/leather grain texture and transition files
kocheck Mar 17, 2026
7d2db4a
fix(theme): remove panel box-shadow from grain.css to prevent cascade…
kocheck Mar 17, 2026
3eee5f5
feat(theme): wire modular CSS index, update brand.css, remove old the…
kocheck Mar 17, 2026
c44c835
fix(theme): brand.css overrides --font-* tokens directly, removes --b…
kocheck Mar 17, 2026
9fb7cd7
feat(theme): add button primitive CSS with parchment tokens
kocheck Mar 17, 2026
5656a69
fix(theme): replace hardcoded white in destructive button with token
kocheck Mar 17, 2026
e4359d2
feat(theme): add input primitive CSS with parchment tokens
kocheck Mar 17, 2026
f71f6b9
feat(theme): add card primitive CSS with parchment tokens
kocheck Mar 17, 2026
2da7cca
feat(theme): add dialog primitive CSS, delete old primitives.css
kocheck Mar 17, 2026
58f8cb6
fix(theme): remove hardcoded color fallbacks from dialog primitive
kocheck Mar 17, 2026
266d949
feat(theme): migrate home-screen to modular CSS
kocheck Mar 17, 2026
3707974
fix(theme): apply section label typography to recent-title, use font-…
kocheck Mar 17, 2026
0198081
fix(theme): resolve home-screen CSS quality issues from review
kocheck Mar 17, 2026
4a02dbd
feat(theme): migrate toolbar to modular CSS, add leather toolbar tokens
kocheck Mar 17, 2026
d352b7f
fix(theme): add success-solid-text token, explicit border:none on mod…
kocheck Mar 17, 2026
be7d47e
feat(theme): migrate sidebar to modular CSS
kocheck Mar 17, 2026
62217c1
fix(theme): add sidebar-token active state
kocheck Mar 17, 2026
fa4cfda
feat(theme): add canvas module CSS for themed HTML wrappers
kocheck Mar 17, 2026
00b6713
feat(theme): migrate monitor to modular CSS, add monitor tokens
kocheck Mar 17, 2026
844a025
feat(theme): update Konva *_COLORS consts to parchment/brass palette
kocheck Mar 17, 2026
9e3bcfa
docs: add PixiJS migration design document
kocheck Mar 17, 2026
7b36151
docs: add PixiJS migration implementation plan
kocheck Mar 17, 2026
e662b35
chore: React 19 compatibility audit
kocheck Mar 17, 2026
fdeb676
chore(deps): upgrade React 18 → 19
kocheck Mar 17, 2026
85a0ef2
chore(deps): install pixi.js v8 + @pixi/react v8 + @pixi-essentials/t…
kocheck Mar 17, 2026
c72a54a
chore(lint): add no-konva ESLint rule — Canvas files exempted during …
kocheck Mar 17, 2026
8acdf79
feat(canvas): replace Konva Stage with PixiJS Application scaffold
kocheck Mar 17, 2026
72ca0ba
feat(canvas): add usePixiViewport with pan/zoom-to-cursor and viewpor…
kocheck Mar 17, 2026
92240e4
feat(canvas): map background as PixiJS Sprite with GPU filters
kocheck Mar 17, 2026
fa51204
feat(canvas): rewrite GridOverlay with PixiJS Graphics + buildGridGeo…
kocheck Mar 17, 2026
1a58407
feat(canvas): rewrite PaperNoiseOverlay with PixiJS TilingSprite
kocheck Mar 17, 2026
c3d0005
feat(canvas): token rendering as PixiJS Sprites with texture deduplic…
kocheck Mar 17, 2026
2883d10
fix(canvas): fix sprite leak + stale container race + test isolation …
kocheck Mar 17, 2026
4b50b69
feat(canvas): rewrite useTokenDrag with FederatedPointerEvent + snap …
kocheck Mar 17, 2026
73b100c
feat(canvas): rewrite useCanvasSelection with PixiJS types + rectsOve…
kocheck Mar 17, 2026
f735940
feat(canvas): add @pixi-essentials/transformer for token resize/rotate
kocheck Mar 17, 2026
98277a6
feat(fog): fog shader uniform calculation utilities with tests
kocheck Mar 17, 2026
26c7344
feat(fog): GLSL fragment shader for GPU fog of war + Vite GLSL plugin
kocheck Mar 17, 2026
46d8948
feat(fog): FogOfWarFilter — PixiJS Filter wrapping GLSL fog shader
kocheck Mar 17, 2026
d7ca2fa
feat(fog): FogOfWarLayer with GLSL shader — GPU-accelerated fog of war
kocheck Mar 17, 2026
9d22ae6
feat(drawing): stroke vertex buffer geometry utilities with tests
kocheck Mar 17, 2026
a5c0976
feat(drawing): PressureSensitiveLine as PixiJS Mesh with dynamic geom…
kocheck Mar 17, 2026
10907c6
feat(drawing): DrawingLayer + useCanvasDrawing Konva type removal
kocheck Mar 17, 2026
e26476f
feat(phase5): migrate DoorLayer to PixiJS imperative Graphics (Task 5.1)
kocheck Mar 17, 2026
5823808
feat(phase5): migrate StairsLayer to PixiJS imperative Graphics (Task…
kocheck Mar 17, 2026
b001c66
feat(canvas): migrate MeasurementOverlay and MovementRangeOverlay to …
kocheck Mar 17, 2026
2c099bd
fix(canvas): extract parseRgba util, fix hex regex, add named export …
kocheck Mar 17, 2026
a1ec957
feat(canvas): remove all Konva imports, uninstall konva + react-konva…
kocheck Mar 18, 2026
5e70f69
fix(lint): resolve all lint warnings, clean stale TODOs from CanvasMa…
kocheck Mar 18, 2026
f0e786d
refactor(canvas): simplify — extract usePixiContainer, clearContainer…
kocheck Mar 18, 2026
34027c2
perf(StairsLayer): keyed-Map incremental add/remove (no full rebuild)
kocheck Mar 18, 2026
928a2db
fix(StairsLayer): add worldContainer dep to stairs effect, remove sta…
kocheck Mar 18, 2026
0087418
perf(DoorLayer): keyed-Map incremental update (skip unchanged doors)
kocheck Mar 18, 2026
a452cf1
perf(PressureSensitiveLine): split shader/geometry effects to avoid s…
kocheck Mar 18, 2026
e7e9e4b
fix(PressureSensitiveLine): destroy old shader in Effect 1 cleanup to…
kocheck Mar 18, 2026
3af6c20
docs: add incremental redraw implementation plan
kocheck Mar 18, 2026
ba55d02
Bump flatted and tar in package-lock.json
kocheck Mar 18, 2026
95f42c8
fix(TokenLayer): remove @pixi-essentials/transformer to fix dev white…
kocheck Mar 18, 2026
167e986
chore(lint): ban @pixi-essentials/transformer import (crashes Vite ES…
kocheck Mar 18, 2026
70b7f48
chore(deps): uninstall @pixi-essentials/transformer (unused, PixiJS v…
kocheck Mar 18, 2026
7a1cc06
docs: add data model design spec for clean-slate rewrite
kocheck Mar 18, 2026
ab787c1
docs: update data model spec with reviewer fixes
kocheck Mar 19, 2026
023addb
docs: finalize data model implementation plan
kocheck Mar 19, 2026
3291107
feat(types): add primitives.ts with branded scalars and entity ID types
kocheck Mar 19, 2026
f392b38
feat(types): add entities.ts with normalized entity interfaces
kocheck Mar 19, 2026
0b95b6e
docs(types): add JSDoc to MapConfig and ExploredRegion
kocheck Mar 19, 2026
6cfdd73
feat(types): add store.ts with normalized GameStore shape
kocheck Mar 19, 2026
f90ae9a
refactor(types): convert domain.ts to backward-compat shim; add depre…
kocheck Mar 19, 2026
f8e11da
feat(types): add player-view.ts with derivePlayerView and filterVisible
kocheck Mar 19, 2026
0c54fa7
feat(types): add features.ts with FeatureFlags and defaults
kocheck Mar 19, 2026
2f76b0a
feat(types): add migrations.ts with migrateCampaign and v0→v1 migration
kocheck Mar 19, 2026
367cc45
test(migrations): add coverage for drawings and doors migration helpers
kocheck Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 110 additions & 9 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
'plugin:react-hooks/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: [
Expand Down Expand Up @@ -83,8 +84,7 @@ module.exports = {
],

// Disallow 'any' type - forces explicit typing
// TODO: Upgrade to 'error' after migrating existing 'any' types
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-explicit-any': 'error',

// Require type annotations for function parameters
'@typescript-eslint/no-inferrable-types': 'off',
Expand All @@ -100,8 +100,7 @@ module.exports = {
'@typescript-eslint/require-await': 'error',

// No misused promises (e.g., in conditionals)
// TODO: Upgrade to 'error' after wrapping async event handlers
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-misused-promises': 'error',

// Enforce consistent type imports
'@typescript-eslint/consistent-type-imports': [
Expand All @@ -122,14 +121,13 @@ module.exports = {
],

// No unsafe member access
// TODO: Upgrade to 'error' after adding proper types to JSON parsing and IPC calls
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'error',

// No unsafe calls
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-call': 'error',

// No unsafe assignment
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'error',

// No unsafe return
'@typescript-eslint/no-unsafe-return': 'warn',
Expand Down Expand Up @@ -255,9 +253,78 @@ module.exports = {
// No cycle dependencies
'import/no-cycle': ['error', { maxDepth: 3, ignoreExternal: true }],

// Enforce PixiJS migration — no Konva imports allowed after migration
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'konva',
message: 'Konva has been replaced with PixiJS. Use pixi.js instead.',
},
{
name: 'react-konva',
message: 'react-konva has been replaced with @pixi/react. Use pixi.js/@pixi/react instead.',
},
{
name: '@pixi-essentials/transformer',
message:
'This package targets PixiJS v6 and uses dynamic require("url") which crashes Vite ESM renderer. Use a PixiJS v8-native solution instead.',
},
],
patterns: [
{
group: ['konva/*', 'konva/lib/*'],
message: 'Konva has been replaced with PixiJS.',
},
],
},
],

// No self imports
'import/no-self-import': 'error',

// ==========================================
// Module Boundary Enforcement
// ==========================================
// See CLAUDE.md "Design System Contract" for boundary rules.
'import/no-restricted-paths': [
'error',
{
zones: [
// Primitives cannot import from store or services
{
target: './src/components/primitives',
from: './src/store',
message: 'Primitives must not import from store (Design System Contract)',
},
{
target: './src/components/primitives',
from: './src/services',
message: 'Primitives must not import from services (Design System Contract)',
},
// Store cannot import from components
{
target: './src/store',
from: './src/components',
message: 'Store must not import from components (Design System Contract)',
},
// Services cannot import from components or store
{
target: './src/services',
from: './src/components',
message: 'Services must not import from components (Design System Contract)',
},
// Utils cannot import from React components
{
target: './src/utils',
from: './src/components',
message: 'Utils must not import from components (Design System Contract)',
},
],
},
],

// ==========================================
// React Specific Rules
// ==========================================
Expand Down Expand Up @@ -307,6 +374,13 @@ module.exports = {
},
],

// ==========================================
// Accessibility (jsx-a11y) Overrides
// ==========================================

// autoFocus is intentional within dialogs and search inputs (WCAG dialog pattern)
'jsx-a11y/no-autofocus': 'warn',

// ==========================================
// Code Style & Best Practices
// ==========================================
Expand Down Expand Up @@ -465,11 +539,38 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'off',
},
},
// Main entry points can have console
// Electron main process — system boundary with many untyped Electron/Node APIs
{
files: ['electron/main.ts', 'electron/preload.ts'],
rules: {
'no-console': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
// Files with deep typing issues scheduled for refactoring in later sessions.
// SyncManager: Session 7 (store separation) + Session 9 (campaign service)
// CanvasManager: Session 10 (decomposition)
// ResourceMonitor: needs typed browser API wrappers
// ImageCropper: needs typed canvas API wrappers
{
files: [
'src/components/Managers/SyncManager.tsx',
'src/components/Canvas/CanvasManager.tsx',
'src/components/ResourceMonitor.tsx',
'src/components/Dialogs/ImageCropper.tsx',
],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
},
},
// Allow looser rules in docs/examples
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ dist-web
release
dist-electron

# Test Coverage
coverage

# Playwright
playwright-report
test-results
Expand Down
Loading
Loading