Skip to content

Add scheduled Automations - #3

Merged
viannaanalyst merged 19 commits into
mainfrom
feat/automations
Sep 15, 2026
Merged

viannaanalyst merged 19 commits into
mainfrom
feat/automations

Conversation

@viannaanalyst

Copy link
Copy Markdown
Owner

What

Adds Automations: scheduled agent runs that execute while the app is open. Each automation is a recipe (project, harness, model, access mode, prompt, schedule) that owns one dedicated session, so context accumulates across runs.

  • Schedules (local time) — every N hours, daily, weekdays, or weekly (a day of week); each with hour/minute where applicable, computed in the webview's timezone with a pure, tested module.
  • Run lifecycle — claim-before-dispatch in SQLite (conditional UPDATE on the expected slot, single-winner across windows/reloads), missed slots recorded when the app was closed (no catch-up), and busy sessions skipped with a recorded reason.
  • Dispatch — resolves the dedicated session (reuses it, unarchives before reuse, or creates it from the stored recipe and persists it), submits through onSubmit(..., { onSettled }), and records completed / failed / cancelled / skipped_busy plus counters. A 30-minute settlement guard closes runs whose onSubmit returns without settling, without charging the failure policy.
  • Failure policy — pause after 1, 3, or 5 consecutive failures, or keep running; a success resets the counter, and a manual pause is preserved even if a run settles later.
  • Surface — full-screen Automations view (list, next-run countdown, run history with errors and session links, run-now, pause/resume, edit, delete with confirmation) opened from a rail action below Kanban and from the View menu (in-app and native macOS). A dot marks failure-paused automations.
  • Editor — title, prompt, project picker, harness/model/access pickers, schedule preset, failure policy.
  • i18n — pt-BR for every new string, including dynamic schedule/countdown labels (translated through { key, vars } labels so placeholders resolve).

Dedicated-only v1 (no heartbeat mode), attended-only (no background execution), no natural-language stop conditions — all explicitly deferred in the spec.

Tests

  • Web: npm run check:web — 234 files / 2420 tests passed, tsc --noEmit clean.
  • Rust: npm run check:rust — fmt clean, clippy -D warnings clean, 317 tests passed.
  • New coverage: schedule math (presets, boundaries, first-slot regression), failure policy + tick planning, store wrappers, Rust CRUD/claim/missed/result (conditional guards, cascade, counters), editor and surface static markup, rail entry.

Stacked PR

Based on feat/session-kanban (#2), which is based on feat/pr-write-actions (#1). Merge in order, or retarget to main once the earlier PRs land.

Pending before merge

  • Manual dev-mode walkthrough: create an automation ~2 minutes ahead and watch it fire into the session transcript; verify busy-skip, missed-on-reopen, failure pause at the threshold, run-now, pause/resume, edit/delete (session kept), history, and both menu/rail entry points.

@viannaanalyst
viannaanalyst changed the base branch from feat/session-kanban to main September 15, 2026 02:55
@viannaanalyst
viannaanalyst merged commit 5bd95ba into main Sep 15, 2026
3 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