Skip to content

fix(webui): sanitize and dismiss automation action errors - #6180

Merged
think-in-universe merged 14 commits into
mainfrom
issue-6178-automation-error-banner
Jul 20, 2026
Merged

think-in-universe merged 14 commits into
mainfrom
issue-6178-automation-error-banner

Conversation

@italic-jinxin

@italic-jinxin italic-jinxin commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replaces raw automation mutation errors with localized, user-safe copy across all supported locales.
  • Adds a dismissible, accessible error alert and clears stale errors whenever a pause, resume, rename, or delete operation starts or succeeds.
  • Adds a served Reborn WebUI v2 browser regression covering raw-error redaction, dismissal, retry clearing, and successful recovery.
image

Linked Issue

Closes #6178

Validation

  • corepack pnpm@11.7.0 lint:conventions
  • corepack pnpm@11.7.0 typecheck
  • TZ=UTC corepack pnpm@11.7.0 test
  • corepack pnpm@11.7.0 build
  • Targeted Reborn WebUI v2 Playwright E2E
  • scripts/pre-commit-safety.sh
  • git diff --check origin/main...HEAD

Security Impact

Yes. Failed automation actions no longer expose raw API or backend error text in the browser. No authentication or authorization behavior changes.

Database Impact

No schema, migration, or persistence changes.

Blast Radius

Limited to the Automations page frontend mutation-error state, presentation, and localized strings.

Rollback Plan

Revert the two commits to restore the previous automation action-error behavior.


Review track: A

@italic-jinxin italic-jinxin added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jul 17, 2026
@ironloopai

ironloopai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: f8b4a2c9d4ca7516d9135555aeca768698e7dd88
Result: One or more review results were superseded by a newer PR head.
Next: Run @ironloopai review on the latest PR head.
Updated: 2026-07-19T03:03:29.109Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Superseded N/A N/A 2026-07-17T12:00:39.069Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Superseded by a newer PR head. New head: c00fce1. Previous verdict: Approved.
Recent activity
Time Reviewer State Detail
2026-07-17T05:40:42.132Z ironloop/common-reviewer (reviewer) Superseded A newer PR head replaced this review (534e5d3).
2026-07-17T11:23:30.425Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head d97d076.
2026-07-17T11:23:30.425Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-17T11:23:30.562Z ironloop/common-reviewer (reviewer) Started Reviewer worker started.
2026-07-17T11:23:33.961Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (merge_ref) at 93a3cd5.
2026-07-17T11:28:35.170Z ironloop/common-reviewer (reviewer) Result captured Approved; 0 blocking findings.
2026-07-17T11:28:35.170Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
2026-07-17T12:00:39.069Z ironloop/common-reviewer (reviewer) Superseded A newer PR head replaced this review (c00fce1).
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent>
Run metadata

Admission: webhook accepted the request and IronLoop persisted reviewer state before this projection.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 05:27 Destroyed
@italic-jinxin

Copy link
Copy Markdown
Contributor Author

@claude review

@coderabbitai

coderabbitai Bot commented Jul 17, 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: a8ebc556-c556-47d7-975a-395a88b197e6

📥 Commits

Reviewing files that changed from the base of the PR and between c00fce1 and 5edd838.

📒 Files selected for processing (2)
  • tests/e2e/helpers.py
  • tests/e2e/scenarios/test_reborn_webui_v2_smoke.py
💤 Files with no reviewable changes (1)
  • tests/e2e/helpers.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Automation action failures now show a clear, localized error via toast (with retry guidance) and avoid exposing raw backend details.
    • Error visibility on the Automations page now uses the dedicated “load failed” banner logic.
    • Outdated action errors no longer overwrite newer results; failure notifications are dismissible and clear after a successful retry.
  • Localization

    • Added automations.error.actionFailed across supported languages.
  • Tests

    • Added/updated unit tests for locale completeness and toast dismissal, plus an end-to-end retry scenario.

Walkthrough

Automation mutations now use localized, dismissible toasts with sequence-based stale-result protection. Load errors remain page banners, while action errors use toasts. Locale coverage, unit tests, and an end-to-end retry flow validate the behavior.

Changes

Automation error handling

Layer / File(s) Summary
Toast dismissal helper
crates/ironclaw_webui_v2/frontend/src/lib/toast.ts, crates/ironclaw_webui_v2/frontend/src/lib/toast.test.ts
Adds nullable-safe dismissal for individual toast IDs and tests its behavior.
Latest-action mutation lifecycle
crates/ironclaw_webui_v2/frontend/src/pages/automations/hooks/useAutomations.ts, crates/ironclaw_webui_v2/frontend/src/pages/automations/hooks/useAutomations.test.ts
Routes pause, resume, rename, and delete mutations through shared sequence-aware callbacks that show, dismiss, and clear action-error toasts while ignoring stale results.
Localized error contract and page rendering
crates/ironclaw_webui_v2/frontend/src/i18n/*, crates/ironclaw_webui_v2/frontend/src/lib/i18n.test.ts, crates/ironclaw_webui_v2/frontend/src/pages/automations/automations-page.tsx
Adds automations.error.actionFailed to every locale, validates non-empty translations, and limits the page banner to localized load failures.
Browser error recovery validation
tests/e2e/helpers.py, tests/e2e/scenarios/test_reborn_webui_v2_smoke.py
Adds toast selection and verifies localized failure display, raw-error isolation, dismissal, retry clearing, and mutation ordering.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AutomationsPage
  participant useAutomations
  participant AutomationsAPI
  participant Toast
  User->>AutomationsPage: perform automation action
  AutomationsPage->>useAutomations: start mutation
  useAutomations->>AutomationsAPI: submit action
  AutomationsAPI-->>useAutomations: error or success
  useAutomations->>Toast: show or clear localized error
Loading

Possibly related PRs

Suggested reviewers: ilblackdragon

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is Conventional Commits-style and accurately summarizes the automation error sanitization and dismiss behavior change.
Description check ✅ Passed The description is mostly complete and covers the required template sections, including summary, linked issue, validation, impact, and rollback.
Linked Issues check ✅ Passed The code matches #6178 by replacing raw action errors with localized UI copy, adding dismissal, and clearing stale errors on retry or success.
Out of Scope Changes check ✅ Passed The touched files stay within the automations error UX, locale strings, tests, and toast plumbing; no unrelated scope is evident.

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request improves error handling for automation actions (pause, resume, rename, and delete) by replacing raw error messages with a localized, dismissible alert banner. It updates the useAutomations hook to manage error state safely, adds localized error strings across multiple languages, and introduces an E2E test to verify that raw errors are not exposed and that the error banner can be dismissed or cleared on retry. Feedback is provided to log the raw error to the console when an action fails, as discarding it completely makes debugging difficult.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/ironclaw_webui_v2/frontend/src/pages/automations/hooks/useAutomations.ts Outdated

@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: reviewer

Review at a glance

Verdict Blocking Notes Inline Head
✅ Approved 0 0 0 e4e99755340b

Head: e4e99755340b1e1c6a8b8a93f312b464472d06b3
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

Reviewed the complete focused diff. Automation mutation failures now render localized generic copy instead of raw backend errors, and the alert clears on retry, success, or dismissal. No concrete actionable defects found.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.

@railway-app

railway-app Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 19, 2026 at 3:18 am

@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.53% (311164 / 363818 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 363818 lines now vs 320188 at floor capture (+43630 lines, +13.63%) — material change (>5%)

⚠️ 2 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts

Reborn integration-tier coverage

Line coverage (Reborn crates): 85.53% — 311164 / 363818 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 345
ironclaw_runtime_policy 31.75% 80 / 252
ironclaw_event_projections 43.31% 673 / 1554
ironclaw_observability 61.54% 16 / 26
ironclaw_authorization 62.46% 604 / 967
ironclaw_dispatcher 62.88% 83 / 132
ironclaw_mcp 64.89% 595 / 917
ironclaw_triggers 65.44% 2142 / 3273
ironclaw_filesystem 67.78% 3957 / 5838
ironclaw_channel_host 68.65% 219 / 319
ironclaw_memory 69.2% 773 / 1117
ironclaw_reborn_migration 71.64% 1551 / 2165
ironclaw_trust 72.88% 661 / 907
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.67% 958 / 1283
ironclaw_extractors 74.72% 538 / 720
ironclaw_reborn_cli 75.17% 8946 / 11901
ironclaw_capabilities 75.44% 2024 / 2683
ironclaw_projects 76.48% 400 / 523
ironclaw_llm 78.36% 20306 / 25915
ironclaw_product_context 78.57% 11 / 14
ironclaw_run_state 79.25% 424 / 535
ironclaw_telegram_extension 80.18% 4842 / 6039
ironclaw_wasm_product_adapters 80.36% 1448 / 1802
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_first_party_extensions 81.06% 5965 / 7359
ironclaw_memory_native 81.17% 3195 / 3936
ironclaw_events 81.95% 1594 / 1945
ironclaw_secrets 82.78% 2827 / 3415
ironclaw_network 82.98% 673 / 811
ironclaw_reborn_identity 83.59% 433 / 518
ironclaw_processes 83.76% 939 / 1121
ironclaw_reborn_config 84.04% 1832 / 2180
ironclaw_wasm 84.44% 1069 / 1266
ironclaw_auth 84.81% 3233 / 3812
ironclaw_product_workflow 84.91% 11031 / 12992
ironclaw_turns 85.46% 14248 / 16673
ironclaw_channel_delivery 85.79% 1383 / 1612
ironclaw_common 86.13% 1714 / 1990
ironclaw_threads 86.93% 4708 / 5416
ironclaw_slack_v2_adapter 87.3% 1491 / 1708
ironclaw_skills 87.58% 4470 / 5104
ironclaw_host_api 87.66% 3496 / 3988
ironclaw_hooks 87.78% 9921 / 11302
ironclaw_reborn_composition 87.96% 70209 / 79816
ironclaw_product_adapter_registry 88.06% 531 / 603
ironclaw_product_adapters 88.1% 3384 / 3841
ironclaw_reborn_traces 88.2% 11946 / 13544
ironclaw_host_runtime 88.68% 18033 / 20334
ironclaw_webui 88.9% 7652 / 8607
ironclaw_extensions 89.38% 2971 / 3324
ironclaw_reborn_openai_compat 89.5% 3778 / 4221
ironclaw_runner 89.65% 17365 / 19370
ironclaw_telegram_v2_adapter 89.7% 2717 / 3029
ironclaw_approvals 90.18% 1598 / 1772
ironclaw_conversations 90.39% 3123 / 3455
ironclaw_event_streams 90.82% 1009 / 1111
ironclaw_resources 91.65% 4476 / 4884
ironclaw_loop_host 92.28% 15567 / 16870
ironclaw_attachments 93.06% 630 / 677
ironclaw_agent_loop 94.88% 9184 / 9680
ironclaw_safety 95.04% 3677 / 3869
ironclaw_outbound 95.52% 3451 / 3613
ironclaw_first_party_extension_ports 95.62% 3672 / 3840

This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors.

Exemptions (3 entry/entries excluded from the accounting above)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@italic-jinxin italic-jinxin self-assigned this Jul 17, 2026
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 05:40 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 08:06 Destroyed
@italic-jinxin

Copy link
Copy Markdown
Contributor Author

@claude review

@claude

This comment was marked as resolved.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 09:24 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 09:45 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 10:46 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 11:02 Destroyed
@italic-jinxin
italic-jinxin marked this pull request as ready for review July 17, 2026 11:23

@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: reviewer

Review at a glance

Verdict Blocking Notes Inline Head
✅ Approved 0 0 0 d97d076ce080

Head: d97d076ce0800b07fefb57d4dcc04100a64d5ba4
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

Focused, reviewable frontend change. Automation mutation failures now use localized generic toast copy without rendering or logging raw errors, and stale results are sequence-guarded. Dismissal, retry clearing, accessibility, and recovery have meaningful unit and browser regression coverage. No concrete issues found.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.

@italic-jinxin

Copy link
Copy Markdown
Contributor Author

@claude review

@claude

This comment was marked as resolved.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 12:00 Destroyed

@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: 2

🤖 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 `@tests/e2e/helpers.py`:
- Line 385: Remove the duplicate "toast" entry from the selector mapping in
tests/e2e/helpers.py, preserving the existing SEL_V2["toast"] definition and
resolving the Ruff F601 duplicate-key violation.

In `@tests/e2e/scenarios/test_reborn_webui_v2_smoke.py`:
- Around line 519-535: Update
test_reborn_v2_automation_action_error_toast_is_safe_dismissible_and_cleared_on_retry
to use the canonical reborn_v2_page fixture instead of creating a browser
context and page manually; remove the new_context/new_page setup and rely on
fixture-managed isolation and cleanup, including the corresponding setup at the
additionally referenced lines.
🪄 Autofix (Beta)

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: fc8dac5c-de59-4df8-9f1b-42a15c696d51

📥 Commits

Reviewing files that changed from the base of the PR and between 81dbdc6 and c00fce1.

📒 Files selected for processing (19)
  • crates/ironclaw_webui_v2/frontend/src/i18n/ar.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/de.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/en.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/es.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/fr.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/hi.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/ja.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/ko.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/pt-BR.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/uk.ts
  • crates/ironclaw_webui_v2/frontend/src/i18n/zh-CN.ts
  • crates/ironclaw_webui_v2/frontend/src/lib/i18n.test.ts
  • crates/ironclaw_webui_v2/frontend/src/lib/toast.test.ts
  • crates/ironclaw_webui_v2/frontend/src/lib/toast.ts
  • crates/ironclaw_webui_v2/frontend/src/pages/automations/automations-page.tsx
  • crates/ironclaw_webui_v2/frontend/src/pages/automations/hooks/useAutomations.test.ts
  • crates/ironclaw_webui_v2/frontend/src/pages/automations/hooks/useAutomations.ts
  • tests/e2e/helpers.py
  • tests/e2e/scenarios/test_reborn_webui_v2_smoke.py
💤 Files with no reviewable changes (1)
  • crates/ironclaw_webui_v2/frontend/src/pages/automations/automations-page.tsx

Comment thread tests/e2e/helpers.py Outdated
Comment thread tests/e2e/scenarios/test_reborn_webui_v2_smoke.py
@italic-jinxin italic-jinxin added the human-verified Manually tested and verified label Jul 17, 2026
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 17, 2026 12:17 Destroyed
…-error-banner

# Conflicts:
#	crates/ironclaw_webui/frontend/src/pages/automations/hooks/useAutomations.test.ts
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 18, 2026 17:03 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6180 July 19, 2026 03:03 Destroyed
@think-in-universe
think-in-universe added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 769d131 Jul 20, 2026
65 checks passed
@think-in-universe
think-in-universe deleted the issue-6178-automation-error-banner branch July 20, 2026 10:04
@coderabbitai coderabbitai Bot mentioned this pull request Aug 3, 2026
7 tasks done

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-6180 — f8b4a2c9 Deployed Jul 19, 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: core 20+ merged PRs human-verified Manually tested and verified risk: low Changes to docs, tests, or low-risk modules size: M 50-199 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automation error banner cannot be dismissed and exposes raw API errors

2 participants