fix(webui): soften failed-tool activity summary with a subtle badge (#7302) - #7305
Conversation
…7302) When a tool call failed mid-run, the whole collapsed activity summary ("Activity - 13 tools, 4 failed") was painted in the danger color, so a run the agent recovered from still read as an alarming error. Drop the whole-row danger recolor from both summary rows (ActivityRun and the collapsed ToolRun) and keep them in the neutral muted text. A recovered failure is now flagged only by a small warning-tinted `alert` badge — an informational cue, not a red banner. The collapsed tool-run summary text omits the failure count, so its badge carries an sr-only note (reusing the existing activity.failed strings) for assistive technology. Adds an `alert` glyph to the icon set and a source-level regression test pinning: no whole-row danger recolor, the gated warning badge in each row, and the accessible note on the tool-run badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
🚅 Deployed to the ironclaw-pr-7305 environment in ironclaw-ci-preview
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe chat UI now presents failed tool calls with neutral styling, warning icons, and localized accessible failure counts. Tests cover failed activity and tool-run presentation. ChangesTool failure UI
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@crates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsx`:
- Around line 39-47: The collapsed ActivityRun row exposes the alert icon as
aria-hidden without an accessible failure announcement when multiple tools
include a single failure. Update the collapsed-row markup near summary.label and
the failure badge to add an sr-only failure note only when failure details are
not already conveyed, avoiding duplicate announcements; then add coverage for
this contract in tool-activity.test.ts.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: abedcd76-8721-4441-be7d-1fff7968778a
📒 Files selected for processing (4)
crates/product/ironclaw_webui/frontend/src/design-system/icons.tsxcrates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsxcrates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.test.tscrates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx
| className="v2-button flex w-full min-w-0 items-center gap-2 border-0 bg-transparent px-1 py-1.5 text-left text-sm text-iron-400 hover:text-iron-200" | ||
| > | ||
| <Icon name="layers" className="h-4 w-4 shrink-0" /> | ||
| <span className="min-w-0 truncate">{summary.label}</span> | ||
| {summary.hasError && | ||
| (<Icon | ||
| name="alert" | ||
| className="h-3.5 w-3.5 shrink-0 text-[var(--v2-warning-text)]" | ||
| />)} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
fd -t f 'activity-summary' crates/product/ironclaw_webui/frontend/src \
--exec rg -n -C 8 'summarizeActivity|hasError|failed' {}Repository: nearai/ironclaw
Length of output: 5963
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== activity-run.tsx =="
fd -t f '^activity-run\.tsx$' crates/product/ironclaw_webui/frontend/src --exec sed -n '1,120p' {}
echo
echo "== ToolActivity test =="
fd -t f '^tool-activity\.test\.ts$' crates/product/ironclaw_webui/frontend/src --exec sed -n '1,220p' {}
echo
echo "== Icons aria-hidden =="
fd -t f '^icons\.tsx$' crates/product/ironclaw_webui/frontend/src --exec rg -n -C 3 'aria-hidden|export const Icon' {}Repository: nearai/ironclaw
Length of output: 9255
Expose the ActivityRun failure count for collapsed rows.
summary.label includes “1 failed”, so the failure status is not invisible on its first failure. In this implementation, when tools > 1 and only one tool fails, summary.label can read “Activity - 2 tools, 1 failed” while the alert icon is aria-hidden. Add an sr-only failure note after the badge where failure details are not already exposed, and cover the contract in tool-activity.test.ts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@crates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsx`
around lines 39 - 47, The collapsed ActivityRun row exposes the alert icon as
aria-hidden without an accessible failure announcement when multiple tools
include a single failure. Update the collapsed-row markup near summary.label and
the failure badge to add an sr-only failure note only when failure details are
not already conveyed, avoiding duplicate announcements; then add coverage for
this contract in tool-activity.test.ts.
🔎 Review · PR #7305
Submitted review →Reviewed the complete trusted base-to-head comparison. The focused WebUI change correctly replaces summary-row danger styling with warning badges while preserving detailed failure presentation and accessible failure counts. No concrete actionable defects were found. Automatic · PR opened · attempt 1 of 3 · completed in 1m 56s Run details
|
There was a problem hiding this comment.
🔍 Review complete · PR #7305
✅ No actionable findings
Reviewed the complete trusted base-to-head comparison. The focused WebUI change correctly replaces summary-row danger styling with warning badges while preserving detailed failure presentation and accessible failure counts. No concrete actionable defects were found.
Validation and technical details
- Verified trusted comparison refs/ironloop/base (9c85269) through refs/ironloop/head (d265453), covering all four changed files.
- Inspected surrounding activity summarization, tool-run expansion/error behavior, icon rendering, localization keys across supported locales, and warning design tokens.
- Repository knowledge graph was unavailable; followed the required fallback using crate-local guidance and targeted live-code inspection.
- git diff --check refs/ironloop/base...refs/ironloop/head passed.
- Frontend test suite passed: 126 files, 1104 tests.
- Frontend lint, source conventions, and TypeScript typecheck passed. Validation used Node 24.18.0 despite the project recommending Node 22.22.x; pnpm 11.7.0 matched the pinned version.
- Base:
main - Head:
webui/activity-failed-badgeatd265453 - Run:
3d86879e-949b-4914-895e-2a0f2bd0b2d3
|
@ironloopai review |
🧭 IronLoop Run · ReviewThis comment updates in place as the Run moves through its stages. 🟥 Final result · Could not complete
Manual command by hanakannzashi · failed after 13s The trusted repository configuration for Review is invalid. Fix the repository configuration on the base branch, then try again. Failure details
|
|
@ironloopai review |
🧭 IronLoop Run · ReviewThis comment updates in place as the Run moves through its stages. 🟩 Final result · Completed
Manual command by hanakannzashi · attempt 1 of 3 · completed in 1m 37s IronLoop completed the review and posted it to GitHub. 🔗 Result |
There was a problem hiding this comment.
🔍 IronLoop review
🟢 No actionable findings
Reviewed the complete four-file comparison. The warning badges, neutral summary styling, localized accessible failure count, and alert icon are consistent with the stated intent. No actionable defects found.
Validation
- ✅ Frontend tests — All 126 test files and 1104 tests passed.
- ✅ Source conventions — The frontend source-convention check passed.
- ✅ TypeScript typecheck — tsc --noEmit passed.
- ✅ Diff integrity — git diff --check passed for refs/ironloop/merge-base..refs/ironloop/head.
- ⚪ Frontend lint wrapper — Not run. The combined lint script was blocked by an environment Corepack version mismatch inside its nested pnpm invocation; its two constituent checks were run separately and passed. Validation used Node 24.19.0 although the project declares Node 22.22.x.
- ⚪ Knowledge graph — Not run. The repository graph artifact was missing, so review used the documented fallback of local guidance and targeted live-code inspection.
Review details
- Run:
f47c1838-7687-4190-bbea-5085326d3ef5 - Workflow: Review
- Attempts: 1
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…earai#7302) (nearai#7305) When a tool call failed mid-run, the whole collapsed activity summary ("Activity - 13 tools, 4 failed") was painted in the danger color, so a run the agent recovered from still read as an alarming error. Drop the whole-row danger recolor from both summary rows (ActivityRun and the collapsed ToolRun) and keep them in the neutral muted text. A recovered failure is now flagged only by a small warning-tinted `alert` badge — an informational cue, not a red banner. The collapsed tool-run summary text omits the failure count, so its badge carries an sr-only note (reusing the existing activity.failed strings) for assistive technology. Adds an `alert` glyph to the icon set and a source-level regression test pinning: no whole-row danger recolor, the gated warning badge in each row, and the accessible note on the tool-run badge. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

