Skip to content

[AUTOMATION] fix(clawpatch): ignore stale dashboard event fetch errors#284

Open
michiosw wants to merge 1 commit into
mainfrom
fix/clawpatch-daily-20260613T075636Z
Open

[AUTOMATION] fix(clawpatch): ignore stale dashboard event fetch errors#284
michiosw wants to merge 1 commit into
mainfrom
fix/clawpatch-daily-20260613T075636Z

Conversation

@michiosw

Copy link
Copy Markdown
Contributor

Where We Are

The guard dashboard can show an error from session A after the user has already switched to session B. The stale request is ignored on success, but the stale error still reaches the banner.

Where We Want To Go

Only the active session should be allowed to update the event error state. Switching sessions should not surface a false error from an older request.

How do we get there

Apply the same selectedRef.current !== id guard to the fetchEvents(id) error path in web/guard-dashboard/src/App.tsx that already exists on the success path. Rebuild the embedded dashboard assets so the shipped UI matches the source change. Validation: go vet ./..., npm exec --yes --package pnpm@10.0.0 -- pnpm install --frozen-lockfile, npm exec --yes --package pnpm@10.0.0 -- pnpm --dir web/guard-dashboard typecheck, ./scripts/build-guard-dashboard-assets.sh, and git diff --check passed. go test ./... is blocked by unrelated flaky timing failures in internal/guard/judge (TestStartLlamaServerHealthCheckAndStop, TestStartLlamaServerEarlyExitDoesNotWaitForStopTimeout).

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR prevents stale guard dashboard event fetch errors from updating the visible banner. The main changes are:

  • Adds the selected-session guard to the fetchEvents error path.
  • Rebuilds the embedded dashboard JavaScript bundle.
  • Updates the embedded dashboard HTML to reference the new asset hash.

Confidence Score: 4/5

This looks safe to merge, but one stale banner path should be cleaned up.

  • The new guarded catch correctly ignores errors from event requests for old sessions.

  • Switching sessions can still leave a previously-set event error visible on the new session.

  • The rebuilt embedded assets match the source-level event error guard.

  • web/guard-dashboard/src/App.tsx should clear the event error when changing sessions.

Important Files Changed

Filename Overview
web/guard-dashboard/src/App.tsx Adds stale-session guarding for event fetch errors, but session changes still leave existing event errors visible.
internal/guard/web/assets/dist/index.html Updates the embedded dashboard HTML to load the rebuilt JavaScript asset.
internal/guard/web/assets/dist/assets/index-bfaJ3jrc.js Rebuilt dashboard bundle includes the guarded event fetch error path.

Comments Outside Diff (1)

  1. web/guard-dashboard/src/App.tsx, line 50-53 (link)

    P2 Clear stale banner When the user switches from session A to session B, this branch clears the old events and open inspector but leaves the shared error value in place. If session A's event fetch already failed and set the banner, session B keeps showing that old session's error until another successful fetch clears it, so the dashboard can still display a false stale error after a session switch.

Reviews (1): Last reviewed commit: "fix(clawpatch): ignore stale dashboard e..." | Re-trigger Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant