Repository navigation
fix(chat): say in visible text that the tool-risk flag allowed and blocked nothing - #23869
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: it adds one visible span and one i18n key, takes nothing away, and the screenshots show this revision. Notes
[DESIGN-REVIEWED] 252719e Description read[DESCRIPTION-READ] 11505f677d8f8b2c6b2558702bdc0320e39ef450c99bd184bfbb130a8927f0a5 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix adds one visible span and one catalog key, and the defect it fixes is tracked in #12298, item 3. What this change shipsInventory (3 items) — 3 justifiedIntent: let readers on touch or keyboard, who cannot reach the hover tooltip, see that the risk badge is a flag and not a block. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 252719e Description read[DESCRIPTION-READ] 08744bd692b13b8cb4c86c0f3d3387b4c96375c23322197540dac46e5a020b51 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The new note shows in all four screenshots, and the blind reader read it correctly: "the warning only marked the step and didn't stop it". Notes
[UX-REVIEWED] 252719e Description read[DESCRIPTION-READ] bbab1e5bfbb0bb346497935de6c49363150021847ae6a4deca2100d27c9e0e65 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 |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Bundle Size Gate is red on this head because of a known red main, not this diff: the 🤖 AI-assisted comment 🤖 |
9a9fff7 to
252719e
Compare
|
Review-ready at head 252719e: PR Readiness passed, 106 checks with 0 failing, the PR is mergeable and green on today's base (3503760). Design, First Principles and UX passed, and the GPT and Opus lanes have no blocking findings. This needs a maintainer's approval; I have not merged, approved or turned on auto-merge. 🤖 AI-assisted comment 🤖 |
cruisercohen
left a comment
There was a problem hiding this comment.
Approving 252719e5cd. This is a UX fix for #12298 item 3 and is not security scope.
The risk badge now states its key claim in visible text after the tier word and score ("flag only, did not allow or block"), so touch and keyboard readers no longer depend on a title they can't reach. The new string is annotation_note, added once in en.manual.json (where new English strings live), in all 12 translated locales and in en-XA, with a translator context entry. Nothing else in the locales changes. The test pins the visible text, checks the note carries no title, and checks the badge's own text contains it.
I could not run the website vitest suite locally, so this approval rests on the diff and the key check above. CI's readiness passed (91 pass, 15 skipping).
buluoray
left a comment
There was a problem hiding this comment.
Approving at 252719e5cd85b8686275365ab9311d637b8952af.
The badge's key claim, that Jev's flag neither allowed nor blocked the call, is now visible text instead of a hover-only title, so touch and keyboard readers get it too (ToolRiskBadge.tsx:66-70). The wording avoids saying the call ran, which matches the tooltip's "may still have been refused".
Checked:
- The new
annotation_notekey is in all 12 translated catalogs,en.manual.json, theen-XApseudolocale anden.context.json; I read each translation and all carry the same "flag only, neither allowed nor blocked" meaning. ToolRiskBadge.test.tsx23/23,src/i18n51 files / 1035 tests,lint:i18n, andtsc -p tsconfig.app.jsonall pass locally on this head.- Removing the
annotation_notecall from the span turns "says the flag allowed and blocked nothing in visible text, not only in a tooltip" red.
Non-blocking follow-up: the translator note for tier_risky in en.context.json still says "the call ran"; worth aligning with the tooltip's softer claim in a later change.
Problem / Motivation
Goal: A reader who cannot hover (touch or keyboard) can still see that Jev's risk badge on a tool card is only a flag, and did not allow or block the call.
The tool-card risk badge reads
Jev: risky (0.88) Jev 👍👎. The sentence that says the flag changed nothing about whether the call was allowed lives only in a nativetitleon the tier word. Atitlecannot be reached on touch or by keyboard, so those readers see a coloured "risky" word on a tool card and may read it as "this was blocked". This is item 3, first bullet, of #12298.Why it matters
The badge's whole safety claim is that it is an annotation, not a decision. If only mouse users can read that claim, everyone else gets a badge that looks like a block. The UX review on #12253 called this the most worth doing of the four UX residuals.
Not a goal
rate_jevlabel, visible "feedback only" wording for the thumbs, and theSettingsTogglescreenshot harness. They stay open on Follow-up from #12253: tool.risk deferred findings (feature-map wording, late tool arguments, UX) #12298.What changed (motivation → approach → change)
Every reader now sees "flag only, did not allow or block" on the badge, after the score. Before, that claim lived only in a
titletooltip, which touch and keyboard cannot reach. The text comes from a new keypages.chat.toolRiskBadge.annotation_note. The tooltip stays as the longer explanation. The phrase is worded so it never says the call ran or was not blocked, because a later permission check can still refuse a flagged call.The new key has one line in each of the 12 translated catalogs,
en.manual.json, the regenerateden-XApseudolocale, and a translator note inen.context.json.Backwards compatibility
Compatible: one new i18n key and one extra text span; nothing that works today stops working.
Removes nothing: the tooltip, the thumbs and every existing key stay as they are.
Tests
website/src/test/ToolRiskBadge.test.tsx: new case "says the flag allowed and blocked nothing in visible text, not only in a tooltip". It checks the note's visible text, that it is not carried by atitle, and that the badge's text contains it.annotation_notecall removed from the span, that case fails (1 failed, 22 passed); with it restored, all 23 pass.npm run lint:i18npasses.Proof: not provable -- frontend test (prove.py runs Python only)
Local GPT and Opus review lanes were skipped because the host was short on memory; the CI lanes review this PR instead.
Manual verification
Built the SPA and ran
website/scripts/capture-tool-risk-badge.mjsagainst it. Both tiers in both themes show the new phrase on one line between the score and the thumbs.Screenshots / video
Risky tier, light:
Caution tier, dark:
Whole transcript, light and dark
Related Issues
Part of #12298
Sibling sweep
Swept: git grep -n "annotation_title" -- website/src/
Siblings: none -- annotation_title is read only by ToolRiskBadge.tsx, the one place this claim is drawn
Pattern harvest
Not generalizable: one tooltip held a safety claim; other hover-only text in the app is advisory, not the meaning of the control
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)