Skip to content

fix(design-critique): say the composer below is the retry on a failed ask turn - #21891

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/13487
Oct 19, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/13487

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When a Design Critique ask turn fails, the error tells the user to ask again in the composer just below it.

The failed turn showed only the raw failure text, such as "Agent session ended before it replied". Nothing said the Ask box under it is where you retry. A blind reader in the UX Review lane on #13461 said: "if the thing that answers is gone, I don't know if typing here would work."

Why it matters

A user whose question failed does not know whether typing again will work, so they may give up on the annotation or reload the page and lose the thread.

Not a goal

  • Changing the failure text itself. The message stays the raw string, because it is the error journal's lookup key.
  • Adding a retry button. The composer below is already the retry surface.
  • Changing any other Design Critique error.

What changed (motivation → approach → change)

The failed turn's ErrorNotice in website/src/apps/design-critique/AskLayer.tsx now has a bold title: "Answer failed — ask again below". The raw failure text sits on its own line under it (messagePlacement="below"), so the guidance leads and the server string reads as the detail.

The title is a new apps.designCritique.askLayer.answer_failed_ask_again_below key, written by hand in en.manual.json and translated in every locale catalogue under website/src/i18n/locales/. The en-XA pseudolocale was regenerated with gen-pseudolocale.mjs.

Backwards compatibility

Compatible: the notice gains a title and a layout prop; the message and its journal key are unchanged.

Removes nothing: the failure text still renders in full, only under the new title.

Tests

  • website/src/test/DesignCritiqueAskLayerCov80.test.tsx: a new case renders a failed turn and asserts the alert carries both the guidance title and the unchanged failure text. It fails on the parent commit (title absent) and passes here.
  • Determinism: the file passed 3 repeat runs and one --sequence.shuffle run.
  • src/i18n suite (50 files, 1022 tests) with I18N_BASE_REF set, covering catalogue parity, pseudolocale and per-locale style checks; i18n:check, i18n:render, gen-pseudolocale.mjs --check, tsc -p tsconfig.app.json and eslint on the touched files all exit 0.

Manual verification

Rendered AskLayer with a failed turn in Chromium (Vite dev server on loopback, English, dark theme) before and after the change; screenshots below.

Screenshots / video

Before: only the failure text.

before

After: the guidance title, with the failure text under it.

after

Related Issues

Closes #13487

Pattern harvest

Not generalizable: a missing piece of guidance copy on one notice, not a code defect class.

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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 18, 2026 12:28
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b8dd13a6e97dd97e8c651d5d5d9e571e1a5ad26d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check the title on a failed turn that is not the last one in a thread. "Ask again below" then sits above later answers, not directly over the composer.

[DESIGN-REVIEWED] b8dd13a

Description read

[DESCRIPTION-READ] cab108fea464afc23dc378e11e05e7d92bed5b2def0845c2afe3c72b367b8d80

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of b8dd13a6e97dd97e8c651d5d5d9e571e1a5ad26d — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: when an ask turn fails, the user should know they can retry by typing in the Ask composer just below it. This is a FIX.

  1. A failed ask turn now shows the bold title "Answer failed — ask again below" — justified
  2. The raw failure text moves to its own line under the new title — justified
  3. The new title is translated in every locale catalogue, and the en-XA pseudolocale is regenerated — justified

[FIRST-PRINCIPLES-REVIEWED] b8dd13a

Description read

[DESCRIPTION-READ] b0dc58548d0d5c8ca26f6bcba2175f582d3f39af297289fb2fa9a7bd86f2573e

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] b8dd13a

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable b8dd13a6e97dd97e8c651d5d5d9e571e1a5ad26d: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of b8dd13a6e97dd97e8c651d5d5d9e571e1a5ad26d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

The new title says "ask again below", but the box below says "Ask a follow-up…", so users can't tell they must retype the failed question.

Watch

  • "Ask again" and "follow-up" mean different things to the user. The new title (answer_failed_ask_again_below) points at an input whose placeholder is still 'Ask a follow-up…' (AskLayer.tsx). The composer is not prefilled with the failed t.q, so retrying means typing the question out again. The blind reader on shot-02: "'Ask again' and 'follow-up' sound like two different things… I can't tell if I have to type my old question again." This happens every time a turn fails. The guidance works, but the user hesitates at the exact point where they retry. Severity: medium (occasional failures × friction at the retry step × every failure).
  • The failure reason is still jargon. Under the new title, the reader called "Agent session ended before it replied" words they "don't understand". The PR keeps this text on purpose, so this is a note only. The title now carries the guidance, which keeps severity low.