What & why
Closes #7302.
When a tool call failed mid-run, the entire collapsed activity summary — e.g. Activity - 13 tools, 4 failed — was painted in the danger (red) color. A run the agent recovered from and completed successfully still read as an aggressive, top-level error, which is exactly what the issue flags: "The tool failure should be for information only and more hidden."
Change
ActivityRun(the "Activity - N tools, M failed" line) and the collapsedToolRunline — now stay in the neutral muted text in all states, hover included. ThehasError ? danger : neutralrecolor is gone.alertglyph (--v2-warning-text, a muted amber/copper — not the danger red) placed after the summary label. Informational, not alarming.ActivityRun's label already contains "N failed", so its badge is decorative. The collapsedToolRunsummary text (e.g. "Explored 9 files, ran 2 commands") omits the count, so its badge carries ansr-onlynote reusing the existingactivity.failed/activity.failedPluralstrings — no new i18n keys across the 11 locales.alertglyph to the icon set (there was no warning/alert icon; a missing name silently falls back tospark).The failure detail itself is unchanged — individual failed tool rows keep their red status dot and error tab, and error/declined runs still auto-expand. Only the summary line is de-escalated.
Tests
Source-level regression test in
tool-activity.test.tspinning: no whole-row danger recolor in either summary row, the failure-gated warning badge in each, thesr-onlynote on the tool-run badge, and the presence of thealertglyph.pnpm test— 126 files / 1104 tests passpnpm lint(conventions +tsc --noEmit) — clean🤖 Generated with Claude Code