Skip to content

fix(chat): say the tool-risk badge's vote is feedback only - #32077

Merged
bolichen97 merged 1 commit into
mainfrom
fix/12298-tool-risk-thumbs-label
Nov 7, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/12298-tool-risk-thumbs-label

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The tool-risk badge's thumbs say in visible text that a vote is only feedback, without repeating Jev's name.

The badge reads Jev: risky (0.88) flag only, did not allow or block Jev 👍 👎. The second "Jev" repeats the word the line opens with. Nothing visible says a vote is only feedback: that lives in the buttons' title and aria-label, which a sighted reader on touch or keyboard never sees. These are the last two open residuals of #12298. The rest of the issue already shipped: item 1's wording in #16320, item 2 documented as a v1 limit in the feature map, the visible flag-only note in #23869, and the Decisions-card capture harness now stubs decisions_enabled.

Why it matters

A thumbs pair right after "risky" on a tool card can read as an allow or block control. The badge exists to say the flag changed nothing, so its one control must not suggest the opposite.

Not a goal

  • Changing what a vote does, the feedback route, or the shared DecisionVerdictThumbs control.
  • The late / streamed tool-argument gap (item 2): it stays the documented v1 behaviour.
  • Rewording the badge's tier word, score or flag-only note.

What changed (motivation → approach → change)

The thumbs label now reads Feedback only instead of a second "Jev". It is short on purpose: a longer "Rate this flag (feedback only)" pushed the thumbs past the edge of a 320 px screen in Italian, German, French and Bengali.

