Skip to content

feat(web): decision-first pass 2 — unread Chip message dot, compact all-clear Must Do - #107

Merged
KevinBigham merged 3 commits into
mainfrom
ux/pass3
Oct 3, 2026
Merged

KevinBigham merged 3 commits into
mainfrom
ux/pass3

Conversation

@KevinBigham

Copy link
Copy Markdown
Owner

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

  • Chip's unread weekly message relights correctly. Dialogue ids repeat across weeks (same outcome and variant), so "unread" now keys on id plus text; two back-to-back clean wins no longer leave the second message without its dot.
  • Tapping the bubble opens the message only while it is unread. Once it has been shown, a tap goes to the Ask Chip decision summary ("what do I do next") again. DESIGN.md wording updated.
  • Briefing's all-clear Must Do card is compact. When nothing is required it is a headline plus the Advance Week button; the why / consequence / where text moves into a collapsed "Why this is clear" (still in the page). About 150px less before the first Recommended item, desktop and phone.

Verification (local, OS-capped container: 5,632 MiB hard memory, no swap, no host mounts)

  • Script and release-tooling tests 79/79; tsc --noEmit clean; web suite 263 files / 2,298 tests; design-system 123; build OK.
  • All 17 browser release-gate steps pass (g3 matrix, built-page smoke, g1 full-setup x2, g5, g6 mute / receipts / reduced-motion / state-feedback / focus / visual, desktop and mobile).
  • All 48 routes load without a crash after an Instant start + reload and after a Week 14 cartridge import.
  • Tested tree == committed tree (1,459 files hash-identical; verified again after rebasing onto feat(web): decision-first pass 1 — compact Chip, collapsed Sources, roster pin, slim header, Must Do first #106's squash commit).
  • Browser measurement of the all-clear card: What + "Why this is clear" + Advance Week all above the fold at 1280x800.

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.mjs and workflows untouched.

🤖 Generated with Claude Code

KevinBigham and others added 2 commits October 3, 2026 04:01
…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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T09:17:51.963457Z 5d411a2 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +169 to +171
/** 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 ?? ''}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines 958 to +961
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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@KevinBigham
KevinBigham enabled auto-merge (squash) October 3, 2026 09:17
@KevinBigham

Copy link
Copy Markdown
Owner Author

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):

  • The key uses the dock's current week/season, so if the week advances with no new weekly message replacing the old one, a viewed message can relight its dot once. Messages are emitted per game, so this should be rare; worth watching.
  • No component-level test for the tap / unread / viewed flow (no DOM test environment in the repo) and no in-browser run of it (a post-sim dialogue could not be produced in the headless harness). One hands-on check is worth doing: sim a week, see the gold dot on the Chip bubble, tap it, see the message, tap again later and get the Ask Chip summary.
  • The new "Why this is clear" <summary> uses the browser's default marker/focus ring and a small tap target.

Auto-merge (squash) is enabled and waits for test, determinism-gate and release-gate.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +685 to +686
currentSeason,
currentWeek,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@KevinBigham
KevinBigham merged commit a51aac1 into main Oct 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant