feat(ui): show DefenseClaw enforcement spans in Monitor#249
Open
vineethsai7 wants to merge 3 commits into
Open
Conversation
This was referenced Jul 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agent Control's Monitor tab currently shows aggregate execution, trigger, and error statistics, but an operator cannot inspect the DefenseClaw enforcement event that caused a request to be blocked. That makes it difficult to verify the integration end to end or correlate a denial with its trace, span, request, rule, and blocked input.
Solution
Query recent observability events for the selected agent and render them below the aggregate charts. The latest event is expanded automatically while still respecting a user's explicit accordion selection.
For DefenseClaw enforcement events, the view shows:
UNREDACTEDorMETADATA ONLYbadge so the privacy mode is explicit;The query recomputes its relative start time on every refetch and does not retain a prior agent's event data while a new agent query is loading.
What Changed
ui/src/core/api/client.tsui/src/core/hooks/query-hooks/use-agent-events.tsui/src/core/page-components/agent-detail/monitor/index.tsxui/src/core/page-components/agent-detail/monitor/recent-executions.tsxui/tests/agent-stats.spec.tsui/tests/fixtures.tsevaluators/contrib/defenseclaw/README.mdSecurity and Privacy
Review Feedback Addressed
nullbranches and cannot leak falsey numeric values into the DOM.Test Plan
npm run lint— passed with no warnings or errors.npm run typecheck— passed.npm run prettify:check— passed.npx playwright test tests/agent-stats.spec.ts tests/auth.spec.ts --reporter=line --workers=2— 17 passed.