feat(ui): F8-10 — tables planets / ship-groups / fleets, ship-classes delete guard (#53) #68

Merged
developer merged 2 commits from feature/issue-53-table-planets-groups-fleets into development 2026-05-27 19:28:09 +00:00
Owner

Closes #53.

Lights up three previously-stubbed table active views and tightens the existing one:

  • planets — 4 kind checkboxes (own / foreign / uninhabited / unknown) + race dropdown for the foreign slice; row click selects + centres the planet on the map.
  • ship-groups — local + foreign in one grid; owner checkboxes, planet dropdown (destination OR origin), class dropdown; on-planet click focuses the destination planet, in-space click focuses the ship group itself (camera centres on the interpolated position).
  • fleets — own fleets only with shared planet dropdown; on-planet click focuses the planet, in-space click centres camera on the interpolated fleet position without altering selection.
  • ship-classes — per-row Delete is disabled with a count tooltip while at least one local ship group references the class.

The click → map flow goes through a new transient SelectionStore.focus / focusPoint channel that map.svelte consumes once on mount — in-memory only, so an F5 does not re-centre.

Test plan

  • pnpm check — 0 errors / 0 warnings.
  • pnpm test — 854 tests passing (new units for selection store, planets / ship-groups / fleets tables; extended ship-classes test for the delete guard).
  • pnpm test:e2e tables.spec.ts (gitea integration job).
  • gitea go-unit, ui-test, integration green.
Closes #53. Lights up three previously-stubbed `table` active views and tightens the existing one: - **planets** — 4 kind checkboxes (own / foreign / uninhabited / unknown) + race dropdown for the foreign slice; row click selects + centres the planet on the map. - **ship-groups** — local + foreign in one grid; owner checkboxes, planet dropdown (destination OR origin), class dropdown; on-planet click focuses the destination planet, in-space click focuses the ship group itself (camera centres on the interpolated position). - **fleets** — own fleets only with shared planet dropdown; on-planet click focuses the planet, in-space click centres camera on the interpolated fleet position without altering selection. - **ship-classes** — per-row Delete is disabled with a count tooltip while at least one local ship group references the class. The click → map flow goes through a new transient `SelectionStore.focus / focusPoint` channel that `map.svelte` consumes once on mount — in-memory only, so an F5 does not re-centre. ## Test plan - [x] `pnpm check` — 0 errors / 0 warnings. - [x] `pnpm test` — 854 tests passing (new units for selection store, planets / ship-groups / fleets tables; extended ship-classes test for the delete guard). - [ ] `pnpm test:e2e tables.spec.ts` (gitea integration job). - [ ] gitea `go-unit`, `ui-test`, `integration` green.
developer added 1 commit 2026-05-27 18:36:18 +00:00
feat(ui): F8-10 — tables planets / ship-groups / fleets, ship-classes delete guard (#53)
Tests · UI / test (push) Waiting to run
Tests · UI / test (pull_request) Successful in 2m45s
80ed11e3b6
Lights up three previously-stubbed table active views and tightens the
existing one:

  - table-planets: 4 kind checkboxes (own / foreign / uninhabited /
    unknown) + race dropdown that filters the foreign slice; row click
    selects + centres the planet on the map.
  - table-ship-groups: local + foreign groups in one grid, owner
    checkboxes, planet dropdown (destination OR origin), class
    dropdown; on-planet click focuses the destination planet, in-space
    click focuses the ship group itself (camera follows interpolated
    position).
  - table-fleets: own fleets only with the shared planet dropdown;
    on-planet click focuses the planet, in-space click centres the
    camera on the interpolated fleet position without altering the
    selection (no fleet variant in Selected).
  - table-ship-classes: per-row Delete is disabled with a count tooltip
    while at least one local ship group references the class. The
    engine refuses the removal anyway; the UI pre-empts the surface.

Wires the click → map flow through a transient `SelectionStore.focus`
/ `focusPoint` channel that `map.svelte` consumes once on mount —
in-memory only, so an F5 does not re-centre.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
developer added 1 commit 2026-05-27 19:18:19 +00:00
fix(ui): F8-10 owner-feedback — persistent filters, camera, disabled visual, dropdown narrowing (#53)
Tests · UI / test (push) Has been cancelled
Tests · UI / test (pull_request) Successful in 2m53s
8e552f556d
Polish pass after the first F8-10 walkthrough:

  - table-planets: moved the `foreign` chip to the end of the row and
    hid the race dropdown until `foreign` is on (it never made sense
    to pick a race while the bucket itself was off).
  - persistent per-table filter / sort state — extracted to
    `table-{planets,ship-groups,fleets}-state.svelte.ts` singletons so
    a row click → map → back to the table restores the prior chip /
    dropdown / sort state. Held in memory only; an F5 still resets.
  - table-ship-groups: the planet and class dropdowns now narrow to
    the slice surviving the owner checkboxes, so toggling `foreign`
    off removes planets / classes touched only by foreign rows.
  - map.svelte: camera (centre + zoom) is captured on every dispose
    path into a new `GameStateStore.lastCamera` and consumed on the
    next mount, so leaving the map for any other active view and
    coming back restores the prior pan / zoom. A pending focus from
    the tables still wins for the centre point.
  - table-ship-classes: `:disabled` now reads as disabled (muted
    colour, no hover ring, not-allowed cursor) — the click was already
    a no-op, only the visual was lying.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
owner approved these changes 2026-05-27 19:27:33 +00:00
developer merged commit e4fbb6644c into development 2026-05-27 19:28:09 +00:00
developer deleted branch feature/issue-53-table-planets-groups-fleets 2026-05-27 19:28:09 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/galaxy-game#68