Make the EVENT LOG tab functional: the terminal shows real game events instead of placeholder lines.
Scope
DB:events table (id, turn, type, message, created_at) — writes already start with the WORLD MAP issue; every action from all tabs appends an event.
API:GET /api/events (latest N, newest first). Update OpenAPI spec.
Frontend: terminal rendered from API (turn number + message per line); no placeholder lines for this tab.
Acceptance criteria
Unit tests: each action type writes an event with correct turn/type/message.
e2e: after a jump and an exploration, the log shows both entries; persists across restart.
Local verify green: tsc / vitest / playwright --list (+ build DOM check).
Dependencies
Last in the chain — by then all actions exist and write events; this issue is mostly read endpoint + render.
## Goal
Make the EVENT LOG tab functional: the terminal shows real game events instead of placeholder lines.
## Scope
- **DB:** `events` table (id, turn, type, message, created_at) — writes already start with the WORLD MAP issue; every action from all tabs appends an event.
- **API:** `GET /api/events` (latest N, newest first). Update OpenAPI spec.
- **Frontend:** terminal rendered from API (turn number + message per line); no placeholder lines for this tab.
## Acceptance criteria
- Unit tests: each action type writes an event with correct turn/type/message.
- e2e: after a jump and an exploration, the log shows both entries; persists across restart.
- Local verify green: tsc / vitest / playwright --list (+ build DOM check).
## Dependencies
Last in the chain — by then all actions exist and write events; this issue is mostly read endpoint + render.
Done in v0.9.0 (PR #18, merge commit fb11a8e), deployed to https://space-wanderer.dev.kkhost.pl — verified /api/version → 0.9.0 and /api/events serving the live save's log.
What shipped:
API: new GET /api/events — latest N events, newest first ([{id, turn, type, message, createdAt}]); optional ?limit= (default 50, cap 200; non-integers/out-of-range → 400 via parseEventLimit). Auto-initializes the save like every other read. OpenAPI now documents 15 paths + Event schema with all eight event types enumerated.
No schema change — the events table pre-existed (WORLD MAP issue) and every action from every tab already writes an event; this issue was the read endpoint + render, as planned.
UI: self-fetching EventLogPanel (components/event-log.tsx, MissionPanel pattern — refetches on each tab open, no polling) rendering real lines into the existing Terminal: T<turn> // <MESSAGE> uppercased with the event's local time as timestamp; new_game renders as a system (#) line. Placeholder feed removed from mission-control.tsx (right-column placeholders untouched — out of scope).
Tests: unit 73 → 78 (+4 in new events.test.ts: limit parsing, newest-first ordering/slicing; writer-gap assertions added where missing — expand had none, build + mission-complete gained turn checks); e2e 14 → 15 (jump via shared helper + scan → both entries in API newest-first and rendered in the terminal; state.spec asserts the latest five lines identical incl. ids across the mid-run restart).
CI note: first run failed on a stale e2e assertion — the tab-switch test still expected the removed placeholder text SHIP LOG // PLACEHOLDER FEED. Fixed e2e-only (assert at least one real /T\d+ \/\/ / line instead); no app code touched.
That's all seven tabs functional: WORLD MAP, LOCAL SYSTEM, CREW, SHIP SYSTEMS, SKILL TREE, MISSIONS, EVENT LOG.
Done in **v0.9.0** (PR #18, merge commit `fb11a8e`), deployed to https://space-wanderer.dev.kkhost.pl — verified `/api/version` → 0.9.0 and `/api/events` serving the live save's log.
What shipped:
- **API:** new `GET /api/events` — latest N events, newest first (`[{id, turn, type, message, createdAt}]`); optional `?limit=` (default 50, cap 200; non-integers/out-of-range → 400 via `parseEventLimit`). Auto-initializes the save like every other read. OpenAPI now documents 15 paths + Event schema with all eight event types enumerated.
- **No schema change** — the `events` table pre-existed (WORLD MAP issue) and every action from every tab already writes an event; this issue was the read endpoint + render, as planned.
- **UI:** self-fetching `EventLogPanel` (`components/event-log.tsx`, MissionPanel pattern — refetches on each tab open, no polling) rendering real lines into the existing Terminal: `T<turn> // <MESSAGE>` uppercased with the event's local time as timestamp; `new_game` renders as a system (`#`) line. Placeholder feed removed from mission-control.tsx (right-column placeholders untouched — out of scope).
- **Tests:** unit 73 → 78 (+4 in new events.test.ts: limit parsing, newest-first ordering/slicing; writer-gap assertions added where missing — expand had none, build + mission-complete gained turn checks); e2e 14 → 15 (jump via shared helper + scan → both entries in API newest-first and rendered in the terminal; state.spec asserts the latest five lines identical incl. ids across the mid-run restart).
- **CI note:** first run failed on a stale e2e assertion — the tab-switch test still expected the removed placeholder text `SHIP LOG // PLACEHOLDER FEED`. Fixed e2e-only (assert at least one real `/T\d+ \/\/ /` line instead); no app code touched.
That's all seven tabs functional: WORLD MAP, LOCAL SYSTEM, CREW, SHIP SYSTEMS, SKILL TREE, MISSIONS, EVENT LOG.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Make the EVENT LOG tab functional: the terminal shows real game events instead of placeholder lines.
Scope
eventstable (id, turn, type, message, created_at) — writes already start with the WORLD MAP issue; every action from all tabs appends an event.GET /api/events(latest N, newest first). Update OpenAPI spec.Acceptance criteria
Dependencies
Last in the chain — by then all actions exist and write events; this issue is mostly read endpoint + render.
Done in v0.9.0 (PR #18, merge commit
fb11a8e), deployed to https://space-wanderer.dev.kkhost.pl — verified/api/version→ 0.9.0 and/api/eventsserving the live save's log.What shipped:
GET /api/events— latest N events, newest first ([{id, turn, type, message, createdAt}]); optional?limit=(default 50, cap 200; non-integers/out-of-range → 400 viaparseEventLimit). Auto-initializes the save like every other read. OpenAPI now documents 15 paths + Event schema with all eight event types enumerated.eventstable pre-existed (WORLD MAP issue) and every action from every tab already writes an event; this issue was the read endpoint + render, as planned.EventLogPanel(components/event-log.tsx, MissionPanel pattern — refetches on each tab open, no polling) rendering real lines into the existing Terminal:T<turn> // <MESSAGE>uppercased with the event's local time as timestamp;new_gamerenders as a system (#) line. Placeholder feed removed from mission-control.tsx (right-column placeholders untouched — out of scope).SHIP LOG // PLACEHOLDER FEED. Fixed e2e-only (assert at least one real/T\d+ \/\/ /line instead); no app code touched.That's all seven tabs functional: WORLD MAP, LOCAL SYSTEM, CREW, SHIP SYSTEMS, SKILL TREE, MISSIONS, EVENT LOG.