feat(ui): Phase 30 ship-class calculator with goal-seek and reach circles
Fuse the standalone ship-class designer (Phases 17/18) into a sidebar calculator: live mass/speed/attack/defence/bombing results, a planet build-rate readout, single-target goal-seek, a modernization-cost mode, and auto reach circles on the map for the selected planet. pkg/calc becomes the single source for the new math (no mirroring): extract BombingPower from the engine model and the per-turn ship-production loop from controller.ProduceShip into pkg/calc (engine now delegates), and add inverse goal-seek solvers in pkg/calc/solve.go. Thin-bridge the combat, planet-build, and solver functions through ui/core/calc + ui/wasm and rebuild core.wasm. Remove the standalone designer view/route; the ship-classes table and the view/bottom menus open the calculator via a shared request store. Docs: rewrite ui/PLAN.md Phase 30, adjust Phase 34 (realistic forecast + CAP/COL ownership), add ui/docs/calculator-ux.md, extend calc-bridge.md, fix navigation.md; remove ui/CALCULATOR.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
// stub renders the localised view title plus the `coming soon` body
|
||||
// copy and exposes a stable `data-testid` so later phases can replace
|
||||
// the content without renaming the test hook. Phase 17 lit up the
|
||||
// ship-classes table and the ship-class designer; Phase 21 lit up
|
||||
// the sciences table and the science designer. Their assertions
|
||||
// moved to dedicated suites (`table-ship-classes.test.ts`,
|
||||
// `designer-ship-class.test.ts`, `table-sciences.test.ts`,
|
||||
// `designer-science.test.ts`); the `table.svelte` router still falls
|
||||
// ship-classes table (Phase 30 folded the designer into the sidebar
|
||||
// calculator); Phase 21 lit up the sciences table and the science
|
||||
// designer. Their assertions moved to dedicated suites
|
||||
// (`table-ship-classes.test.ts`, `calculator-tab.test.ts`,
|
||||
// `table-sciences.test.ts`, `designer-science.test.ts`); the
|
||||
// `table.svelte` router still falls
|
||||
// back to the stub for the remaining entities (planets, ship-groups,
|
||||
// fleets, races) and that fallback is exercised here.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user