Part Change
pages/chat/ToolRiskBadge.tsx reads the new key; the row gets flex-wrap, so on a phone the note and the thumbs take their own lines. Without it the note is squeezed to a narrow column: at 320 px the caution badge's note was 27 px wide and seven lines tall, and is now 180 px
i18n/locales/*.json, en.context.json key toolRiskBadge.rate_jev renamed to toolRiskBadge.rate_label because its meaning changed (catalog rule "One key, one meaning"); all twelve languages translated in each style guide's register, pseudolocale regenerated, translator context rewritten
docs/system-specs/modules/decisions.md the badge paragraph states the label

Backwards compatibility

Compatible: a display string and its catalog key change; no stored data, route or config is involved.

Reader: website/src/pages/chat/ToolRiskBadge.tsx:ToolRiskBadge -- chat -- ToolRiskBadge.test.tsx (the only reader of the renamed key; [key-refs] reports 0 dangling)

Tests

  • website/src/test/ToolRiskBadge.test.tsx: the visible label is "Feedback only" and the badge's text says "Jev" exactly once. It fails on main (expected 'Jev' to be ...) and passes here, five runs out of five with --sequence.shuffle (seeds 11 to 55).
  • i18n gate chain (npm run i18n:check with the base ref): [changed-values] and [changed-passthrough] 0, [key-refs] and [pseudolocale] clean; the twelve locale style tests pass.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Built the SPA and ran scripts/capture-tool-risk-badge.mjs against it at 1280 px (one line, as before), then the same scene at 320 px in all twelve languages: the badge's scrollWidth equals its clientWidth in every one, and the thumbs end inside the badge.

Screenshots / video

Risky badge, light, and caution badge, dark, at 1280 px:

risky light

caution dark

Caution badge at 320 px, English and Simplified Chinese:

320 px English

320 px Simplified Chinese

Whole transcript, light

transcript light

Related Issues

Closes #12298

Sibling sweep

Swept: git grep -n "label={i18nT(" -- website/src/pages/chat
Sibling: website/src/pages/chat/CompactionKeepLine.tsx -- not affected -- its label already names the act, not Jev
Sibling: website/src/pages/chat/SteerDecisionLine.tsx -- not affected -- its label already names the choice, not Jev
Sibling: website/src/pages/chat/DecisionStrip.tsx -- not affected -- two pairs share one strip there, so the Jev name tells them apart

Pattern harvest

Not generalizable: a copy residual on one surface; the shared control already requires a visible label, and choosing its words is per-surface judgement.

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 04:03
@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 04:13
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/12298-tool-risk-thumbs-label branch from df8056f to 71ab58d Compare November 7, 2026 06:46
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/decisions.md, website/src/i18n/en.context.json and website/src/i18n/locales/*.json since this head went green (76ec06a -> a3fb5af); CI re-running.

The patch is unchanged (git range-diff reports it identical). Re-run locally on the new base: ToolRiskBadge.test.tsx and the src/i18n/ tests (75 files, 1228 tests), the i18n check chain against origin/main, and test_decisions_tool_risk.py + test_packaged_docs_runtime_facts_b78.py (83 passed). The previous head's review lanes and the dependency, readiness and sensitive-path checks had failed on a CI API rate limit, not on a finding.

[operator: bolichen97]

@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 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Small copy and layout fix with rendered evidence; the renamed key has no readers outside the patch.

[DESIGN-REVIEWED] eb2958a

Description read

[DESCRIPTION-READ] 49b7fec9af2c95e8189e0f1fa68c4e89c658933779080c4d3b0c0fcba56978b4

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 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of eb2958a326bce35da34499bb39146efb10648619 — 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: a copy fix tied to issue #12298, backed by a test that fails on base, with the key rename required by the catalog rule.

What this change ships

Inventory (4 items) — 4 justified

Intent: make it visible on the tool-risk badge that a thumbs vote is only feedback and does not allow or block the call. This is a FIX.

  1. The label before the badge's thumbs now reads "Feedback only" (translated in all twelve languages) instead of a second "Jev" — justified
  2. On a narrow screen the badge row wraps, so the note and the thumbs each get their own line — justified
  3. The catalog key toolRiskBadge.rate_jev is renamed to rate_label and its translator context is rewritten — justified
  4. The decisions spec paragraph now states the visible label — justified

[FIRST-PRINCIPLES-REVIEWED] eb2958a

Description read

[DESCRIPTION-READ] ad2e7f19b0776c8234013a43adde7d8af84e87e685d481e744f0ff5d273cab29

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 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] eb2958a

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

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

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the screenshots show the new label and the wrapped 320 px layout, and the blind reader read the thumbs correctly as a feedback-only vote.

Notes

  • "Feedback only" sits right after "flag only, did not allow or block". On one line (shots 1, 2, 4 and 5) the blind reader "can't tell if it describes the thumbs … or the Jev warning itself"; in the stacked layout (shot 3) it read as the thumbs' label. Make the label say what the user does, e.g. "Rate (feedback only)", or move it next to the thumbs so it reads as one unit with them.
  • The blind reader rated "what I'm rating (Jev's warning, the step, or the assistant?)" only as a guess. The title/aria-label could name the object: "Was this flag right?"

[UX-REVIEWED] eb2958a

Description read

[DESCRIPTION-READ] 1aab04de48738510a621bff6263f247114b05572cdfdba3f1db9c49e00e2e158

That sha256 names everything this verdict read: the PR description, plus the 8 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 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] eb2958a

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

@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 7, 2026
@bolichen97
bolichen97 force-pushed the fix/12298-tool-risk-thumbs-label branch from 71ab58d to b6605e3 Compare November 7, 2026 09:07
@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 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/en.context.json, website/src/i18n/locales/*.json and docs/system-specs/modules/ since this head went green (a3fb5af -> 4d0ae46); CI re-running.

The patch is unchanged (same git patch-id). Re-run locally on the new base: ToolRiskBadge.test.tsx and the src/i18n/ tests (59 files, 1061 tests), npm run i18n:check, tsc -p tsconfig.app.json, and test_decisions_tool_risk.py + test_packaged_docs_runtime_facts_b78.py (83 passed). The previous head's only test red was the known notificationsSlice 500-seed timeout tracked in #31888, which this PR does not touch; the coverage merge and coverage gate reds followed from it.

[operator: bolichen97]

@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 7, 2026
The risk badge's thumbs carried the label "Jev", repeating the word the
line opens with, and nothing visible said a vote is only feedback: that
meaning lived in the buttons' title and aria-label, which a sighted
reader on touch or keyboard never sees.

The label now reads "Feedback only". The key is renamed from rate_jev
to rate_label because its meaning changed, and all twelve catalogs, the
pseudolocale and the translator context carry the new value. The badge
row wraps, so on a phone-width pane the note and the thumbs take their
own lines instead of the note being squeezed to a narrow column. The
decisions spec states the label.

Closes #12298
@bolichen97
bolichen97 force-pushed the fix/12298-tool-risk-thumbs-label branch from b6605e3 to eb2958a Compare November 7, 2026 12:33
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/*.json, docs/system-specs/modules/ and test/test_chat_utils.py since this head was measured (4d0ae46 -> bab2387); CI re-running. The red Backend Tests shard 2 (and the Coverage Gate that follows it) on the old head was main's own test_the_package_stays_within_its_line_budget failure, which main now carries the fix for (#32252). Same patch, no code change.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (17 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: replaces the tool-risk badge's rating label with a 'Feedback only' string in every locale; with an updated test. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/decisions.md.

@bolichen97
bolichen97 merged commit 84be3f2 into main Nov 7, 2026
153 of 156 checks passed
@bolichen97
bolichen97 deleted the fix/12298-tool-risk-thumbs-label branch November 7, 2026 16:09
buluoray pushed a commit that referenced this pull request Nov 8, 2026
The risk badge's thumbs carried the label "Jev", repeating the word the
line opens with, and nothing visible said a vote is only feedback: that
meaning lived in the buttons' title and aria-label, which a sighted
reader on touch or keyboard never sees.

The label now reads "Feedback only". The key is renamed from rate_jev
to rate_label because its meaning changed, and all twelve catalogs, the
pseudolocale and the translator context carry the new value. The badge
row wraps, so on a phone-width pane the note and the thumbs take their
own lines instead of the note being squeezed to a narrow column. The
decisions spec states the label.

Closes #12298

(cherry picked from commit 84be3f2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up from #12253: tool.risk deferred findings (feature-map wording, late tool arguments, UX)

2 participants