Skip to content

feat(automations): scheduled cycles, grouped runs, and run details UI#438

Open
Kazet111 wants to merge 25 commits into
Soju06:mainfrom
Kazet111:feature/automations-cycle-scheduling-and-run-details
Open

feat(automations): scheduled cycles, grouped runs, and run details UI#438
Kazet111 wants to merge 25 commits into
Soju06:mainfrom
Kazet111:feature/automations-cycle-scheduling-and-run-details

Conversation

@Kazet111
Copy link
Copy Markdown
Contributor

@Kazet111 Kazet111 commented Apr 19, 2026

Summary

  • add a new end-to-end Automations subsystem across backend, database, OpenSpec, and frontend
  • add scheduled and manual automation execution with grouped run-cycle tracking
  • add cycle snapshot persistence so one automation cycle keeps a stable account set and dispatch plan
  • add Jobs and Recent runs views with backend-driven search, filters, and pagination
  • add Run details diagnostics with per-account execution state and grouped cycle summaries
  • surface automation-generated traffic in Request Logs

Related issue

Problem

The project did not yet have a dedicated automations subsystem.

That meant there was no built-in way to:

  • define recurring automation jobs
  • execute one automation cycle across multiple accounts
  • track grouped run state for a cycle
  • inspect per-account outcomes within one run
  • manage automation jobs and runs from a dedicated UI
  • correlate automation traffic with Request Logs

Changes

New backend automations module

  • add a dedicated automations API with endpoints for:
    • jobs listing
    • job filter options
    • runs listing
    • run filter options
    • run details
    • create job
    • update job
    • delete job
    • run now (202 Accepted)
  • add automations service / repository / scheduler implementation
  • add timezone-aware daily scheduling
  • add threshold-based dispatch spreading across accounts
  • add grouped cycle execution semantics for scheduled and manual runs
  • add cycle status resolution for:
    • running
    • partial
    • success
    • failed

Database and run-cycle snapshot model

  • add automations schema and base migrations
  • add grouped run-cycle snapshot tables:
    • automation_run_cycles
    • automation_run_cycle_accounts
  • freeze cycle membership at cycle creation time so later account-state changes do not mutate an already started cycle
  • freeze per-account dispatch timestamps for the cycle so threshold edits do not rewrite an in-flight dispatch plan
  • backfill legacy manual-cycle history into grouped cycle snapshots
  • add model and query support for grouped cycle listing, stable run details, and per-cycle diagnostics

New Automations UI

  • add Automations page and route integration
  • add Jobs view with backend-driven:
    • search
    • filters
    • pagination
    • rows per page
    • reset
  • add Recent runs view with backend-driven:
    • search
    • filters
    • pagination
    • rows per page
    • reset
  • add Add automation dialog with:
    • structured form layout
    • validation
    • timezone selection
    • threshold configuration
    • reasoning effort selection
  • add Run details modal with:
    • grouped cycle summary metrics
    • per-account execution table
    • mixed-result visibility
    • scalable rendering for larger runs
    • stable grouped diagnostics for scheduled and manual cycles

Request Logs visibility

  • wire automation-triggered executions into Request Logs visibility
  • make it possible to correlate automation runs with actual downstream requests

OpenSpec

  • add and complete the OpenSpec change under openspec/changes/add-automations-scheduled-pings/:
    • proposal
    • design
    • tasks
    • automations delta spec
    • frontend-architecture delta spec
    • context

Screenshots

image image image image

Testing

Added or updated coverage for:

  • backend automations integration flows
  • backend automations service logic
  • schedule computation and grouped cycle behavior
  • cycle snapshot persistence and legacy backfill behavior
  • run listing and run-details responses
  • frontend automations integration flow
  • frontend hooks, schemas, and time/account display utilities

Validation

  • openspec validate --specs
  • uvx ruff check .
  • uvx ruff format --check .
  • uv run ty check
  • uv run pytest
  • cd frontend && bun run lint
  • cd frontend && bun run typecheck
  • cd frontend && bun run test:coverage
  • migration smoke test:
    • upgrade -> downgrade -> upgrade

Latest local backend result:

  • 1824 passed, 7 skipped, 4 warnings

Frontend coverage result:

  • global coverage passes configured thresholds
  • src/features/automations coverage:
    • 91.89% statements
    • 79.51% branches
    • 91.78% lines

Result

This PR introduces a new Automations subsystem with scheduling, grouped run cycles, stable cycle snapshots, per-account execution diagnostics, and dedicated UI management flows,
while partially delivering the functionality described in #433.

@Kazet111 Kazet111 marked this pull request as draft April 19, 2026 10:32
@Kazet111 Kazet111 marked this pull request as ready for review April 19, 2026 12:26
@DaKheera47
Copy link
Copy Markdown

@Soju06 i don't envy your position... having to review a 27k line PR

great feature though. i can't wait :)

@Kazet111 Kazet111 force-pushed the feature/automations-cycle-scheduling-and-run-details branch from 8c2b071 to 625d067 Compare April 22, 2026 07:25
@Kazet111 Kazet111 marked this pull request as draft April 22, 2026 10:40
@Kazet111 Kazet111 marked this pull request as ready for review April 22, 2026 11:37
@chickensote
Copy link
Copy Markdown

What's the status on this PR?

@Kazet111
Copy link
Copy Markdown
Contributor Author

We’re waiting for a review from @Soju06

@huzky-v huzky-v mentioned this pull request Apr 27, 2026
@chickensote
Copy link
Copy Markdown

Hey @Soju06, sorry for the ping but would you be willing to review this PR?

@Komzpa
Copy link
Copy Markdown
Collaborator

Komzpa commented May 16, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label May 16, 2026
…ycle-scheduling-and-run-details

# Conflicts:
#	app/main.py
@Komzpa Komzpa removed the 🤖 codex: ok [@codex review] says no issues found. label May 19, 2026
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label May 22, 2026
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented May 22, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6abf2e9a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/modules/automations/repository.py Outdated
@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 22, 2026
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label May 22, 2026
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented May 22, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed7c927066

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/modules/automations/service.py Outdated
@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 22, 2026
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label May 23, 2026
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented May 23, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f804bd2cfb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/modules/automations/service.py Outdated
@Soju06 Soju06 added the 🤖 codex: needs work [@codex review] raised an issue label May 23, 2026
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label May 23, 2026
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented May 23, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dfc0d9610

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 23, 2026
@Soju06 Soju06 removed the 🤖 codex: needs work [@codex review] raised an issue label May 23, 2026
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented May 23, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Soju06 Soju06 added the 🤖 codex: ok [@codex review] says no issues found. label May 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has had no activity for 7 days.

It will be closed in 23 more days unless there is new activity.

If this is still relevant, please:

  • Rebase or push an update if the branch drifted
  • Address pending review feedback if there is any
  • Leave a short comment confirming it is still being worked on

Thanks for the contribution 🙏

@github-actions github-actions Bot added the stale No response from reporter; scheduled for close label May 30, 2026
@bjspi
Copy link
Copy Markdown

bjspi commented Jun 1, 2026

Hi @Soju06 will you merge this PR? It'd be really helpful for automatic warmup because Codex seems to kick account quite fast nowadays...

@github-actions github-actions Bot removed the stale No response from reporter; scheduled for close label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 codex: ok [@codex review] says no issues found. db migration PR changes Alembic database migrations; maintainer must coordinate merge order

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants