Repository navigation
fix(ui): render failed-turn and retry notices as card banners - #6021
Conversation
A failed turn's banner and the provider retry notice both passed `container="section"` to Astryx `Banner`. That variant is the page-level, full-bleed, square-cornered surface, so the 800px message column showed a hard-edged block of status color that read as a page alert instead of part of the turn (apache#5799). Drop the prop so both fall back to the default `card` container — the standalone, rounded variant for content inside a column. Nothing else changes: the retry notice keeps its `role="status"` live region with the aria-hidden countdown (stable accessible name, see `ModelProviderRetryIndicator`), and every `.maka-turn-failed-banner` rule in styles.css was audited — all of them set block rhythm or style the `<pre>` diagnostic, none compensate the section shape, so none is dead. Fixes apache#5799 Generated-by: GLM-5.3-Flash (ZCode)
|
Before/after captures for the acceptance criteria (storybook-visual-diff.mjs — the A0/#5794 evidence loop; storybook rebuilt per tree, light and dark): FailedTurnWithToolError Before (section — square, full-bleed): After (card — rounded): ProviderRetrying Before (section — square, full-bleed): After (card — rounded): Pixel diff ( |
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
Review of fdcd031c (+0/-2, 2 files). The PR removes container="section" from the failed-turn Banner in packages/ui/src/chat-turn.tsx and from ProviderRetryNotice in packages/ui/src/provider-retry-notice.tsx, so both use the Banner's default container instead of the full-bleed page-level variant.
Findings: None at P0-P3.
- The retry notice keeps
role="status",aria-labeland its class, so its live-region behavior and stable accessible name are unchanged. The failed-turn banner keeps its status, class, title and description. - No test asserts the
sectioncontainer. The.maka-turn-failed-banner/.maka-turn-provider-retryCSS does not depend on full-bleed width, which matches the PR's audit. - The only other
container="section"use on main is the artifact preview (artifact-preview.tsx:251). That one is a page-level surface and is correctly out of scope. - I could not inspect the Astryx
Bannersource locally, so the claim that the default container iscardrests on the PR's Storybook captures. The before/after diff confined to the banner corners is consistent with it.
Status: CI test passes on fdcd031c, and the PR is MERGEABLE. No protocol files, so there is no epoch impact.
Astro-Han
left a comment
There was a problem hiding this comment.
Approved at @Astro-Han's explicit request: a small, focused change with no blocking findings in our automated review of this exact head, and CI is green.








Summary
A failed turn's banner and the provider retry notice both passed
container="section"to AstryxBanner— the page-level, full-bleed, square-cornered variant — so the 800px message column showed a hard-edged block of status color that read as a page-level alert instead of part of the turn. This drops the prop at both call sites so both fall back to the defaultcardcontainer (standalone, rounded), which is the variant for content inside a column.packages/ui/src/chat-turn.tsx— failed-turnBannerpackages/ui/src/provider-retry-notice.tsx— provider retry notice (ProviderRetryNotice)Nothing else changes. The retry notice keeps its
role="status"live region with the ticking countdownaria-hidden, so its accessible name stays stable (ModelProviderRetryIndicatorinchat-turn.tsx) — the constraint stated in the issue.CSS rules removed
Per the acceptance criterion, every rule in the
.maka-turn-failed-bannerfamily inpackages/ui/src/styles.csswas audited against the section→card switch (which only swapsborder-radius; Astryx applies identical margins for both containers):.maka-turn-failed-banner { margin-block: … }.maka-turn-failure-detail { … }(+@keyframes maka-turn-failure-enter+ reduced-motion opt-out)<pre>diagnostic inside the banner, still rendered.maka-turn-failure-unavailable { display: block }Rules removed: none. No product rule compensated the section shape (no width/negative-margin bleed anywhere), so nothing became dead. Verified with
rg 'maka-turn-failed-banner|maka-turn-provider-retry|maka-turn-failure'across the repo plus the AstryxBannersource innode_modules.Verification
FailedTurnWithToolError/ProviderRetryingcaptures (light + dark, A0 loop:scripts/storybook-visual-diff.mjs, storybook rebuilt per tree)comparereports pixel changes confined to the banner box (800×84 @ (368,578) failed-turn, 800×64 @ (368,600) retry) — 0.015% of each frame, the rounded corners onlynode --testonchat-turn-answer-identity,chat-turn-inline-references,chat-turn-steering-order,provider-retry-countdown,turn-running-spinnernpx biome checkon both changed filesnpm run check:asf-headerssectioncontainerInterim fix as scoped in the issue: two props, mergeable before C1. C1 must keep the retry notice announcing (stable accessible name, aria-hidden countdown).
AI use
Implemented and verified by GLM-5.3-Flash (ZCode) under the Apache Maka contribution workflow; author reviewed the diff, captures and test output.
Checklist
Bannercalls use the defaultcardcontainer.maka-turn-failed-bannerrules audited; removals reported (none needed — see table above)FailedTurnWithToolErrorandProviderRetryingin light and dark are attached (comment below)