Skip to content

fix(ui): refresh automation alerts on cron events - #117648

Merged
Patrick-Erichsen merged 2 commits into
mainfrom
pe/rename-cron-failure-automations
Aug 1, 2026
Merged

Patrick-Erichsen merged 2 commits into
mainfrom
pe/rename-cron-failure-automations

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • refresh the sidebar automation alert snapshot when the Gateway emits an automation change
  • keep model-auth refreshes on their existing lifecycle instead of repeating them for automation events
  • cover stale failure-alert removal with a component regression test

The visible wording is already automation(s) on current main via #114853; this fixes the separate stale-alert mismatch where the Automations page showed zero while the sidebar retained an older failure.

Validation

  • pnpm test ui/src/components/sidebar-attention.test.ts — 11 passed on Blacksmith Testbox
  • pnpm check:changed — passed formatting, i18n, typecheck, lint, and guards on Blacksmith Testbox
  • .agents/skills/autoreview/scripts/autoreview --mode local — clean, no actionable findings
  • rebased onto current origin/main; range-diff confirmed the patch was unchanged

Real browser proof

  • Proof source head: 61bb840a1454c9b8638bf28fec4c117140a15dc9
  • Current prepared head: dadbb6d39bc (same UI patch plus current main, including test(auto-reply): preserve plugin hook runner lifecycle exports #117647 for the unrelated CI mock collision)
  • Immutable bundle: dist-runtime-build from CI run 30719501315
  • Setup: CI-built Control UI bundle served in the Codex app browser with the repo mock WebSocket Gateway
  • Before: cron.list returned 3 automations with 1 failed; both the Automations page and sidebar showed the failure
  • Transition: the Gateway changed cron.list to empty and emitted the existing cron event
  • After: without reload or manual refresh, the page showed 0 automations / 0 failing and the sidebar failure alert disappeared

Before the Gateway event

After the Gateway event

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@Patrick-Erichsen Patrick-Erichsen self-assigned this Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 6:03 PM ET / 22:03 UTC.

ClawSweeper review

What this changes

Refreshes the Control UI sidebar’s automation-failure alert when the Gateway emits a cron change event, while avoiding unnecessary model-auth reloads and adding a stale-alert regression test.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The PR still addresses a real current-main defect: the sidebar refreshes only for connection changes or stale visibility checks, while the Automations page already refreshes on the existing cron Gateway event. The proposed event-scoped reload is narrow, preserves model-auth state during automation-only events, has a focused regression test and after-fix browser proof, and has no correctness finding; it remains open because the protected maintainer label requires owner review rather than automated closure or merge.

Priority: P2
Reviewed head: dadbb6d39bce62882e799eecfc58c294563cef79
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with direct browser evidence, targeted regression coverage, and no supported correctness or security blocker.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
Evidence reviewed 6 items Current-main defect: Current main loads sidebar cron jobs and model-auth status together, then only re-runs synchronization for Gateway snapshot changes or stale visibility refreshes; it has no subscribeEvents listener for cron changes.
Existing event contract and sibling behavior: The public application Gateway exposes subscribeEvents, and the Automations page already listens for event.event === "cron" while connected and refreshes its job data from that event.
Proposed owner-boundary repair: The branch adds a lifecycle-owned Gateway-event subscription, rejects events from a replaced Gateway, reloads only the cron snapshot, and deliberately retains the existing model-auth snapshot for automation-only events.
Findings None None.
Security None None.

How this fits together

The Control UI receives Gateway snapshots and event frames, then renders sidebar health chips from independently fetched automation and model-auth state. Automation changes already refresh the Automations page, but the sidebar’s separate snapshot currently remains stale until a reconnect, tab visibility refresh, or idle interval.

flowchart LR
  Gateway[Gateway cron change event] --> Store[Control UI gateway event subscribers]
  Store --> Automations[Automations page refresh]
  Store --> Sidebar[Sidebar attention refresh]
  Sidebar --> CronList[Fetch current automation jobs]
  CronList --> Chips[Updated failure alert chips]
  ModelAuth[Model-auth snapshot] --> Chips
Loading

Decision needed

Question Recommendation
Does the Control UI owner approve landing this event-driven sidebar refresh once required checks are green on dadbb6d39bce62882e799eecfc58c294563cef79? Approve after checks: Land the narrowly scoped event subscription after required checks complete on the reviewed head.

Why: The patch is technically sound, but the PR carries the protected maintainer label, so this workflow must pause for explicit owner handling rather than close or merge automatically.

Before merge

  • Complete next step (P2) - No mechanical repair remains; the protected maintainer label requires a responsible owner to review and decide on the already-correct patch after exact-head checks finish.
Agent review details

Security

None.

PR surface

Source +25, Tests +54. Total +79 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 40 15 +25
Tests 1 54 0 +54
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 94 15 +79

Review metrics

None.

Technical review

Best possible solution:

Land the existing event-scoped sidebar refresh after the responsible Control UI owner approves the exact-head patch and required checks complete, keeping automation refreshes independent from model-auth refreshes.

Do we have a high-confidence way to reproduce the issue?

Yes—at source level: current main has no cron-event subscription in the sidebar, while the Automations page refreshes on that event; the supplied browser proof demonstrates the resulting stale-alert transition.

Is this the best way to solve the issue?

Yes—the patch reuses the existing Gateway event contract and mirrors the Automations page’s refresh trigger without adding configuration, a parallel data source, or an unnecessary model-auth request.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6cb833314bc3.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded stale Control UI alert defect with a visible but limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
  • proof: sufficient: Contributor real behavior proof is sufficient. The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The contributor supplied after-fix browser proof from a CI-built Control UI bundle with the repository mock Gateway, showing the stale automation failure alert before the cron event and its disappearance after the event without a page reload.

Evidence

What I checked:

  • Current-main defect: Current main loads sidebar cron jobs and model-auth status together, then only re-runs synchronization for Gateway snapshot changes or stale visibility refreshes; it has no subscribeEvents listener for cron changes. (ui/src/components/sidebar-attention.ts:57, 6cb833314bc3)
  • Existing event contract and sibling behavior: The public application Gateway exposes subscribeEvents, and the Automations page already listens for event.event === "cron" while connected and refreshes its job data from that event. (ui/src/pages/cron/cron-page.ts:107, 6cb833314bc3)
  • Proposed owner-boundary repair: The branch adds a lifecycle-owned Gateway-event subscription, rejects events from a replaced Gateway, reloads only the cron snapshot, and deliberately retains the existing model-auth snapshot for automation-only events. (ui/src/components/sidebar-attention.ts:103, dadbb6d39bce)
  • Regression coverage: The new component test starts with a failed automation, emits the real cron event shape through the Gateway subscription, and asserts that the rendered failure alert disappears; its single auth-status response also detects an unwanted auth refresh. (ui/src/components/sidebar-attention.test.ts:245, dadbb6d39bce)
  • Real behavior proof: The PR body and follow-up comment provide before/after browser evidence using a CI-built Control UI bundle and the repository mock WebSocket Gateway: a failed automation alert is visible before the cron event and disappears after the event without a reload. (dadbb6d39bce)
  • Current-main and history provenance: The proposed commit is not an ancestor of current main, so the defect is not already implemented there. Blame and follow-up history show the current sidebar refresh owner was introduced and most recently maintained in commit 17625e5cd2680656632972996ef8951ec0373ae3. (ui/src/components/sidebar-attention.ts:57, 17625e5cd268)

Likely related people:

  • steipete: Peter Steinberger introduced the current sidebar attention component and its test in the recent mainline commit, and the file history is otherwise concentrated in the same area. (role: recent area contributor; confidence: high; commits: 17625e5cd268, cb84dc76fc05, 3e21c2f2567e; files: ui/src/components/sidebar-attention.ts, ui/src/components/sidebar-attention.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-01T21:42:19.466Z sha 61bb840 :: needs real behavior proof before merge. :: none

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Exact-head real browser proof

Head: 61bb840a1454c9b8638bf28fec4c117140a15dc9
CI artifact: dist-runtime-build from run 30719501315

I served the immutable CI-built Control UI bundle in the Codex app browser with the repo's mock WebSocket Gateway implementation. The first cron.list returned three jobs, including one failed job, so both the Automations page and sidebar showed the failure. The Gateway then changed cron.list to an empty result and emitted the existing cron event. Without a reload or manual refresh, the page moved to 0 automations / 0 failing and the sidebar failure alert disappeared.

Before the Gateway event:

before failed automation alert

After the Gateway event:

after cron event clears automation alert

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 1, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 59f1f4f into main Aug 1, 2026
113 of 123 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the pe/rename-cron-failure-automations branch August 1, 2026 22:07
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant