Skip to content

fix(webui): soften failed-tool activity summary with a subtle badge (#7302) - #7305

Merged
rdisandro merged 2 commits into
mainfrom
webui/activity-failed-badge
Aug 12, 2026
Merged

rdisandro merged 2 commits into
mainfrom
webui/activity-failed-badge

Conversation

@rdisandro

Copy link
Copy Markdown
Contributor

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

  • Remove the whole-row red. Both summary rows — ActivityRun (the "Activity - N tools, M failed" line) and the collapsed ToolRun line — now stay in the neutral muted text in all states, hover included. The hasError ? danger : neutral recolor is gone.
  • Subtle badge instead. A recovered failure is flagged only by a small warning-tinted alert glyph (--v2-warning-text, a muted amber/copper — not the danger red) placed after the summary label. Informational, not alarming.
  • Accessibility. ActivityRun's label already contains "N failed", so its badge is decorative. The collapsed ToolRun summary text (e.g. "Explored 9 files, ran 2 commands") omits the count, so its badge carries an sr-only note reusing the existing activity.failed / activity.failedPlural strings — no new i18n keys across the 11 locales.
  • Adds an alert glyph to the icon set (there was no warning/alert icon; a missing name silently falls back to spark).

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.ts pinning: no whole-row danger recolor in either summary row, the failure-gated warning badge in each, the sr-only note on the tool-run badge, and the presence of the alert glyph.

  • pnpm test — 126 files / 1104 tests pass
  • pnpm lint (conventions + tsc --noEmit) — clean

🤖 Generated with Claude Code

…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>
@railway-app

railway-app Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-7305 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Aug 12, 2026 at 5:35 pm

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-7305 August 6, 2026 17:29 Destroyed
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44a4f03b-0253-4213-8a4c-89f82e9d6727

📥 Commits

Reviewing files that changed from the base of the PR and between 173f078 and 4a1151c.

📒 Files selected for processing (4)
  • crates/product/ironclaw_webui/frontend/src/design-system/icons.tsx
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsx
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.test.ts
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added warning indicators for failed activity and tool runs.
    • Failure summaries now include accessible singular or plural screen-reader labels.
  • Bug Fixes

    • Failed tool activity remains visually subtle instead of applying danger styling to the entire row or summary.
  • Tests

    • Added regression coverage for warning badges, accessible failure labels, and the alert icon.

Walkthrough

The 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.

Changes

Tool failure UI

Layer / File(s) Summary
Add alert icon
crates/product/ironclaw_webui/frontend/src/design-system/icons.tsx
The icon set now includes an alert triangle with an exclamation mark.
Render failed tool runs
crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx, crates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsx, crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.test.ts
Failed runs retain neutral text styling, show warning icons, and expose localized singular or plural failure counts. Regression tests cover the styling, accessible labels, and alert glyph.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: benkurrek

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, linked issue, tests, and validation, but omits most required template sections and the review track. Use the repository template and complete Change Type, Test Strategy, Security Impact, Database Impact, Blast Radius, Rollback Plan, Review Follow-Through, and Review track.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits style and accurately describes the failed-tool summary UI change.
Linked Issues check ✅ Passed The changes directly address issue #7302 by reducing failed-tool summary emphasis while preserving detailed failure indicators.
Out of Scope Changes check ✅ Passed The icon, component, accessibility, and regression-test changes are within the scope of issue #7302.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9c85269 and d265453.

📒 Files selected for processing (4)
  • crates/product/ironclaw_webui/frontend/src/design-system/icons.tsx
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/activity-run.tsx
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.test.ts
  • crates/product/ironclaw_webui/frontend/src/pages/chat/components/tool-activity.tsx

Comment on lines +39 to +47
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)]"
/>)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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.

@ironloopai

ironloopai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Review · PR #7305

🟢 Completed · Review submitted

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
  • Repository: nearai/ironclaw
  • Base: main at 9c85269
  • Head: webui/activity-failed-badge at d265453
  • Created: Aug 6, 2026, 5:34 PM UTC
  • Updated: Aug 6, 2026, 5:36 PM UTC
  • Run: 3d86879e-949b-4914-895e-2a0f2bd0b2d3
  • Latest attempt: 1 · Completed · bb31225f-2f39-4be4-a853-ce94b03aa469

@ironloopai ironloopai Bot 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.

🔍 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-badge at d265453
  • Run: 3d86879e-949b-4914-895e-2a0f2bd0b2d3

@rdisandro
rdisandro marked this pull request as draft August 6, 2026 18:45
@github-actions github-actions Bot added size: S 10-49 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: regular 2-5 merged PRs labels Aug 6, 2026
@hanakannzashi

Copy link
Copy Markdown
Contributor

@ironloopai review

@ironloopai

ironloopai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🧭 IronLoop Run · Review

This comment updates in place as the Run moves through its stages.

🟥 Final result · Could not complete

🟨 Queued → 🟦 Working → 🟥 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

  • Failure reference: bfebd7f7-f839-4331-8c8f-d21a0f147bfe
Run details

Run: 4d46d562-1631-4eac-90d1-3b5c736cdc29
Base: main at 9c85269
Head: webui/activity-failed-badge at d265453
Created: 2026-08-07 02:57 UTC
Updated: 2026-08-07 02:57 UTC

@hanakannzashi

Copy link
Copy Markdown
Contributor

@ironloopai review

@ironloopai

ironloopai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🧭 IronLoop Run · Review

This comment updates in place as the Run moves through its stages.

🟩 Final result · Completed

🟨 Queued → 🟦 Working → 🟦 Posting results → 🟩 Completed

Manual command by hanakannzashi · attempt 1 of 3 · completed in 1m 37s

IronLoop completed the review and posted it to GitHub.

🔗 Result

Open submitted review →

Run details

Run: f47c1838-7687-4190-bbea-5085326d3ef5
Base: main at a2a8040
Head: webui/activity-failed-badge at d265453
Created: 2026-08-07 04:40 UTC
Updated: 2026-08-07 04:41 UTC

@ironloopai ironloopai Bot 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.

🔍 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

@rdisandro

Copy link
Copy Markdown
Contributor Author

Before / after of this change — light and dark:

Activity summary before/after: the whole row painted red vs. neutral muted text with a small amber warning badge
  • Before: the whole "Activity - 13 tools, 4 failed" summary row was painted in the danger red, so a run the agent recovered from still read as a top-level error.
  • After: the row stays in neutral muted text in every state; the only failure cue is a small badge in the muted warning token (amber in dark, copper in light — deliberately not the danger red). The "N failed" count stays in the label, and the collapsed ToolRun badge carries an sr-only note for assistive tech.

Individual failed tool rows are unchanged — they keep their red status dot and error tab on expand. Only the summary line is de-escalated.

Badge placement and glyph are easy to tweak — happy to move it to lead the row (next to the layers icon) or swap the triangle if reviewers prefer.

@rdisandro
rdisandro marked this pull request as ready for review August 7, 2026 17:30
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-7305 August 12, 2026 17:25 Destroyed
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

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.

@rdisandro
rdisandro enabled auto-merge August 12, 2026 17:26
@rdisandro
rdisandro added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit ee3146a Aug 12, 2026
41 checks passed
@rdisandro
rdisandro deleted the webui/activity-failed-badge branch August 12, 2026 19:45
l3ocifer pushed a commit to l3ocifer/frick-ironclaw that referenced this pull request Sep 3, 2026
…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>

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-7305 — 4a1151c2 Deployed Aug 12, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: regular 2-5 merged PRs risk: low Changes to docs, tests, or low-risk modules size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve tool call UI when one of the calls failed

3 participants