feat(ui): add scheduled task management#354
Conversation
✱ Stainless preview buildsThis PR will update the openapi python typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ agentex-sdk-openapi studio · code · diff
✅ agentex-sdk-typescript studio · code · diff
✅ agentex-sdk-python studio · conflict
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
8445f04 to
0673c3d
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose task-backed run counts and exact skip/unskip operations so schedule clients can reason about individual future occurrences. Co-authored-by: Cursor <cursoragent@cursor.com>
Add agent scoping, upcoming occurrence timelines, active toggles, run-now confirmation, and skipped occurrence controls to the scheduled tasks page. Co-authored-by: Cursor <cursoragent@cursor.com>
Use schedule metadata for scheduled-run task labels and add a calendar indicator so recurring runs are easier to recognize. Co-authored-by: Cursor <cursoragent@cursor.com>
Use the schedule name as the task display label and keep occurrence timing in metadata for views that need it. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0673c3d to
e36d4cd
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Hide the scheduled tasks UI unless the schedules API is enabled so users do not navigate to endpoints that are absent at runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
declan-scale
left a comment
There was a problem hiding this comment.
Ran locally, looks good, just some organization / small ui improvements I'd suggest
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Thanks for the great comments @declan-scale I addressed them all |
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
UX details
Test plan
npm --prefix agentex-ui run typechecknpm --prefix agentex-ui run lintnpm --prefix agentex-ui run test:run -- hooks/use-safe-search-params.test.tsx lib/agent-run-schedules.test.ts lib/schedule-utils.test.tsScreen.Recording.2026-07-13.at.2.25.20.PM.mov
Greptile Summary
This PR delivers a full Scheduled Tasks UI surface: inline schedule creation with animated feedback, an Upcoming timeline grouped by Today/Tomorrow/Later, a Schedules list with pause/resume toggle, skip/unskip per-occurrence, run-now flows, edit and delete modals, and a feature flag (
ENABLE_AGENT_RUN_SCHEDULES) that gates the entire experience.agentex-ui/components/scheduled-tasks/module (~1 400 lines) provides the page, composer, cadence picker, upcoming list, schedules list, modals, and shared helpers; routing is handled entirely via URL search params (view,schedule_scope,agent_name).lib/schedule-utils.tsowns cadence serialization, validation, display, and thescheduleToCadenceround-trip used by the edit form.agentex/src/temporal/activities/scheduled_agent_run_activities.pyremoves_format_fire_timeand the per-occurrence timestamp fromtask_metadata.display_name, keeping task names stable across retries.Confidence Score: 5/5
Safe to merge; the feature is flag-gated and all CRUD flows, cache invalidation, and error paths look correct.
Additive, flag-gated change. TanStack Query cache keys are well-structured, mutation error handling surfaces toasts via onError, and search-param routing clears stale VIEW values on task selection. The two findings only affect externally-created sub-minute or complex-cron schedules that the UI itself never produces.
agentex-ui/lib/schedule-utils.ts — specifically scheduleToCadence (sub-minute round-trip) and describeCadence (missing complex-cron fallback).
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Page Load] --> B{agentRunSchedulesEnabled?} B -->|false| C[Chat / Home only] B -->|true| D{view=scheduled_tasks?} D -->|no| E{taskID param?} E -->|yes| F[ChatView] E -->|no| G[HomeView] D -->|yes| H[ScheduledTasksPage] H --> I{scheduleScope?} I -->|ALL| J[useAgentRunSchedulesForAgents all agents] I -->|CURRENT| K{agent selected?} K -->|no| L[Empty State: Select an agent] K -->|yes| M[useAgentRunSchedules current agent] J --> N[useAgentRunScheduleDetailsForItems one req per schedule] M --> N N --> O{scheduleView?} O -->|upcoming| P[UpcomingScheduleList Today/Tomorrow/Later] O -->|all| Q[AllSchedulesList sorted by next run] M --> R[ScheduleComposer create new schedule]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[Page Load] --> B{agentRunSchedulesEnabled?} B -->|false| C[Chat / Home only] B -->|true| D{view=scheduled_tasks?} D -->|no| E{taskID param?} E -->|yes| F[ChatView] E -->|no| G[HomeView] D -->|yes| H[ScheduledTasksPage] H --> I{scheduleScope?} I -->|ALL| J[useAgentRunSchedulesForAgents all agents] I -->|CURRENT| K{agent selected?} K -->|no| L[Empty State: Select an agent] K -->|yes| M[useAgentRunSchedules current agent] J --> N[useAgentRunScheduleDetailsForItems one req per schedule] M --> N N --> O{scheduleView?} O -->|upcoming| P[UpcomingScheduleList Today/Tomorrow/Later] O -->|all| Q[AllSchedulesList sorted by next run] M --> R[ScheduleComposer create new schedule]Reviews (8): Last reviewed commit: "Merge branch 'main' into jerome/schedule..." | Re-trigger Greptile