ui/phase-17: ship-class CRUD without calc

Phase 17 lights up the ship-class table and designer active views,
extends the order-draft pipeline with createShipClass and
removeShipClass commands, and projects pending Save/Delete actions
through applyOrderOverlay so the table reflects the player's
intent before auto-sync lands. The plan is corrected in the same
patch: per game/rules.txt, ship classes are designed once and
cannot be edited — the engine has no Update command, so the UI
exposes only Create + Delete.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-09 21:44:21 +02:00
parent 8a236bef14
commit 785c3483f8
23 changed files with 2456 additions and 99 deletions
+22 -10
View File
@@ -1,11 +1,15 @@
<!--
Phase 10 stub for the entity-table active view. Phase 11+ wires real
list data per entity (planets in Phase 11, ship-classes in Phase 17,
etc.). Until then, the stub renders the localised entity title plus a
`coming soon` body so navigation can be exercised end-to-end.
Active-view router for the per-entity tables. Phase 17 lights up
the ship-classes table; the other slugs (planets, ship-groups,
fleets, sciences, races) keep the Phase 10 stub copy until their
respective phases land. The wrapper preserves
`data-testid="active-view-table"` and `data-entity={entity}` for
both branches so the navigation e2e specs (`game-shell.spec.ts`,
`view-menu`) keep matching.
-->
<script lang="ts">
import { i18n, type TranslationKey } from "$lib/i18n/index.svelte";
import TableShipClasses from "./table-ship-classes.svelte";
type Props = { entity: string };
let { entity }: Props = $props();
@@ -16,12 +20,20 @@ etc.). Until then, the stub renders the localised entity title plus a
}
</script>
<section class="active-view" data-testid="active-view-table" data-entity={entity}>
<h2>
{i18n.t("game.view.table")}: {i18n.t(entityKey(entity))}
</h2>
<p>{i18n.t("game.shell.coming_soon")}</p>
</section>
{#if entity === "ship-classes"}
<TableShipClasses />
{:else}
<section
class="active-view"
data-testid="active-view-table"
data-entity={entity}
>
<h2>
{i18n.t("game.view.table")}: {i18n.t(entityKey(entity))}
</h2>
<p>{i18n.t("game.shell.coming_soon")}</p>
</section>
{/if}
<style>
.active-view {