Skip to content

[Schedules 8/8] Schedule detail page with run history and conversation viewer #24

@sre-helmcode

Description

@sre-helmcode

Implementation Order: 8 of 8 (final issue)

Depends on: #22 (list page), #23 (builder), and all backend issues
Feature: Schedules — Recurring automated tasks for AI agent teams

Summary

Build the schedule detail page showing the schedule configuration, run history, and the ability to view the full conversation/activity of each run. This is the primary debugging interface for automations.

Page: src/pages/ScheduleDetailPage.tsx

Layout

┌──────────────────────────────────────────────────────────┐
│ ← Back to Schedules                                      │
│                                                          │
│ Weekly Tourism Post                      [Edit] [Delete] │
│ Marketing Team · Every Monday at 9:00 AM (CET)          │
│ Status: 🟢 Idle   Enabled: [toggle]                     │
│                                                          │
│ ┌── Prompt ────────────────────────────────────────────┐ │
│ │ Generate a blog post about the latest tourism news   │ │
│ │ in Canary Islands. Include key statistics, trends,   │ │
│ │ and a catchy headline suitable for social media.     │ │
│ └──────────────────────────────────────────────────────┘ │
│                                                          │
│ ┌── Schedule Info ─────────────────────────────────────┐ │
│ │ Next run: Mon Mar 3, 2026 at 9:00 AM                │ │
│ │ Last run: Mon Feb 24, 2026 at 9:00 AM               │ │
│ │ Created: Feb 20, 2026                                │ │
│ └──────────────────────────────────────────────────────┘ │
│                                                          │
│ ┌── Run History ───────────────────────────────────────┐ │
│ │                                                      │ │
│ │  #  Status    Started            Duration   Actions  │ │
│ │  5  ✅ Success  Feb 24, 9:00 AM   12m 34s   [View]  │ │
│ │  4  ✅ Success  Feb 17, 9:01 AM   15m 02s   [View]  │ │
│ │  3  ❌ Failed   Feb 10, 9:00 AM   2m 11s    [View]  │ │
│ │  2  ⏱️ Timeout  Feb 3, 9:00 AM    1h 00m    [View]  │ │
│ │  1  ✅ Success  Jan 27, 9:00 AM   8m 45s    [View]  │ │
│ │                                                      │ │
│ └──────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────┘

Run History Table

  • List of ScheduleRuns, newest first
  • Columns: Run number, status badge, started time, duration, actions
  • Status badges:
    • ✅ Success (green)
    • ❌ Failed (red) — show error on hover/expand
    • ⏱️ Timeout (amber)
    • 🔵 Running (blue, pulsing)
  • Duration: calculated from started_at to finished_at
  • [View] button: Navigates to the team's conversation/activity for that run

Conversation Viewer (clicking [View] on a run)

When clicking "View" on a run, navigate to the existing TeamMonitorPage but in read-only/replay mode using the team_deployment_id from the ScheduleRun. This shows:

  • The full chat conversation the agents had during that execution
  • The activity log (agent actions, tool calls, etc.)
  • This reuses the existing TeamMonitorPage infrastructure

Important: The user MUST be able to see the full agent conversation for debugging. This is the primary way users understand what happened during an automated execution.

Actions

  • Edit: Navigate to builder page in edit mode
  • Delete: Confirmation modal → DELETE /api/schedules/:id → redirect to list
  • Toggle: Enable/disable inline
  • View run: Navigate to conversation viewer

Error Display

  • For failed runs, show the error message in an expandable section
  • Red-tinted background with the error text
  • Include timestamp and duration for debugging

Acceptance Criteria

  • ScheduleDetailPage with schedule info, prompt, and run history
  • Run history table with status badges and duration
  • "View" button on each run navigates to conversation/activity
  • Edit and Delete actions
  • Toggle enable/disable inline
  • Error display for failed runs
  • Loading and empty states
  • Back navigation to schedules list
  • Follows existing dark theme conventions
  • Unit tests for the page
  • E2E tests covering the full schedule lifecycle (create → view → run history)

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions