feat(s6): diegetic polish + light onboarding#152
Conversation
S6-Polish pass: polished spider reticle/hunger ring, per-grid combat tile glow with fade-out, queen damage flash, invasion screen-edge flash, loss-screen narrative attribution from sim events, and 10 first-occurrence captions. No sim version bump — render-only per ADR-0011. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a599f8823
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- screen-effects: setScrollFactor(0) on edge-flash graphics to pin to viewport instead of world coords (P1: flash was off-screen when camera panned) - game-scene: filter onboarding caption triggers to player colony only; AI commands in the same drain pass were consuming first-occurrence captions before the player acted (P2) - game-scene: surface aiInvading caption on ai_state_transition fallback path, not just invasion_start events (P2: caption was marked triggered without ever being shown) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2891ef07e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- game-scene: replace array-index event cursor with tick-based filtering; the index cursor became stale after splice evictions at cap (2000 events), causing late-game invasion/rampage cues to stop firing silently - game-scene: map ChamberType numeric IDs to readable labels before substituting into the chamber onboarding caption template; String(0) was producing "This one is a 0." instead of "This one is a Queen." Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59796c8b40
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- draw-surface: fix 32-bit color literal 0xffeecccc → 0xffeecc; lerpColor uses 24-bit bitmasks so the extra byte was silently truncating the red channel to 0xee, making the spider tint darker than specified (P3) - game-scene: clear undergroundGlowFrames on colony view toggle; tile keys are not colony-scoped so stale entries from the previous grid were drawing false combat glows in the new grid for up to 5 frames (P2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1128359d13
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- summary-builder: null queen_death cause now uses gameOutcome to select narrative; legacy traces (simVersion < V16) with cause=null no longer show a defeat line when the actual outcome was Victory or MutualDestruction - game-scene: gate spider onboarding caption on Hunting/Striking state; spider exists from tick 0 in Patrolling so triggering on mere existence was consuming the one-shot caption before any visible encounter - summary-builder.test: add two new cases for null-cause Victory and MutualDestruction paths (2245 tests total) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 062fd1b7a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 062fd1b7a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
buildPlaytraceSummary in the upload path was called without gameOutcome, so legacy traces (simVersion < V16) with cause=null queen_death events would produce "Your colony has fallen." even for Victory uploads. Thread outcomeToWire(input.outcome) as the third argument, consistent with the game-over overlay path that already passes it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb67f341fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
queen_death events can describe either queen's death. All S6 narratives were written from the defeat perspective, so a Victory displayed "Enemy fighters...reached your queen" under VICTORY and in uploaded summaries. Select narrative table by gameOutcome: Victory path uses enemy-queen perspective; Defeat/unknown uses player-queen perspective. MutualDestruction is symmetric and identical in both tables. summary-builder.test: cover Victory perspective for all four causes (2249 tests total). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35acab474b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35acab474b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Underground glow cache: scope tile keys by colony ID so stale glows from one underground view don't bleed into the other when the player switches grids. Uses (colonyId << 24) | (ty << 16) | tx encoding; filter in draw loop uses >>> 24 (unsigned) for safe comparison. - Starvation caption condition: fix > 0 (always true for a living queen) to < STARVATION_GRACE_TICKS so the onset caption fires only when at least one feeding has failed. Same fix applied to the boot-from-save load guard. - Boot-from-save: seed lastProcessedEventTick from saved world so historical events don't replay as new on resume; seed queenStarvationTriggered when queen was already starving at save time. - ai_state_transition fallback: add screen-edge flash to the Invading fallback path, gated on checkAndTrigger so it fires exactly once (when invasion_start didn't already consume it). - Spider caption: remove impossible right-click instruction; replace with actionable fighter guidance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
S6-Polish render-only pass. No sim version bump.
nextEventIndex) drainsworld.eventseach render frame to dispatch effects and captions.buildOutcomeAttribution()now handles S5 tiebreak events (round_endwithTimeoutTiebreak/StalemateTiebreak) before falling through toqueen_deathnarratives.showGameOverOverlayreceivesnarrativeSeedand displays it as a subtitle.onboarding-captions.ts; each caption fires exactly once per session (reset per round). Captions are triggered from command dispatch (dig, chamber, food mark, rally) and per-frame checks (spider visible, spider priority, AI invading, spider rampage, queen damage, queen starvation).Test plan
npm run test— 2243 tests passing, 76 filesnpm run test:coverage— all gates ≥80% (Statements 89.71%, Branches 82.97%, Functions 94.76%, Lines 92.29%)narrativeSeednarrative textFiles changed
src/render/sprites.tssrc/render/draw-surface.tssrc/render/draw-underground.tssrc/render/game-scene.tssrc/render/ui-scene.tsshowCaption();showGameOverOverlayreceivesnarrativeSeedsrc/render/summary-builder.tsbuildOutcomeAttributionexportedsrc/render/screen-effects.ts(new)inferFlashDirectionsrc/render/onboarding-captions.ts(new)checkAndTrigger+resetCaptionssrc/render/summary-builder.test.ts(new)src/render/onboarding-captions.test.ts(new)src/render/screen-effects.test.ts(new)🤖 Generated with Claude Code