Repository navigation
feat(web): decision-first pass 2 — unread Chip message dot, compact all-clear Must Do - #107
Conversation
…the bubble opens the message only while unread Dialogue ids repeat across weeks (same outcome and variant), so the unread check now keys on id plus text. After the message has been shown, tapping the bubble goes to the Ask Chip decision summary again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When nothing is required, the Must Do card is a headline plus the Advance Week button; the why, consequence and where text moves into a collapsed "Why this is clear" (still in the page). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8e34b81b1
ℹ️ 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".
| /** Identifies one weekly message: ids repeat across weeks (same outcome and variant), the text does not always. */ | ||
| export function weeklyDialogueKey(id: string | null, text: string | null): string | null { | ||
| return id === null ? null : `${id}\u0000${text ?? ''}`; |
There was a problem hiding this comment.
Include the week in the unread-message key
When consecutive weekly events produce identical copy, this key is unchanged because it contains only the repeated catalog ID and text. Production guidance has fixed composed text whenever the relevant inputs are unchanged (for example, a rollover without an opponent), so the later event matches viewedDialogueKey, shows no unread dot, and tapping the bubble opens Ask Chip instead of the new weekly message. Include the event's season/week or another per-emission identifier in the key.
Useful? React with 👍 / 👎.
| if (control === 'expand') { | ||
| openDock(); | ||
| setRouteCoachOpened(true); | ||
| if (!activeRouteBeat) { | ||
| const hasWeeklyDialogue = Boolean(children) && currentDialogueId !== null; | ||
| if (resolveBubbleTapView(hasWeeklyDialogue) === 'askChip') showAskChipBeat(); | ||
| } | ||
| if (!activeRouteBeat && resolveBubbleTapView(unreadDialogue) === 'askChip') showAskChipBeat(); |
There was a problem hiding this comment.
Keep partially read conversations reopenable
If a multi-beat weekly conversation is collapsed or escaped after its first beat appears but before the player presses Next, the effect above has already marked the current beat as viewed while dialogueQueue still contains unread beats. This branch therefore opens the Ask Chip live summary on every later bubble tap, leaving the queued remainder inaccessible. Treat a nonempty dialogue queue as unread/in progress, or only mark the conversation read after its final beat.
Useful? React with 👍 / 👎.
Ids and even text can repeat across weeks in a win streak; adding the season and week makes every weekly message light the dot once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
goat-reviewer result: PASS (round 5 on 9233028..e8e34b8, delta PASS on 5d411a2)Head 5d411a2. Tested tree == committed tree (1,459 files, 0 mismatches). Script tests 79/79, web 263 files / 2,298 tests, design-system 123, tsc clean, 17/17 browser gate steps on this head; all 48 routes load without a crash. The unread-message key was extended with season and week (5d411a2) after the reviewer pointed out that id and text can repeat across weeks in a win streak. Residual risks (non-blocking):
Auto-merge (squash) is enabled and waits for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d411a21a2
ℹ️ 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".
| currentSeason, | ||
| currentWeek, |
There was a problem hiding this comment.
Bind the unread key to the dialogue emission
When the player imports or loads an older save while a previously read weekly dialogue remains in the Chip store, eventBridge.ts emits no rollover because it only recognizes increasing week/season values, but these live props still change the key and make the old text appear unread again. Fresh evidence in this revision is that the key now uses the current game's clock rather than metadata captured when the dialogue was emitted. Store the emission's season/week or event ID with the dialogue and key on that instead.
Useful? React with 👍 / 👎.
Why
Follow-up to #106 (decision-first pass 1) covering two small notes from its final review and one more "too much before the decision" fix on the Briefing.
What
DESIGN.mdwording updated.Verification (local, OS-capped container: 5,632 MiB hard memory, no swap, no host mounts)
tsc --noEmitclean; web suite 263 files / 2,298 tests; design-system 123; build OK.Not run: ecology / perft / shadow / full release gate locally (CI's job); no in-browser run of the tap-opens-message path (a post-sim weekly dialogue could not be produced in the headless harness; covered by pure-function and SSR tests). No gameplay, save-format, engine/RNG or dependency changes;
release-gate.mjsand workflows untouched.🤖 Generated with Claude Code