39 Commits
Author SHA1 Message Date
kamilkrzywda ab22a7e68b save/e2e: #51 — wire generateRing attach into resolveJumpTask + spread-limit e2e
- resolveJumpTask: build existingEdgeKeys from all jump routes (both
  endpoints in the save's system set), pass all systems except the
  target as attachCandidates, insert closing routes for each attach.
- save.test.ts: jump test now expects 1–4 fresh systems (was pinned
  to exactly 4); A/B snapshot test stays green (both paths share the
  same resolveJumpTask code).
- e2e/helpers.ts: update stale comment ('4 fresh neighbours' →
  '1–4 new systems').
- e2e/smoke.spec.ts: new test verifying 1–4 mints, all undiscovered,
  each routed to the target, and BFS connectivity of the full graph.
2026-10-06 12:18:33 +00:00
kamilkrzywda 90de8818f8 world: #51 — ringEdges small-n fix + generateRing seeded 1–4 legs with attach
- ringEdges: n=0 → [], n=1 → [[0,1]], n=2 → [[0,1],[0,2],[1,2]];
  n≥3 wheel is byte-identical to the legacy output.
- generateRing: new params attachCandidates, existingEdgeKeys, anchorId;
  legCount is seeded-random in [EXPAND_MIN, EXPAND_MAX] (1–4);
  each leg may attach a known system (closing a loop) with prob ATTACH_PROB
  instead of minting; frontier guarantee converts the last-drawn attach
  to a mint when all legs attached.
- RingRegion gains attaches: number[] (candidate indices attached).
- Remove the EXPAND_RING constant (replaced by EXPAND_MIN/EXPAND_MAX).
2026-10-06 12:18:27 +00:00
kamilkrzywda 352ef31625 test(game): pin RECRUIT_CHANCE_BASE === CREW_CHANCE so the no-trait recruit path can't silently diverge (#43)
CI / build + unit + e2e (pull_request) Successful in 3m3s
2026-10-04 21:20:27 +00:00
kamilkrzywda 39920b3e05 feat(game): trait outcome effects — extra haul item + recruit chance (#43) 2026-10-04 21:04:24 +00:00
kamilkrzywda b8a998dcbb chore(release): v0.11.0 — skill progression & specialisation (#45)
CI / build + unit + e2e (pull_request) Successful in 2m52s
2026-10-04 03:49:06 +00:00
kamilkrzywda 1a36160392 feat(ui): skill levels + titles on CREW tab and team-builder (#45)
CI / build + unit + e2e (pull_request) Successful in 3m7s
2026-10-04 03:22:51 +00:00
kamilkrzywda 9d1a8e9d89 fix(game): grantXp event fires only on level transition, not while at-band (#45)
CI / build + unit + e2e (pull_request) Successful in 3m8s
2026-10-04 02:50:47 +00:00
kamilkrzywda f3751b4747 feat(game): skill XP on task completion + power bands in duration (#45)
CI / build + unit + e2e (pull_request) Successful in 2m48s
2026-10-04 02:34:56 +00:00
kamilkrzywda 5bc411cb76 fix(db): consistent starting xp in crew_skills seeder (#45) 2026-10-04 02:19:36 +00:00
kamilkrzywda 7f2121a717 feat(game): skills.ts — XP, levels, power bands, titles (#45)
CI / build + unit + e2e (pull_request) Successful in 2m53s
2026-10-04 01:33:05 +00:00
kamilkrzywda 449d4b9895 feat(db): crew_skills table + role-based starting levels — schema v8 (#45)
CI / build + unit + e2e (pull_request) Successful in 2m48s
2026-10-04 00:56:30 +00:00
kamilkrzywda a199b64348 feat(ui): team builder — lead + helpers with live duration preview, wired into the action panels (#44) 2026-10-02 20:34:14 +00:00
kamilkrzywda 1084f4e099 fix(api): guard task-queue name resolution against corrupted rows (#44) 2026-10-02 19:58:40 +00:00
kamilkrzywda 84d1aa8122 feat(api): world/system/crew snapshots expose the active + pending task queue (#44) 2026-10-02 19:42:19 +00:00
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 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 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 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 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 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 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 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 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