Skip to content

feat(analytics): loop executions as a distinct Loops bucket/color in timeline views (#1150) - #1152

Merged
vybe merged 3 commits into
devfrom
feature/1150-loop-bucket
Jun 11, 2026
Merged

vybe merged 3 commits into
devfrom
feature/1150-loop-bucket

Conversation

@vybe

@vybe vybe commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • triggered_by="loop" executions get a first-class Loops bucket in _TRIGGER_BUCKETS/_BUCKET_ORDER (inserted after Scheduled) instead of folding into Scheduled — a 50-run loop no longer reads as a burst of cron work. Bucketing is read-time, so historical loop rows remap automatically (no migration).
  • New bucket color fuchsia-400 (#e879f9) in OverviewPanel.vue — a deliberate accent so loop segments read distinctly from Scheduled (cyan) and Agent-to-agent (teal) neighbors; matching fuchsia trigger chip (light + dark) and a loop option in the Executions trigger filter dropdown.
  • Review catch: added loop to _VALID_TRIGGERS in routers/executions.py — the router silently nulls unknown filter values, so the dropdown option would otherwise be a silent no-op returning all executions.
  • StackedBarChart.vue: slate fallback for buckets missing from the colors map (stale cached bundle vs newer backend renders gray, not invisible).

Changes

  • src/backend/db/schedules.py — Loops bucket mapping + order
  • src/backend/routers/executions.py — loop in _VALID_TRIGGERS
  • src/frontend/src/components/OverviewPanel.vue — BUCKET_COLORS entry + palette comment
  • src/frontend/src/components/ExecutionsPanel.vue — chip class + dropdown option
  • src/frontend/src/components/StackedBarChart.vue — colorFor() fallback
  • tests/unit/test_agent_analytics.py — Loops bucket assertions (isolation + per-day stack + canonical order)
  • tests/unit/test_fleet_executions.py — allowlist regression + dropdown⊆_VALID_TRIGGERS drift guard
  • docs/memory/architecture.md, feature flows (overview, executions-dashboard, run-agent-loop), tests/registry.json

Test Plan

  • pytest tests/unit/test_agent_analytics.py tests/unit/test_fleet_executions.py — 43 passed
  • Existing buckets/colors unchanged; Other catch-all behavior preserved (covered by existing tests)
  • Manual: run an agent loop, check Overview chart shows a fuchsia Loops segment and the Executions trigger chip/filter for loop

Notes

Fixes #1150

🤖 Generated with Claude Code

Eugene Vyborov and others added 3 commits June 11, 2026 12:36
…timeline views (#1150)

- Remap triggered_by=loop from Scheduled to a new Loops bucket in
  _TRIGGER_BUCKETS / _BUCKET_ORDER (read-time bucketing — historical
  loop rows remap automatically, no migration)
- BUCKET_COLORS: Loops = fuchsia-400, a deliberate accent so loop
  bursts read distinctly from Scheduled (cyan) and Agent-to-agent (teal)
- ExecutionsPanel: fuchsia loop trigger chip (light+dark) + loop option
  in the trigger filter dropdown
- routers/executions.py: add loop to _VALID_TRIGGERS — without it the
  new dropdown option would be a silent no-op (router nulls unknown values)
- StackedBarChart: slate fallback for buckets missing from the colors
  map (stale bundle vs newer backend renders gray, not invisible)
- Tests: Loops bucket assertions + dropdown/_VALID_TRIGGERS drift guard

Co-Authored-By: Claude Fable 5 <[email protected]>
@vybe
vybe merged commit 7b45ae4 into dev Jun 11, 2026
15 checks passed
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