Issue #11 — the last tab goes live (no placeholder lines):
API:GET /api/events → latest N newest-first ([{id, turn, type, message, createdAt}]); optional ?limit= default 50, cap 200, invalid → 400. Auto-initializes like every other read. OpenAPI now documents 15 paths + Event schema (eight event types).
UI: self-fetching EventLogPanel renders the real log into the existing Terminal — lines as T<turn> // <MESSAGE> with local time; new_game lines render as system (#) lines. Placeholder feed removed from mission-control.tsx.
No schema change — every action already writes events (this issue is read endpoint + render, by design).
Tests: unit 73 → 78 (parseEventLimit default/accept/reject, newest-first ordering + limit slicing; closed writer gaps — expand had no event assertion at all, build and mission-complete gained turn checks); e2e 14 → 15 (jump via shared helper + scan → both entries in API newest-first and rendered in terminal; state.spec asserts latest five lines identical incl. ids across the mid-run restart).
Local verification: tsc ✓, vitest 78/78 ✓, playwright --list 15 ✓, next build clean (ƒ /api/events registered) + DOM check (7 tab triggers) + live API smoke (limit validation 400s).
Issue #11 — the last tab goes live (no placeholder lines):
- **API:** `GET /api/events` → latest N newest-first (`[{id, turn, type, message, createdAt}]`); optional `?limit=` default 50, cap 200, invalid → 400. Auto-initializes like every other read. OpenAPI now documents 15 paths + Event schema (eight event types).
- **UI:** self-fetching `EventLogPanel` renders the real log into the existing Terminal — lines as `T<turn> // <MESSAGE>` with local time; `new_game` lines render as system (`#`) lines. Placeholder feed removed from mission-control.tsx.
- **No schema change** — every action already writes events (this issue is read endpoint + render, by design).
- **Tests:** unit 73 → 78 (parseEventLimit default/accept/reject, newest-first ordering + limit slicing; closed writer gaps — `expand` had no event assertion at all, `build` and mission-complete gained turn checks); e2e 14 → 15 (jump via shared helper + scan → both entries in API newest-first and rendered in terminal; state.spec asserts latest five lines identical incl. ids across the mid-run restart).
Local verification: tsc ✓, vitest 78/78 ✓, playwright --list 15 ✓, next build clean (`ƒ /api/events` registered) + DOM check (7 tab triggers) + live API smoke (limit validation 400s).
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.
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.
Self-fetching EventLogPanel (MissionPanel pattern — refetches on each tab
open). One terminal line per event: T<turn> // <MESSAGE>, newest first, with
the event's local time as the timestamp; new_game lines render as system
lines. Placeholder feed + now() removed from mission-control.
smoke: jump (shared helper) + scan, then assert both events are in
GET /api/events with the newer one first, and that the EVENT LOG terminal
renders both T<turn> // <MESSAGE> lines. Idempotent across retries — asserts
on this run's own entries by turn/message, never absolute counts. state: the
latest five log lines come back identical (ids included) after the mid-run
container restart.
CI run 361: v0.9.0 replaced the placeholder feed with EventLogPanel, but this
pre-existing assertion still expected 'SHIP LOG // PLACEHOLDER FEED'. Assert a
real T<turn> // <MESSAGE> line instead — every save has the turn-0 new_game
event, so it holds on a fresh stack and across retries.
kamilkrzywda
scheduled this pull request to auto merge when all checks succeed 2026-09-29 05:05:28 +02:00
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.
Issue #11 — the last tab goes live (no placeholder lines):
GET /api/events→ latest N newest-first ([{id, turn, type, message, createdAt}]); optional?limit=default 50, cap 200, invalid → 400. Auto-initializes like every other read. OpenAPI now documents 15 paths + Event schema (eight event types).EventLogPanelrenders the real log into the existing Terminal — lines asT<turn> // <MESSAGE>with local time;new_gamelines render as system (#) lines. Placeholder feed removed from mission-control.tsx.expandhad no event assertion at all,buildand mission-complete gained turn checks); e2e 14 → 15 (jump via shared helper + scan → both entries in API newest-first and rendered in terminal; state.spec asserts latest five lines identical incl. ids across the mid-run restart).Local verification: tsc ✓, vitest 78/78 ✓, playwright --list 15 ✓, next build clean (
ƒ /api/eventsregistered) + DOM check (7 tab triggers) + live API smoke (limit validation 400s).