v0.69.0 Remove job ignore feature #146

Merged
kamilkrzywda merged 1 commits from chore/remove-job-ignore into master 2026-09-24 00:16:58 +02:00
Owner

Removes the "ignore job" feature (v0.29.0, ISS-047 part B) end-to-end — user decision: not needed for multiplayer. Packages can now only be loaded, delivered, expired, or abandoned.

Changes

  • UI (components/RightPane.tsx): the Ignore button on open-job rows is gone (accept/dispatch row otherwise untouched).
  • API: app/api/packages/[id]/ignore/route.ts deleted; OpenAPI spec drops the path and 'ignored' from the PackageState status enum — twelve endpoints now.
  • Action (lib/game/actions.ts): ignorePackage deleted.
  • Schema (lib/db/schema.ts): 'ignored' removed from the package status text enum (open/loaded/delivered/expired/abandoned remain); slotFreeAtRealMs comment now says "loaded". Same removal in the snapshot type (lib/game/state.ts) and OpenAPI.
  • Legacy rows self-heal: production SQLite already contains status='ignored' rows that nothing ever cleaned up. expireOpenPackages (lib/sim/engine.ts) now selects IN ('open','ignored') (raw SQL — the value is no longer in the typed enum) and flips any row past createdRealMs + JOB_LIFETIME_MS to 'expired', so every legacy row heals on the first tick after deploy; no new ones can ever be created. Reads before that tick are safe: Drizzle does no runtime validation, nothing renders a non-open/loaded/expired package, and /api/state ticks first anyway.
  • Stale comments updated in lib/game/seed.ts, lib/sim/engine.ts, lib/game/state.ts, e2e/events.spec.ts.

Tests

  • Unit: ignorePackage suite deleted; terminal-status fixtures drop their redundant 'ignored' rows (delivered/abandoned already cover "terminal never flips"); the frozen-top-up drain now flips to 'expired' mirroring expireOpenPackages; the taken-slot cooldown ladder keeps two stamped slots, both 'loaded'.
  • E2E: the Ignore UI test deleted; sim.spec.ts's soft-lock regression drains via the existing /api/test/expire-package hook (loading can't drain a pool — the starter's payload fits only the lightest band of the 10-job pool) and expiry.spec.ts cleans up its created packages through the same hook. OpenAPI endpoint count thirteen → twelve everywhere asserted.
  • Verified locally per AGENTS.md: tsc --noEmit clean, vitest run 382/382 green, playwright test --list compiles (63 tests / 16 files). Full e2e runs in CI only.

Version bumped to 0.69.0 (package.json) with a CHANGELOG entry.

Removes the "ignore job" feature (v0.29.0, ISS-047 part B) end-to-end — user decision: not needed for multiplayer. Packages can now only be loaded, delivered, expired, or abandoned. ## Changes - **UI** (`components/RightPane.tsx`): the Ignore button on open-job rows is gone (accept/dispatch row otherwise untouched). - **API**: `app/api/packages/[id]/ignore/route.ts` deleted; OpenAPI spec drops the path and `'ignored'` from the PackageState status enum — twelve endpoints now. - **Action** (`lib/game/actions.ts`): `ignorePackage` deleted. - **Schema** (`lib/db/schema.ts`): `'ignored'` removed from the package status text enum (open/loaded/delivered/expired/abandoned remain); `slotFreeAtRealMs` comment now says "loaded". Same removal in the snapshot type (`lib/game/state.ts`) and OpenAPI. - **Legacy rows self-heal**: production SQLite already contains `status='ignored'` rows that nothing ever cleaned up. `expireOpenPackages` (`lib/sim/engine.ts`) now selects `IN ('open','ignored')` (raw SQL — the value is no longer in the typed enum) and flips any row past `createdRealMs + JOB_LIFETIME_MS` to `'expired'`, so every legacy row heals on the first tick after deploy; no new ones can ever be created. Reads before that tick are safe: Drizzle does no runtime validation, nothing renders a non-open/loaded/expired package, and `/api/state` ticks first anyway. - **Stale comments** updated in `lib/game/seed.ts`, `lib/sim/engine.ts`, `lib/game/state.ts`, `e2e/events.spec.ts`. ## Tests - Unit: `ignorePackage` suite deleted; terminal-status fixtures drop their redundant `'ignored'` rows (delivered/abandoned already cover "terminal never flips"); the frozen-top-up drain now flips to `'expired'` mirroring `expireOpenPackages`; the taken-slot cooldown ladder keeps two stamped slots, both `'loaded'`. - E2E: the Ignore UI test deleted; `sim.spec.ts`'s soft-lock regression drains via the existing `/api/test/expire-package` hook (loading can't drain a pool — the starter's payload fits only the lightest band of the 10-job pool) and `expiry.spec.ts` cleans up its created packages through the same hook. OpenAPI endpoint count thirteen → twelve everywhere asserted. - Verified locally per AGENTS.md: `tsc --noEmit` clean, `vitest run` 382/382 green, `playwright test --list` compiles (63 tests / 16 files). Full e2e runs in CI only. Version bumped to **0.69.0** (`package.json`) with a CHANGELOG entry.
kamilkrzywda added 1 commit 2026-09-24 00:02:26 +02:00
v0.69.0: remove job ignore feature
CI / build + unit + e2e (pull_request) Successful in 14m31s
d2defe4cd3
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-24 00:16:44 +02:00
kamilkrzywda merged commit 78961fdb36 into master 2026-09-24 00:16:58 +02:00
Sign in to join this conversation.