Frontend/backend migration → TS · PixiJS · React · Zustand: remaining work (retire app.js, Postgres, art pass) #44
Labels
No labels
bug
campaign-editor-ui
dependencies
design
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
javascript
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/chess-tactics#44
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Handoff for the architecture migration. Phases 0–4 + a React main-menu are done and live-validated on draft PR #42 (branch
tank/session/930/chess-tactics). This issue tracks what's left, with enough context for a fresh session to drive it.Architecture (decided — see PR #42 history for the rationale)
frontend/src/core/)frontend/src/render/)frontend/src/ui/)frontend/src/game,/editor,/campaign)frontend/src/core/level.ts)body). (backend/server.js)app.jsstill runs untouched; new surfaces are React islands mounted byapp.js's router.Done (live on PR #42)
Routes:
/menu-next(React hub) →/play(skirmish: Pixi board + React HUD on the core),/edit(level editor: paint terrain/elevation/units, undo/redo, Save/Publish/Load),/campaigns-next(campaign editor: CRUD + Save)./= original game, untouched.Gate: 44 vitest tests,
tsc --noEmitclean, Vite build code-splits each surface, Docker image CI-green, zero console errors on every surface.Remaining
1. Retire
app.js(biggest, highest-risk — do incrementally)app.js's string-HTML router./, lobbies, settings, the design catalog/glossary/widgets surfaces.app.js(superseded by/play,/edit,/campaigns-next); finally removeapp.js.2. Postgres persistence (currently file-backed under
/var/run)k8s/+ ArgoCD.pgtobackend; schema = relational tables (users, level metadata, campaigns, level refs, ratings, lobbies) + ajsonbbodycolumn for the level/campaign documents.backend/server.js(readLevelStore/writeLevelStore,readCampaignWorkspace/writeCampaignWorkspace) fromfsto the DB. Same documents — no API/client change.3. Persistence hardening
/api/levelsand/api/campaign-workspacewrites (currently unauthed; mirror the existing/api/campaignsauth).listLevels)./api/campaigns(old level format) or migrate that format to the new schema.4. Game depth toward the concepts
Concepts (
docs/art/ui-screen-concepts/,docs/ui-art-direction.md) call for Into-the-Breach-style tactics: HP, action points, economy (CP/funds/income), telegraphed enemy queued attacks shown a turn ahead (the signature mechanic), terrain effects (elevation/water/cliffs on movement), per-objective win conditions. The current core is chess-movement + capture + last-side-standing.5. Art pass (chess-tactics style)
frontend/scripts/normalize-*.mjspipeline; nearest-neighbor, integer scaling, texture atlases,devicePixelContentBoxfor crispness).SkirmishBoard/EditorBoard).--ds-*design tokens to the art.How to work (operational notes)
tank/session/930/chess-tactics, draft PR #42.restricted_git— commits auto-publish to the PR; no direct push tomain;git merge origin/mainwhen main advances (it recently picked up the BGM feature; resolved ine444ab5).npm --prefix frontend run check(node --check + bgm checks + vitest + tsc) and... run build(Vite). Tests = vitest.backend/server.js; file stores at/var/run/chess-tactics-*.json.playwright-coredirectly to the slot's Playwright server (ws://slot-playwright.<slot>.svc.cluster.local:3000) to click/drive/screenshot — the inspect-only tool can't click. Hot-swap: frontendkubectl cp frontend/dist/. <pod>:/var/run/chess-tactics-static-override; backendkubectl cp backend/server.js <pod>:/var/run/chess-tactics-hot/server.jsthenkill -HUP 1. Slots churn ~30–40 min; extend the lease.docker-build-check.yamlauto-trigger has been flaky on rapid commits — dispatch it manually (workflow_dispatch,git_refinput) to validate the image build.Key files
frontend/src/core/{types,rng,rules,level,index}.ts(+*.test.ts)frontend/src/game/{setup,store}.tsfrontend/src/render/{iso,SkirmishBoard,EditorBoard}.{ts,tsx}frontend/src/editor/store.ts,frontend/src/campaign/store.tsfrontend/src/ui/*(Skirmish,LevelEditor,CampaignEditor,MainMenu+*Mount.tsx)frontend/src/net/{levels,campaignWorkspace}.tsbackend/server.js(/api/levels,/api/campaign-workspace)frontend/src/app.jsRecommended order: 1 (retire app.js) and 2 (Postgres) unblock the cleanest end-state; 4/5 (game depth + art) are the product-facing payoff and are now low-friction on this stack.