Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
31421da
create gm.selectors.ts, extract faction options from GalaxyMap.tsx
dobettertech Nov 17, 2025
c5ddbf8
create gm.interactions.ts, extract getDistance from GalaxyMap.tsx
dobettertech Nov 17, 2025
12dca85
create unit tests, ran and passed
dobettertech Nov 17, 2025
34e16b4
extract viewport zoom/pan logic into hook
dobettertech Feb 4, 2026
1758ec5
extract pinch/zoom into hook
dobettertech Feb 12, 2026
c1f2176
implement system state API and damage level, feed to tooltip (for now)
dobettertech Feb 21, 2026
065803f
reformat tooltip
dobettertech Feb 21, 2026
60a8400
tooltip viewport sizing fix
dobettertech Feb 21, 2026
2f6c0b6
tooltip location tweaks
dobettertech Feb 22, 2026
1ff3a48
mobile tooltip rework
dobettertech Feb 22, 2026
431d9c7
desktop tooltip rework
dobettertech Feb 22, 2026
467323b
mobile pinch to zoom performance tweaks
dobettertech Feb 23, 2026
a0842e9
change to active player graphic effect (now halo)
dobettertech Feb 24, 2026
807fa74
active player halo size increase
dobettertech Feb 24, 2026
0dc0000
implement test states
dobettertech Feb 24, 2026
439a4f5
Increase insurrecction graphical effect
dobettertech Feb 26, 2026
c2c3afb
Increase purple halo pulse, remove system pulse
dobettertech Feb 26, 2026
30966c3
Fix URL path issues
dobettertech Mar 8, 2026
452c613
Hold the line graphic
dobettertech Mar 9, 2026
350ea3e
Capture event graphic
dobettertech Mar 10, 2026
d97dde1
Comments cleanup
dobettertech Mar 11, 2026
2a19e09
fix: stabilize GalaxyMap data refresh flow and improve robustness
dobettertech Mar 20, 2026
aca800c
security patches
dobettertech Mar 20, 2026
eba39d0
test(rig): stand up Vitest + RTL + jsdom test platform
nx-thaddeusaid Apr 23, 2026
97a4a51
test: add adjacent Vitest suites for all audited source files
nx-thaddeusaid Apr 23, 2026
ac5f5b2
test(rig): wire @vitest/coverage-v8 so test:coverage produces real nu…
nx-thaddeusaid Apr 23, 2026
a0c5fa6
ci: add GitHub Actions workflow for Vitest suite
nx-thaddeusaid Apr 23, 2026
d6fe04d
refactor(map): extract inline helpers so map logic is deep-testable
nx-thaddeusaid Apr 23, 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
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_APP_OUTPUT_DEBUG=true
VITE_APP_APP_TITLE=RogueTech (Dev)
VITE_APP_APP_TITLE=RogueTech (Dev)
VITE_ENABLE_STATE_TEST=true
4 changes: 3 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# .env.production
VITE_APP_OUTPUT_DEBUG=false
VITE_APP_APP_TITLE=RogueTech
VITE_APP_APP_TITLE=RogueTech
VITE_BASE_URL=/
VITE_ENABLE_STATE_TEST=true
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
push:
branches: [main, test-platform]
pull_request:
branches: [main]

jobs:
test:
name: Vitest (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['20', '22']

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Typecheck test sources
run: npx tsc -p tsconfig.vitest.json --noEmit

- name: Run tests with coverage
run: yarn test:coverage

- name: Upload coverage report
if: matrix.node == '20'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
retention-days: 14
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dist
dist-ssr
*.local

# Coverage output from @vitest/coverage-v8
coverage

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
30 changes: 30 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Project Context & Agent Role

You are an expert AI software engineer collaborating on a React + Vite codebase. We are currently embarking on a dedicated session to build a functioning, industry-standard test platform (test rig) for the project.

## Primary Goal
Establish a working test rig and implement comprehensive tests for all functionality currently present in the repository. The rig must load correctly and provide standard, readable output to the developer.

## Rules and Constraints

You must strictly adhere to the following workflow, architectural, and interaction constraints throughout our session:

### 1. Git & Workflow
* **Branching Strategy:** You must create and switch to a new branch named `test-platform`. This branch must be created specifically from the base commit hash: `aca800c1d19cd842f872239dc16e8a1c5051bfa2`.
* **Initial Audit:** Before writing any test configurations or test cases, you must analyze the current repository state to identify and list all existing components, hooks, and utilities that require test coverage.

### 2. Testing Framework & Tooling
* **Vite Integration:** Because this is a Vite project, you must implement **Vitest** (along with React Testing Library) rather than Jest. Do not introduce Jest, as it requires redundant configuration that conflicts with Vite's build pipeline.
* **Coverage Mandate:** You must write tests for *all* identified existing functionality in the codebase. Do not leave placeholder comments like `// TODO: add tests for X`.
* **File Naming & Structure:** Test files must strictly follow industry-standard naming conventions (e.g., `[filename].test.jsx` or `[filename].test.tsx`) and be placed adjacently to the files they are testing.

### 3. Documentation & Logging
* **Decision Log:** You must create and continuously update a markdown file located exactly at `model/log.md`.
* **Log Contents:** For every significant action (e.g., configuring the test runner, mocking a provider, handling a complex component test), you must log:
1. The action taken.
2. The alternative choices considered.
3. The specific technical reasoning for why you made your choice.

### 4. Interaction Protocol
* **Three Options & A Recommendation:** Every time you complete a task, present a result, or need user direction, you must explicitly present exactly **3 distinct options** for how to move forward.
* Immediately following those 3 options, you must provide **1 specific recommendation** from among those choices, explaining why it is the best path forward.
431 changes: 431 additions & 0 deletions model/log.md

Large diffs are not rendered by default.

25 changes: 20 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@material-tailwind/react": "^2.1.10",
"axios": "^1.13.2",
"axios": "^1.13.5",
"konva": "^9.3.18",
"localforage": "^1.10.0",
"lucide-react": "^0.515.0",
Expand All @@ -22,30 +25,42 @@
"react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-konva": "18",
"react-router-dom": "^6.26.2",
"react-router-dom": "^6.30.3",
"react-select": "^5.10.1",
"swr": "^2.2.5"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^24.10.0",
"@types/react": "18.2.42",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/coverage-v8": "4.0.8",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"jsdom": "^29.0.2",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"typescript": "^5.9.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1",
"vite": "^8.0.1",
"vitest": "^4.0.8"
},
"resolutions": {
"esbuild": "0.27.0"
"minimatch": "^3.1.3",
"rollup": "^4.59.0",
"ajv": "6.14.0",
"flatted": "3.4.2",
"@remix-run/router": "1.23.2",
"react-router": "6.30.3",
"glob": "^10.5.0"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading