Skip to content

fix(chat): word the cache footer note plainly and put its reason in an info tip - #35631

Merged
javenciu merged 1 commit into
mainfrom
fix/cache-chip-plain-hint
Nov 12, 2026
Merged

javenciu merged 1 commit into
mainfrom
fix/cache-chip-plain-hint

Conversation

@javenciu

@javenciu javenciu commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: the reply footer's prompt-cache note reads as one plain idea, says what it means for cost, and gives its reason to keyboard and screen-reader users as well as to the mouse.

The note added by #35168 has three problems the UX review on that PR named: the label and its hint use two verbs for one event ("Cache rewritten" on the chip, "rebuilt" in the hint); the hint leans on "prompt cache", "input" and "cache-write rate", which the review's reader did not understand; and the bordered pill read like a button the reader would not click, while its reason lived only in a title.

Why it matters

The note exists to explain why one turn cost more than the turns around it. If the reader cannot tell what it means, or cannot reach the reason at all without a mouse, it does not do that job.

Not a goal

  • When a turn is flagged. The rule in dashboard/cache_rewrite.py and the turn_stats payload are unchanged.
  • A new tooltip component. The note uses the app's existing InfoTip.
  • Renaming the i18n keys. Only their values change.

What changed (motivation → approach → change)

  • website/src/pages/chat/AssistantMessage.tsx: the note is plain footer text after the footer's own · separator, followed by the app's InfoTip (components/InfoTip.tsx), the pattern 55 other files use for help tips. It shows the reason on hover, on keyboard focus and on a tap, attaches it as the glyph's description while open, and keeps it on title while closed. The marker itself carries an empty title: an open tip drops its glyph's title, and without the empty one the browser would show the footer's own summary title as a second tooltip beside the bubble.
  • website/src/i18n/locales/*.json: the two values change in every catalog. The label is "Cache rebuilt", the same verb as the hint. The hint is "This reply had to store the whole conversation again, so it cost more than usual." en-XA.json is regenerated.
  • website/src/test/AssistantMessage.test.tsx: the existing test now pins the label, that the reason sits on an info-tip button named "More information" with the hint as its title, that focusing the button opens a tooltip holding the hint, that the open glyph's nearest title is the marker's empty one, the separator, and that the note carries no pill classes.
  • docs/feature-map/README.md and docs/system-specs/modules/turn-stats-footer.md: the new wording and styling.

Backwards compatibility

Compatible: the payload, the rule and the i18n keys are unchanged; only display text and classes change.

Removes nothing: no key, field or behavior is removed.

Tests

  • Before: with main's AssistantMessage.tsx and en.json, the updated test fails (Expected element to have text content), because main renders "Cache rewritten" in a pill with no info tip.
  • After: AssistantMessage.test.tsx, 133 passed. The i18n suite (77 files, 1,227 tests) passes, as do the i18n gate with the diff base (I18N_BASE_REF=<merge-base> node scripts/i18n-check.mjs) and eslint on the changed files.
  • The brand gate, the comment-history gate, the docs lint and the inclusive-language terms in .woke.yml pass on the added lines.
  • Reproduce: cd website && npx vitest run src/test/AssistantMessage.test.tsx -t "Cache rebuilt"
  • Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Rendered from the real AssistantMessage component in Chromium at 2x, in the light and dark themes. The tip was opened with the Tab key, the keyboard path the Goal names (screenshots below).

Sibling sweep

Swept: git grep -n "title={" -- website/src/pages/chat/AssistantMessage.tsx website/src/pages/chat/SpeakMenuItem.tsx, looking for a title that carries information the visible text does not. In AssistantMessage.tsx the footer's own title (line 797) repeats the untrimmed model id and exact figures the line shows, and the timestamp's (line 844) is the full date of the time it shows, so only the note's hint was new information.
Sibling: website/src/pages/chat/AssistantMessage.tsx -- changed here
Sibling: website/src/pages/chat/SpeakMenuItem.tsx -- not affected -- its hint already reaches a screen reader through aria-description

Pattern harvest

Rule candidate: review-prompt
Pattern: a title that carries information the visible text does not, on an element with no aria-label or aria-description, is out of reach for keyboard and screen-reader users.

Screenshots / video

The real AssistantMessage component at 2x: a normal turn above a flagged turn, and the flagged turn with its info tip opened from the keyboard.

A normal turn above a flagged turn, light theme:

A normal turn above a flagged turn, light theme

The info tip opened with the Tab key, light theme:

The info tip opened with the Tab key, light theme

Dark theme

A normal turn above a flagged turn, dark theme

The info tip opened with the Tab key, dark theme

Related Issues

Follows #35168 and the notes in its UX review.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@javenciu
javenciu requested review from a team and KiroCrewCaptain as code owners November 11, 2026 22:32
@javenciu
javenciu requested a review from CrysisDeu November 11, 2026 22:32
@javenciu
javenciu enabled auto-merge (squash) November 11, 2026 22:32
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 0fdc2535b1c4eade3f35d4796d78c033b287275f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change only rewords the label and swaps a pill whose reason sat in title for the app's existing InfoTip. Keys and payload are unchanged, and the PR includes screenshots of this revision.

[DESIGN-REVIEWED] 0fdc253

Description read

[DESCRIPTION-READ] d8485438a522cd04b6ec58c2afdacca029ff5f369961db88c1418a9f833eb796

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 0fdc2535b1c4eade3f35d4796d78c033b287275f — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The relabel and the restyle trace back to the confusion that #35168's UX review named, and the reason is now shown through the existing InfoTip. No new mechanism is added.

Notes

What this change ships

Inventory (5 items) — 4 justified

Intent: make the footer's prompt-cache note understandable, and let keyboard and screen-reader users reach its reason. This is a FIX.

  1. The chip label changes from "Cache rewritten" to "Cache rebuilt" in every locale — inherited
  2. The hint now explains the cost in plain words instead of cache-billing terms — justified
  3. The bordered pill becomes plain footer text after a · separator — justified
  4. The reason moves from a title the keyboard cannot reach into the existing InfoTip (imported by 52 files), so it opens on hover, focus or tap — justified
  5. An empty title on the marker keeps the footer's summary tooltip from showing beside the open tip — justified

[FIRST-PRINCIPLES-REVIEWED] 0fdc253

Description read

[DESCRIPTION-READ] 5fdc170854e6a9b73cf71c5dc4e1fb6da376c67767a3d34b649b62d8adf1a9ce

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 0fdc2535b1c4eade3f35d4796d78c033b287275f — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 0fdc253

Verdict parsed from the review's SHA-scoped output markers for commit 0fdc2535b1c4eade3f35d4796d78c033b287275f.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 0fdc2535b1c4eade3f35d4796d78c033b287275f false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 0fdc2535b1c4eade3f35d4796d78c033b287275f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader understood "Cache rebuilt" and its "i" tip as an explanation of the higher cost, and said they would open it. The screenshots show both states in both themes.

Notes

  • The label "Cache rebuilt" still depends on the word "cache", which the reader said "is never explained in plain words". A label about the cost the user sees would carry the meaning without the tip, for example "Higher cost: conversation re-stored".
  • The hint "This reply had to store the whole conversation again, so it cost more than usual." doesn't say what caused it or whether the user can avoid it. The reader asked about both. A cause clause would answer them, for example "…after a long pause or a model switch".

[UX-REVIEWED] 0fdc253

Description read

[DESCRIPTION-READ] 5369aeaba5f46aa37bf5bdf97af68604aefe16a69692b0886826bba0b02d5bfe

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 0fdc2535b1c4eade3f35d4796d78c033b287275f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 0fdc253

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 0fdc2535b1c4eade3f35d4796d78c033b287275f false-positive: <reason, 20 to 500 characters>

@javenciu
javenciu force-pushed the fix/cache-chip-plain-hint branch from 3b3d02a to e0b569a Compare November 11, 2026 23:29
@javenciu javenciu changed the title fix(chat): word the cache footer note plainly and give its hint to screen readers fix(chat): word the cache footer note plainly and put its reason in an info tip Nov 11, 2026
@javenciu

Copy link
Copy Markdown
Contributor Author
  • One part of the Goal goes unmet: keyboard users still cannot get the reason fixed e0b569a: the reason now sits on the app's InfoTip, which opens on keyboard focus as well as on hover and a tap, and attaches the hint as the glyph's description while open. The test focuses the tip and reads the tooltip, and the screenshots show it opened with the Tab key.

@KiroCrewCaptain

KiroCrewCaptain commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

Display-only change: the cache-rewrite footer chip becomes plain text "Cache rebuilt" after a separator, with the reason in the existing InfoTip, which handles hover, focus and tap and sets aria-describedby while open and title while closed. The empty title on the wrapper stops the footer's summary title from showing as a second tooltip. Keys, payload and flagging rule are unchanged. The only consumers are this component and its test. All 13 catalogs are updated. The updated test pins the label, the info-tip button, focus opening the tip, the empty title and the separator, and it would fail on main. The CI failures are API rate-limit or skip artefacts, not code results.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 0dbb3ea228 · 104 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
@javenciu
javenciu force-pushed the fix/cache-chip-plain-hint branch from e0b569a to e2eec64 Compare November 12, 2026 02:26
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@javenciu

Copy link
Copy Markdown
Contributor Author

Rebased: onto main e1b079ce1e, which has the fixes for the backend shards that failed on the old head: the wait-discipline baseline for test/test_update_boot_apply.py (#35625) and the updates-handlers facade test, both of which pass on that main. No conflicts. The pseudo-locale regenerates unchanged, and AssistantMessage.test.tsx (133 passed) and the i18n gate pass on the new head e2eec64f7a.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
@javenciu
javenciu force-pushed the fix/cache-chip-plain-hint branch from e2eec64 to 1b21a3c Compare November 12, 2026 05:26
@javenciu

Copy link
Copy Markdown
Contributor Author

Rebased: onto main 80cf3dfc64, which has #35725, the fix for the Coverage Gate's per-file floor on gateway_restart.py and update_boot_apply.py, the only red check on the old head. No conflicts. The pseudo-locale regenerates unchanged, and AssistantMessage.test.tsx (133 passed), the i18n gate and eslint pass on the new head 1b21a3c022.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@javenciu
javenciu force-pushed the fix/cache-chip-plain-hint branch from 1b21a3c to dc56dc2 Compare November 12, 2026 05:47
@javenciu

Copy link
Copy Markdown
Contributor Author

span=2e0227d8a946

fixed dc56dc2: the turn-cache-rewrite span carries title="", so while the tip is open (and its glyph has dropped its own title) the nearest title above the glyph is empty and the browser shows no second tooltip with the footer summary. A closed tip still shows its hint through the glyph's own title. AssistantMessage.test.tsx now asserts that the open glyph has no title and that its nearest title is the empty one; with the attribute removed that assertion fails (it finds the footer's turn-stats title). The footer spec says the same.

@javenciu

Copy link
Copy Markdown
Contributor Author

span=78eb7bc585e6

fixed: the four screenshots were re-rendered at dc56dc2799 and attached again. The earlier attachment URLs answered HTTP 404 to an anonymous download, which is why the evidence step skipped all four; each new URL answers 200 anonymously. They show a normal turn above a flagged turn and the flagged turn with its info tip opened with the Tab key, in the light and dark themes.

@javenciu
javenciu force-pushed the fix/cache-chip-plain-hint branch from dc56dc2 to 0dbb3ea Compare November 12, 2026 05:50
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 12, 2026
bolichen97
bolichen97 previously approved these changes Nov 12, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read the full diff. The pill becomes plain footer text, "Cache rebuilt", after a · separator. The reason moves onto the shared InfoTip, which works with keyboard focus and a tap where the old title worked only on hover. The empty title keeps the footer summary from showing as a second tooltip. All 14 locales are reworded the same way, and both specs are updated. Regexes appear in the test only. LGTM.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 12, 2026
…n info tip

The reply footer's cache marker used two verbs for one event ("Cache
rewritten" on the chip, "rebuilt" in its hint), its hint leaned on terms a
reader did not know, the bordered pill read like a button with nothing to
click, and its reason lived only in a title a keyboard cannot reach. It now
reads "Cache rebuilt" as plain footer text after the footer's own separator,
followed by the app's InfoTip, which shows the reason on hover, keyboard focus
and a tap and gives it to a screen reader; the hint says what it means for
cost.
@javenciu

Copy link
Copy Markdown
Contributor Author

Rebased: onto 9ef0fc4e04. The one conflict was de.json, where #35328 changed "Zug" to "Durchlauf" in the old hint. This branch replaces that hint, and its German text has no "Zug", so I kept the branch's two values. deStyle.test.ts passes with I18N_BASE_REF set. Pseudolocale, i18n check, the 133 AssistantMessage tests, eslint, tsc and docs lint are all clean on 0fdc2535b1.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 12, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Thanks for this follow-up. The review found nothing that blocks it. A maintainer still needs to approve it by hand, because it edits a row in docs/feature-map/README.md and the owning spec. Changes to those docs are signed off by a person, not by this review. A maintainer will post the decision here.

What the review checked on this head:

  • The two i18n values changed in all 13 catalogs, and en-XA was regenerated. The keys and the turn_stats payload did not change.
  • The old pill is gone. No "Cache rewritten" text is left outside the catalogs.
  • The InfoTip button has an accessible name and opens on focus.
  • The cache tests fail on main and pass here.
  • The screenshots match this head.

One thing done well: it reuses the shared InfoTip. Before, the reason sat in a title that only a mouse could reach. Now keyboard, touch and screen reader users can reach it too.

Optional:

  • The assertion at website/src/test/AssistantMessage.test.tsx:1370 passes with or without the wrapper's title="". An open InfoTip keeps an empty title on its own button (InfoTip.tsx:271), so tip.closest('[title]') returns the button. Either drop the wrapper title and assert tip.closest('[title]') is the tip, or keep it and assert on the wrapper itself.
  • The reason "an open tip drops its glyph's title" is out of date. InfoTip now empties the title instead of removing it. That sentence appears in the comment at AssistantMessage.tsx:820-825, the test comment and turn-stats-footer.md:58. Update all three together.
  • The hint says "the whole conversation" was stored again, but the rule fires when the write covers about half of it. "Most of the conversation" would be more accurate.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review after the rebase onto main. I compared the PR diff at 0dbb3ea with the one at 0fdc253. The PR's own added lines are identical. The only differences are main's: a context row in the feature map and the German old hint string this PR replaces. The new wording, the InfoTip change and the test are unchanged. All checks are green. LGTM.

@javenciu
javenciu merged commit 5f57442 into main Nov 12, 2026
105 of 106 checks passed
@javenciu
javenciu deleted the fix/cache-chip-plain-hint branch November 12, 2026 11:05
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 12, 2026
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.

3 participants