Skip to content

feat(gui): routines view + /api/routines — closes the first parity-harness gap#592

Merged
bborn merged 1 commit into
mainfrom
feat/gui-routines
Jun 11, 2026
Merged

feat(gui): routines view + /api/routines — closes the first parity-harness gap#592
bborn merged 1 commit into
mainfrom
feat/gui-routines

Conversation

@bborn

@bborn bborn commented Jun 11, 2026

Copy link
Copy Markdown
Owner

The parity harness (#591) flagged Routines as the GUI's one acknowledged gap. This closes it end to end and deletes the ignore entry — the harness now verifies the coverage including the API routes.

API (internal/web/routines.go)

  • GET /api/routines — the fleet: definition (project, model, permission mode, timeout, disabled), schedule (launchd/cron + human detail), latest run
  • GET /api/routines/{name}/runs — run history
  • GET /api/routines/{name}/runs/{run}/log — full log file; falls back to the stored output tail if the file was pruned; run/routine ownership checked, path comes from the run row never the request
  • POST /api/routines/{name}/run — async trigger (202; run row appears immediately in running); 409 when disabled or already running

All endpoint behaviors covered by tests (isolated via TY_ROUTINES_DIR).

GUI

Routines view on u / ⌘U / View menu: same fleet-health picture as the TUI (name, target project, model, schedule, enabled, last-run outcome with age), polling every 5s while visible so triggered runs show their outcome — plus Run now and a log viewer, which the read-only TUI view doesn't have.

Verified against the live fleet: 4 real routines rendered with schedules; twitter-monitor showed running for 1m with its run button correctly disabled.

Parity

Routines moved from parity-ignore.jsondesktop/capabilities.json with its API routes. The harness verifies both the coverage and that the routes exist.

🤖 Generated with Claude Code

The first gap the parity harness flagged, now closed end to end:

API (internal/web/routines.go, tested):
- GET /api/routines — fleet: definition, schedule, latest run
- GET /api/routines/{name}/runs — run history
- GET /api/routines/{name}/runs/{run}/log — full log (falls back to the
  stored output tail when the file was pruned)
- POST /api/routines/{name}/run — async trigger; 409 when disabled or
  already running

GUI:
- Routines view on u / ⌘U / View menu: name, target project, model,
  schedule, enabled state, last-run status with age (5s poll while
  visible), run-now, and a log viewer dialog — TUI fleet-health parity
  plus run-now/log on the same API

Parity: Routines moved from parity-ignore.json to
desktop/capabilities.json with its API routes (harness-verified).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bborn bborn merged commit 3c8d57e into main Jun 11, 2026
4 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