Skip to content

Automations UI polish: edit action and batch job stats#2299

Draft
Flix6x wants to merge 2 commits into
feat/2288-report-automationsfrom
feat/2288-automations-ui-polish
Draft

Automations UI polish: edit action and batch job stats#2299
Flix6x wants to merge 2 commits into
feat/2288-report-automationsfrom
feat/2288-automations-ui-polish

Conversation

@Flix6x

@Flix6x Flix6x commented Jul 11, 2026

Copy link
Copy Markdown
Member

Description

Follow-ups on the automations UI (stacked on #2297):

  • Edit action: the automations page gets a per-row Edit button opening a modal to change the name and cron string (via the existing PATCH endpoint), completing the UI CRUD story.
  • Batch job stats: GET /assets/<id>/automations now includes per-automation job_stats, computed in a single pass over the relevant job caches (deduped cache refs across all the asset's automations, jobs grouped by their trigger's automation id). The UI fills the Jobs column from the list response instead of firing one detail request per automation on page load, and the Details modal loads its contents lazily when first opened. This resolves the O(automations × sensors × jobs) Redis fanout flagged in the Automations - first roundtrip for forecasts #2290 review.
  • The list response also surfaces redis_connection_err, like the jobs endpoint.

How to test

Open /assets/<id>/automations as an account admin: the Jobs column fills immediately from one request; Edit lets you rename/re-schedule.

Tests: pytest flexmeasures/api/v3_0/tests/test_automations_api.py flexmeasures/cli/tests/test_automations.py flexmeasures/ui/tests/test_asset_crud.py

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rbix8k1JfeUWNXEmHEZVpX

- The automations page gets an Edit action (name and cron string), using the
  existing PATCH endpoint.
- The list endpoint now includes per-automation job stats, computed in a
  single pass over the relevant job caches, instead of the UI firing one
  detail request per automation on page load; the Details modal loads its
  contents lazily, when first opened.

Part of #2288

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rbix8k1JfeUWNXEmHEZVpX
…s-ui-polish

# Conflicts:
#	flexmeasures/data/services/automations.py
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