ui/phase-21: sciences CRUD list, designer, and production-picker integration

Lights up the player-defined sciences feature: a table view with sort
and filter, a designer with four percent inputs and a strict
sum-equals-100 gate, and a Research-sub-row integration so the
planet production picker lists the user's sciences alongside the
four tech buttons. Phase 21 decisions are baked back into ui/PLAN.md
(no UpdateScience on the wire — write-once via createScience +
removeScience; percentages instead of fractions; sciences live under
the existing Research segment).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-10 21:32:37 +02:00
parent 0509f2cde2
commit 7bea22b0b5
31 changed files with 2751 additions and 71 deletions
@@ -1,8 +1,8 @@
// EMPTY_SHIP_GROUPS supplies empty arrays for the five ship-group /
// fleet fields added to GameReport in Phase 19. Test fixtures spread
// it into their report objects so the fixture body still focuses on
// the fields under test, without forcing every spec to enumerate
// the full GameReport surface.
// EMPTY_SHIP_GROUPS supplies empty arrays for the ancillary report
// fields added in Phase 19 (ship-groups + fleets) and Phase 21
// (sciences). Test fixtures spread it into their report objects so
// the fixture body still focuses on the fields under test, without
// forcing every spec to enumerate the full GameReport surface.
import type {
ReportIncomingShipGroup,
@@ -10,6 +10,7 @@ import type {
ReportLocalShipGroup,
ReportOtherShipGroup,
ReportUnidentifiedShipGroup,
ScienceSummary,
} from "../../src/api/game-state";
export const EMPTY_SHIP_GROUPS: {
@@ -19,6 +20,7 @@ export const EMPTY_SHIP_GROUPS: {
unidentifiedShipGroups: ReportUnidentifiedShipGroup[];
localFleets: ReportLocalFleet[];
otherRaces: string[];
localScience: ScienceSummary[];
} = {
localShipGroups: [],
otherShipGroups: [],
@@ -26,4 +28,5 @@ export const EMPTY_SHIP_GROUPS: {
unidentifiedShipGroups: [],
localFleets: [],
otherRaces: [],
localScience: [],
};