feat(executions): unified fleet executions dashboard (#18)#852
feat(executions): unified fleet executions dashboard (#18)#852oleksandr-korin wants to merge 7 commits into
Conversation
New /api/executions + /api/executions/stats endpoints expose fleet-level execution history with per-agent access control (admin = all, non-admin = accessible agents). Stats use single-pass conditional aggregation; list supports filtering by status/trigger/hours/agent/search with offset pagination. Router mounts /stats before "" to prevent route shadowing. Frontend adds /executions page with live stat cards, filter bar, running strip, load-more pagination, and per-row stop/navigate actions. Pinia store polls every 30s and refreshes on agent_activity WS events. NavBar gains an Executions link with a yellow running-count badge. Closes #18 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wire live/polling status dot to real WebSocket isConnected ref; remove dead wsStatus state that was always 'connected' - Guard WS event handler: skip refresh when a fetch is already in flight to prevent concurrent redundant requests on rapid schedule_start/end bursts - Add missing 'error' option to status filter dropdown (was in backend _VALID_STATUSES and statusBadgeClass but not filterable from UI) - Add missing 'fan_out' option to trigger filter dropdown (same gap) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- requirements.md: add §10.10 Unified Executions Dashboard (EXEC-022) - architecture.md: add Executions endpoint table under API Endpoints - feature-flows.md: add index entry for executions-dashboard.md - feature-flows/executions-dashboard.md: new vertical slice doc (UI → API → DB) - tests/unit/test_fleet_executions.py: 28 unit tests covering _narrow_to_agent, get_fleet_executions SQL (access control, filters, pagination, error_summary), and get_fleet_execution_stats SQL (windowed vs all-time, running_count always-live, zero-division guard) — all passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… flow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- appearance-none + custom SVG chevron on all 4 filter selects - active filter state: 2px primary-blue border + font-medium when non-default value set - row hover: left accent bar + bg tint + chevron nudge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced manual sys.modules injection (spec_from_file_location) with a one-line local copy of iso_cutoff. No logic change — eliminates the 3 sys.modules violations caught by the CI pollution checker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vybe
left a comment
There was a problem hiding this comment.
Good implementation overall — docs complete, SQL safe, access control correct. Not merging this release, but want it ready for next week. Two things to address before then:
-
NavBar badge shows 0 from all non-executions pages.
useExecutionsStore()is instantiated in NavBar butstatsis never populated until the user actually visits/executions. The running-count badge is a stated feature — add astore.fetchStats()call in NavBar'sonMountedso it populates on initial load from any page. One lightweight stats call is enough; no polling needed from NavBar. -
Complete the open test plan items. Three manual scenarios are still unchecked. The unit tests cover the logic, but please confirm them manually and mark them done (or explicitly note they're covered by the unit tests and close them).
Will check again next week.
1. NavBar badge populates from any page — added executionsStore.fetchStats() call in NavBar's onMounted. Previously the running-count badge stayed at 0 until the user actually visited /executions because stats were only fetched when the page mounted. 2. Test plan items resolved — marked each scenario as either manually verified (during the 2026-05-15 dev review with 83 seeded executions) or as covered by the unit tests in tests/unit/test_fleet_executions.py. One item (WS-driven strip disappearance) noted as code-reviewed but not run end-to-end against a live schedule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Both review items addressed in 8ddc45c:
Ready for your next-week check. |
Summary
GET /api/executions+GET /api/executions/statsendpoints — fleet-level execution history with access control (admin sees all, non-admin sees accessible agents only)/executionspage: live stat cards (total, success rate, failed, cost), running strip, filter bar, load-more, per-row stop/navigate actionsagent_activityWebSocket eventsTest plan
/executionsas admin — all agents' runs visible/executionsas non-admin — only accessible agents' runs visibleGET /api/executions/statsreturns correctrunning_countindependent ofhoursfilterCloses #18
🤖 Generated with Claude Code