Suggestions

  • When the last turn has failed, change the placeholder from 'Ask a follow-up…' to "Ask your question again…". That ties the input to the title. The placeholder is currently a hardcoded English string, so route it through i18nT.
  • Another option: change the title to "Answer failed — type your question again below" so it says outright that the old question won't be resent.

[UX-REVIEWED] b8dd13a

Description read

[DESCRIPTION-READ] 01f70a123e9b72b713d7963ccd52f405d622c4d47ed40571ee10b00a9b9943a2

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b8dd13a

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b8dd13a6e97dd97e8c651d5d5d9e571e1a5ad26d: <one-sentence reason>

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=3c3b0505dfd0 accepted-and-deferred: retry title and composer placeholder use different words

The placeholder "Ask a follow-up…" is a hardcoded, untranslated string this PR does not touch; the frozen goal is the notice title only.
Aligning it needs two new i18n keys in every catalogue plus a failed-last-turn branch, which is new copy outside this goal.
Deferred to #21894 (deferred-finding, assigned, Due 2026-11-07), which asks for a retry placeholder matching this title.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=b7e1c623d70d accepted-and-deferred: user may not know whether to retype the failed question

Refilling the composer with the failed question is new behavior, not guidance copy; the goal is only to name the retry surface.
Deferred to #21894 task 3, which asks the owner to decide on refilling and build it if yes.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=b604a5a414d1 accepted-and-deferred: translate the placeholder and use "Ask again…" after a failed turn

Same scope as span=3c3b0505dfd0: the placeholder predates this PR and is outside its goal.
Deferred to #21894 tasks 1 and 2.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: does "ask again below" stay true for every failure that reaches t.a?

Yes. The Ask composer renders under the whole thread for any open annotation, and askFollowUp sends on it whenever no turn is pending, so every failed turn, older or latest, has the composer below it.
A failure that repeats on retry still gets a new failed turn with the same notice; the title names where to retry, not a promise that the retry succeeds.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/*.json (13 catalogues) since this head went green (93e2787 -> 39439b2); CI re-running.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=397be1146694 accepted-and-deferred: "ask again" title vs "Ask a follow-up…" placeholder, composer not prefilled

Same class as the prior head's span=3c3b0505dfd0 and span=b7e1c623d70d. The placeholder is untranslated pre-existing copy and prefilling is new behavior, both outside this goal.
Deferred to #21894 (deferred-finding, assigned, Due 2026-11-07).

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the failure reason under the title is still jargon
  • span=966d53080db6

The message is kept verbatim on purpose: it is the error journal's lookup key, listed under Not a goal. The new title carries the plain-language guidance, and the reason now reads as the secondary line.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=b4039761e003 accepted-and-deferred: "Ask your question again…" placeholder after a failed last turn, via i18nT

Same scope as the prior head's span=b604a5a414d1. Deferred to #21894 tasks 1 and 2.

@iamwhatever

iamwhatever commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=a3445154461a needs-a-decision: retitle to "Answer failed — type your question again below"

This is wording inside this PR's goal, so it is the maintainer's call. It would say outright that the old question is not resent, at the cost of a longer title and re-translating 11 catalogues.
Question for the maintainer: keep "Answer failed — ask again below", or switch to the longer title? I would switch only if #21894 will not land soon.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: on an older failed turn, "ask again below" sits above later answers, not right over the composer

"Below" stays true: the composer renders under the whole thread, so it is below every turn. The title names where to retry, not that the composer is adjacent. A retry appends a new turn at the end either way.

@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 Oct 18, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Review-ready at b8dd13a: PR Readiness passed (103 checks, 0 failing), green is fresh against main, one commit, and every review item on this head has a disposition. One wording question is left for the maintainer in the needs-a-decision reply (keep "Answer failed — ask again below" or switch to "Answer failed — type your question again below"). The placeholder and refill follow-ups are tracked in #21894. Not merged, approved or set to auto-merge; that is the maintainer's call.

@mbriones98 mbriones98 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.

Checks green and readiness passed at b8dd13a; no behavior change.

@chenmingwei23
chenmingwei23 merged commit 7430dfa into main Oct 19, 2026
104 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/13487 branch October 19, 2026 02:03
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 19, 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.

design-critique: a failed ask turn does not say the composer below is the retry

3 participants