Commit Graph
39 Commits
Author SHA1 Message Date
kamilkrzywda 03b8b661f6 feat(api): ship + research endpoints queue tasks with lead + helpers; mission accept is instant and free (#44)
CI / build + unit + e2e (pull_request) Failing after 3m58s
2026-10-02 18:36:14 +00:00
kamilkrzywda 4e312d054f feat(api): jump + explore endpoints queue tasks with lead + helpers instead of resolving instantly (#44) 2026-10-02 15:47:31 +00:00
kamilkrzywda d7faf739a9 feat(game): tickTurn + runTurn — the turn tick: decrement, resolve, FIFO auto-start, one turn per call (#44) 2026-10-02 14:30:49 +00:00
kamilkrzywda bbcd77c41b feat(game): per-type resolvers — jump/explore/ship/research effect extraction for task resolution (#44) 2026-10-02 13:55:32 +00:00
kamilkrzywda d4491e082e feat(game): queueTask — queue-time validation, cost deduction, ACTIVE/PENDING row (#44) 2026-10-02 13:25:25 +00:00
kamilkrzywda 6c51c3cec8 feat(game): tasks table + schema v7 backfill, admin registry (#44) 2026-10-02 13:08:53 +00:00
kamilkrzywda f52a59c5fc feat(game): crew-costs balance module + computeDuration duration model (#44) 2026-10-02 12:58:57 +00:00
kamilkrzywda 0d2370850f feat(admin): DB CRUD panel + /api/admin endpoints (#38)
CI / build + unit + e2e (pull_request) Successful in 3m47s
- ADMIN button in the mission-control header opens a table picker + row grid with add/edit/delete (components/admin-panel.tsx), deliberately unauthenticated by explicit request
- /api/admin/tables and /api/admin/tables/{name}/rows driven off a name→table registry built from lib/db/schema.ts (lib/db/admin.ts) — no per-table code; 404 unknown table, 400 malformed payload, 409 constraint violation
- OpenAPI spec updated for all four admin operations + Admin* schemas
- unit: lib/db/admin.test.ts (registry, CRUD round-trips, composite PKs, error mapping); e2e: read-only admin.spec.ts
2026-09-29 21:48:15 +00:00
kamilkrzywda d14ffdcf2f feat(game): NAVIGATION AI unlocks two-hop jumps in one action (#35)
CI / build + unit + e2e (pull_request) Failing after 3m11s
2026-09-29 14:53:11 +00:00
kamilkrzywda 978a1d119d feat(ui): render WORLD MAP as a force-directed d3 graph with pan + zoom (#28)
CI / build + unit + e2e (pull_request) Successful in 2m50s
2026-09-29 11:24:02 +00:00
kamilkrzywda 06f8a28e96 fix(game): numbered name fallback when pool exhausted — server no longer freezes past 128 systems
CI / build + unit + e2e (pull_request) Successful in 2m38s
Production freeze reported after the v0.9.3 (#21) deploy: every API route
hung and all panels stayed at LOADING. Root cause was not the #21 layout
(verified healthy across all 7 tabs/viewports) but makeName's unbounded
rejection loop over a finite 16x8=128 system-name pool — once a save grew
past ~128 systems, any jump into an undiscovered system spun forever on
Node's single thread (sql.js is synchronous), blocking the whole process.

makeName and makeCrewName now fall back to numbered variants ('Kepler Drift 2')
once their pools are exhausted, so they always terminate.
2026-09-29 09:18:00 +00:00
kamilkrzywda 21abf8768f feat(api): GET /api/events endpoint + OpenAPI
Latest game events, newest first; auto-initializes like the other reads.
?limit= defaults to 50 (cap 200), non-integer/out-of-range → 400. OpenAPI
spec gains the path + Event schema (14 -> 15 paths).
2026-09-29 02:45:38 +00:00
kamilkrzywda 8d678d73ce test: assert events for the remaining action types
expand had no event assertion at all; build and mission-complete asserted
type/message but not the event's turn. Issue #11 requires every action type
to be covered with correct turn/type/message.
2026-09-29 02:45:38 +00:00
kamilkrzywda 0d5858695a feat(events): event log read — getEvents + limit parsing
lib/game/events.ts: the latest N events of the save, newest first (ORDER BY
id DESC), with parseEventLimit for the optional ?limit= param (default 50,
cap 200, 400 otherwise). Unit tests cover default/accept/reject and
newest-first ordering + slicing.
2026-09-29 02:45:38 +00:00
kamilkrzywda 786a5ec001 feat(api): GET /api/missions + POST /api/missions/{id}/accept
Routes call ensureSave first (mission functions assume an initialized save),
map MissionError to 404/409 and non-integer path ids to 400. OpenAPI spec in
code gains both paths + the Mission schema (12 -> 14 paths); openapi.test.ts
covers the new shapes.
2026-09-29 01:55:41 +00:00
kamilkrzywda f356ffbe93 feat(missions): mission board — schema, deterministic generation, top-up + v6 backfill
New missions table (schema + DDL). Pure model in lib/game/missions.ts:
DELIVER / EXPLORE / FIND contracts generated from missionRng(seed, turn),
board always topped up to >=3 AVAILABLE after every action. save.ts wires
SCHEMA_VERSION 5 -> 6 with a v6 backfill step and completion hooks inside
jumpToSystem/explorePlanet (one atomic persist). Unit tests cover generation
determinism, top-up idempotency, backfill, accept validation and per-type
completion incl. reward accumulation.
2026-09-29 01:55:34 +00:00
kamilkrzywda 7b0227cde9 api+openapi: GET /api/tech + POST /api/research with 400/404/409/422 mapping 2026-09-29 00:30:10 +00:00
kamilkrzywda 8818f0928d game: tech research action + ship-action gating by researched techs (build gate, raised caps) 2026-09-29 00:24:25 +00:00
kamilkrzywda 4ef924edd6 db+game: tech table + starting tech list seeded on new game and v5 backfill step 2026-09-29 00:20:02 +00:00
kamilkrzywda de0cb45b09 ui: real SHIP SYSTEMS tab (upgrade/expand/build buttons) + left column mirrors live ship state 2026-09-28 23:43:03 +00:00
kamilkrzywda fce27ff6ca api+openapi: GET /api/ship + POST upgrade/expand/build with 400/404/409/422 mapping 2026-09-28 23:38:11 +00:00
kamilkrzywda 5fe306d64d game: ship actions — upgrade/expand/build with cost model, validation (404/409/422), turn + event per action 2026-09-28 23:35:28 +00:00
kamilkrzywda 0910891995 db+game: ship_systems table + starting ship seed (new game and v4 backfill step) 2026-09-28 23:32:04 +00:00
kamilkrzywda c7580d92bd db+game: schema_version on saves with ordered idempotent backfill (v2 bodies, v3 crew) — no more DB wipes 2026-09-28 23:25:06 +00:00
kamilkrzywda a2c8586618 api: GET /api/crew roster endpoint, OpenAPI spec updated in code 2026-09-28 22:47:18 +00:00
kamilkrzywda 7a9ff110f3 game: starting crew seeded on new game; exploration rolls for a joining crew member (same per-planet stream) 2026-09-28 22:45:55 +00:00
kamilkrzywda ccd156b7c6 db+game: crew table and pure seeded crew generation (starting crew + exploration roll) 2026-09-28 22:42:28 +00:00
kamilkrzywda 8153007668 api: GET /api/system + POST /api/explore, OpenAPI spec updated in code 2026-09-28 22:11:01 +00:00
kamilkrzywda 3aa27ffd89 game: bodies generated with each system; explore action — deterministic haul, turn cost, inventory accumulation 2026-09-28 22:07:53 +00:00
kamilkrzywda cbab17047b game: seeded planet/moon generation per system + deterministic exploration roll 2026-09-28 22:04:23 +00:00
kamilkrzywda 172f167a15 db: planets (planets+moons via parent_id) and inventory_items tables 2026-09-28 22:01:41 +00:00
kamilkrzywda 80b493746f test: openapi spec assertions for the world endpoints 2026-09-28 21:35:15 +00:00
kamilkrzywda cc6abe8f36 api: GET /api/world + POST /api/jump, OpenAPI spec updated in code 2026-09-28 21:29:23 +00:00
kamilkrzywda 58ac64af4f game: save lifecycle — auto-init, world state, jump with adjacency validation + chart growth 2026-09-28 21:28:14 +00:00
kamilkrzywda 1634c0602e game: seeded world generation (pure) — start region + expansion rings 2026-09-28 21:25:14 +00:00
kamilkrzywda 922a20707b db: game save schema — saves, solar_systems, jump_routes, events (single-player, one save) 2026-09-28 21:25:14 +00:00
kamilkrzywda d0f52133f0 db: sql.js/Drizzle connection + atomic persist (empty schema)
Flight-Ops plumbing minus game code: in-memory WASM DB, persist() via tmp+rename,
globalThis singleton. Schema is empty at scaffold stage; _meta plumbing table stamps
created_at on first open so the ./db volume holds a valid SQLite file from boot
(a brand-new sql.js database exports as zero bytes). instrumentation.ts opens it at
server start behind a runtime-guarded dynamic import (keeps node:fs out of the Edge
instrumentation bundle).
2026-09-28 15:56:34 +00:00
kamilkrzywda 323b00d692 api: /api/version + OpenAPI 3.x spec generated in code
lib/openapi.ts is the machine-readable spec (served at /api/openapi) per AGENTS.md;
info.version sourced from package.json. Unit tests pin the spec shape and version sync.
2026-09-28 15:56:29 +00:00
kamilkrzywda e688e9a0f0 app: shell + scificn-ui frontend (SCI-FI theme, brightened --text-muted)
scificn-ui v0.1.0 integrated copy-paste per its docs: Button/Panel/Badge/Card/Alert
in components/ui/, cn() helper in lib/utils.ts, theme tokens in app/globals.css.
Deliberate deviation from upstream: --text-muted #4A4A40 -> #6B6B5C (+12pt lightness)
for readability on the near-black background (default SCI-FI theme only). Landing page
proves the integration; no game UI yet.
2026-09-28 15:56:24 +00:00