Skip to content

Commit eca336e

Browse files
ryaneggzclaude
andauthored
Feat(Frontend): Update Schedules to use TaskIQ Workers (#723)
* feat: US-001 - Add DISTRIBUTED_WORKERS constant to src/constants Consolidate DISTRIBUTED_WORKERS into src/constants/__init__.py and update llm.py to import from there instead of defining it inline. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-002 - Dispatch scheduled jobs to TaskIQ when distributed mode enabled scheduled_llm_invoke() now checks DISTRIBUTED_WORKERS and dispatches to run_agent_stream.kiq() when true, preserving the in-process fallback. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-003 - Simplify schedule create route Remove LLMController indirection from create_job route. Call schedule_service.create_job() directly, removing unused imports. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-004 - Add unit tests for TaskIQ dispatch path Tests verify dispatch to TaskIQ when DISTRIBUTED_WORKERS=true, in-process fallback when false, and thread_id extraction/generation logic. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * docs: update prd.json and progress.txt - all stories complete Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * Finished ralph loop * Adds images * init plan in place * feat: US-001 - Install React Big Calendar and setup dependencies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-002 - Define ScheduleExecution and ScheduleEvent entity types Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-003 - Add execution endpoints to schedule service Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-003 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-004 - Add calendar utility functions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-004 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-005 - Create useScheduleExecutions hook Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-006 - Sidebar Navigation for Schedules Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-006 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-006 - Create ScheduleSidebarItem component Extract ScheduleSidebarItem into its own file at frontend/src/components/sidebar/ScheduleSidebarItem.tsx with status indicators, truncated names, and thread links. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-006 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-007 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-008 - Remove schedule navigation from SettingsPopover Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-008 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-009 - Implement ScheduleCalendar component with React Big Calendar Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-009 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-010 - Create custom calendar CSS for shadcn/ui theme Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-011 - Implement ScheduleTable component with PAST/FUTURE toggle Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: update PRD and progress for US-011 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-012 - Create ViewToggle component for Calendar/Table switch Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-013 - Refactor Schedules index page with Calendar/Table views Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-014 - Final verification and lint/format cleanup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-004 - Add unit tests for TaskIQ dispatch path Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * chore: add progress log for US-004 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * Fix 422 * prd in place for 422 fix * Fix prd start * feat: US-001 - Update ScheduleCreate TypeScript Interface Align ScheduleCreate and Schedule interfaces with backend LLMRequest schema: - Nest messages under task.input (matching LLMInput model) - Remove legacy system field, keep only system_prompt - Add ScheduleTaskMetadata interface with typed Config fields - Add files? field to input matching backend LLMInput Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-002 - Update AgentScheduleForm Payload Construction - Wrap messages inside task.input matching LLMInput schema - Rename system to system_prompt in payload - Add assistant_id from agent.metadata or agent.id - Add agent_id to metadata for schedule tracking - Preserve custom metadata keys (schedule_description, inherited_from_agent, enabled) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-003 - Update Schedule Page Create/Edit Handlers - Update all task.messages references to task.input.messages - Update task.system references to task.system_prompt - Fix edit form pre-population to read from new structure - Fix search filter to use task.input.messages path Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * feat: US-004 - Verify End-to-End Schedule CRUD - All stories passing: typecheck, lint, browser verification - POST /api/schedules returns 201 with new payload structure - Schedule appears in list after creation - Updated PRD and progress log Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: ryaneggz <kre8mymedia@gmail.com> * Coderabbit suggestions * Fix build --------- Signed-off-by: ryaneggz <kre8mymedia@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 91e65e4 commit eca336e

29 files changed

Lines changed: 1718 additions & 206 deletions

File tree

.claude/plans/.gitkeep

Whitespace-only changes.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Context:
2+
3+
### React Big Calendar should be used to display schedules 30 days in past AND 30 days in future from today.
4+
5+
### Diff from Backend PR
6+
https://patch-diff.githubusercontent.com/raw/ruska-ai/orchestra/pull/721.diff
7+
8+
### Libraries to Consider
9+
- [React Big Calendar](https://github.com/jquense/react-big-calendar?tab=readme-ov-file#react-big-calendar) | Would be nice to display schedules 30 days in past AND 30 days in future from today in the calendar. Blue would indicate "scheduled", Green "success", and Red indicate a run "failure". When clicking on the event in the calendar would open in new tab that thread from the schedule.
10+
- If schedule is recurring we can just show a single event and a list of the schedules past and coming up if we have the data.
11+
12+
### Workflow
13+
1. Study the screenshots in `.claude/plans/feat-722-frontend-schedule-refactor/images` folder.
14+
- These will show how to create a scheduled agent from the interface with the `agent-browser` skill.
15+
- Study the "Create New Schedule" modal.
16+
2. Our goal is to move the navigation from the `SettingsPopover` and have a spot in the app-sidebar like we do with Projects, Assistants, and Threads. We should in the drop down have the last 10 schedules that have occurred in the sidebar. The index page (Calendar) will be place for management. We need to think hard about this design. Use the `agent-browser` kill when necessary to validate changes.
17+
3. Calendar is the DEFAULT view. We should have a table descending as secondary view with ability to toggle between PAST and FUTURE schedules so we can get an idea of what HAS been executed and what WILL be executed in table view.
18+
19+
# Goal:
20+
21+
**TDD Refactor the Schedules feature from a settings-level action to a first-class navigation entity with a dedicated management interface.**
22+
23+
## Deliverables:
24+
25+
1. **Sidebar Integration**
26+
- Add "Schedules" section to `app-sidebar` alongside Projects, Assistants, and Threads
27+
- Display the 10 most recent schedule executions in the sidebar dropdown
28+
- Each item should show schedule name, status indicator (🔵 scheduled / 🟢 success / 🔴 failure), and relative timestamp
29+
30+
2. **Calendar View (Default)**
31+
- Implement React Big Calendar as the primary `/schedules` index page
32+
- Display events spanning 30 days past to 30 days future from today
33+
- Color-code events: Blue (scheduled), Green (success), Red (failure)
34+
- Clicking an event opens the associated thread in a new tab
35+
- For recurring schedules, show a single consolidated event with expandable list of past/upcoming occurrences
36+
37+
3. **Table View (Secondary)**
38+
- Add toggle to switch between Calendar and Table views
39+
- Table should support toggling between PAST and FUTURE schedules
40+
- Sort descending by execution time
41+
- Include columns: Schedule Name, Status, Agent/Skill, Last Run, Next Run, Actions
42+
43+
4. **Navigation Cleanup**
44+
- Remove schedule navigation/creation from `SettingsPopover`
45+
- Ensure "Create New Schedule" modal remains accessible from the new Schedules section
46+
47+
5. **Validation**
48+
- Use `agent-browser` skill to validate UI changes match the reference screenshots
49+
- Ensure the `agent-browser` skill scheduling flow works end-to-end with new navigation
50+
89.2 KB
Loading
67.9 KB
Loading
86 KB
Loading
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"title": "Frontend Schedule Refactor",
3+
"description": "Elevate Schedules from Settings to first-class navigation with calendar and table views",
4+
"branchName": "feat/722-frontend-schedule-refactor",
5+
"userStories": [
6+
{
7+
"id": "US-001",
8+
"title": "Install React Big Calendar and setup dependencies",
9+
"passes": true
10+
},
11+
{
12+
"id": "US-002",
13+
"title": "Define ScheduleExecution and ScheduleEvent entity types",
14+
"passes": true
15+
},
16+
{
17+
"id": "US-003",
18+
"title": "Add execution endpoints to schedule service",
19+
"passes": true
20+
},
21+
{
22+
"id": "US-004",
23+
"title": "Add calendar utility functions",
24+
"passes": true
25+
},
26+
{
27+
"id": "US-005",
28+
"title": "Create useScheduleExecutions hook",
29+
"passes": true
30+
},
31+
{
32+
"id": "US-006",
33+
"title": "Sidebar Navigation for Schedules",
34+
"description": "Add Schedules as a first-class navigation item in the app sidebar alongside Projects, Assistants, and Threads. Sidebar dropdown shows the 10 most recent schedule executions with name, status indicator, and relative timestamp. Clicking navigates to thread or schedule detail.",
35+
"passes": true
36+
},
37+
{
38+
"id": "US-007",
39+
"title": "Calendar View (Default Schedule Index)",
40+
"description": "React Big Calendar renders as the default view at /schedules with events spanning 30 days past to 30 days future, color-coded by status.",
41+
"passes": false
42+
},
43+
{
44+
"id": "US-008",
45+
"title": "Table View (Secondary Toggle)",
46+
"description": "Toggle between Calendar and Table views on the schedules page. Table supports PAST/FUTURE toggle, sorted descending by execution time.",
47+
"passes": false
48+
},
49+
{
50+
"id": "US-009",
51+
"title": "Remove Schedule Navigation from SettingsPopover",
52+
"description": "Remove schedule navigation from SettingsPopover, keep it accessible only from the new dedicated Schedules sidebar section.",
53+
"passes": false
54+
},
55+
{
56+
"id": "US-010",
57+
"title": "End-to-End Validation with agent-browser",
58+
"description": "Validate the scheduling flow end-to-end using agent-browser skill.",
59+
"passes": false
60+
}
61+
]
62+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Codebase Patterns
2+
- Schedule entities are in `/frontend/src/lib/entities/schedule.ts`
3+
- Schedule service is in `/frontend/src/lib/services/scheduleService.ts`
4+
- Hooks follow pattern: `/frontend/src/hooks/use*.ts`
5+
- Calendar utils in `/frontend/src/lib/utils/calendar.ts`
6+
- Schedule utils in `/frontend/src/lib/utils/schedule.ts`
7+
- Sidebar is in `/frontend/src/components/drawers/app-sidebar.tsx`
8+
- SettingsPopover has schedule link at `/frontend/src/components/popovers/SettingsPopover.tsx`
9+
- Use shadcn/ui components and Tailwind for styling
10+
- Collapsible sidebar sections use `Collapsible`, `CollapsibleTrigger`, `CollapsibleContent` from shadcn
11+
- Sign commits with `-s` flag
12+
- Files in `.claude/specs/` are gitignored; use `git add -f` to include them
13+
- Sidebar uses tab characters for indentation
14+
15+
---
16+
17+
## 2026-02-01 - US-001
18+
- Installed react-big-calendar and @types/react-big-calendar
19+
- Files changed: package.json, package-lock.json
20+
---
21+
22+
## 2026-02-01 - US-002
23+
- Added ScheduleExecution, ScheduleEvent, ScheduleWithExecutions, ScheduleFormData interfaces
24+
- Files changed: frontend/src/lib/entities/schedule.ts
25+
---
26+
27+
## 2026-02-01 - US-003
28+
- Added execution endpoints to schedule service (getRecentExecutions, getScheduleExecutions, getExecutionsByDateRange)
29+
- Files changed: frontend/src/lib/services/scheduleService.ts
30+
---
31+
32+
## 2026-02-01 - US-004
33+
- Added calendar utility functions (mapExecutionsToEvents, getCalendarDateRange, getExecutionStatusColor, filterExecutionsByPeriod)
34+
- Files changed: frontend/src/lib/utils/calendar.ts
35+
---
36+
37+
## 2026-02-01 - US-005
38+
- Created useScheduleExecutions hook with auto-refresh support
39+
- Files changed: frontend/src/hooks/useScheduleExecutions.ts
40+
---
41+
42+
## 2026-02-01 - US-006
43+
- Added Schedules collapsible section to app-sidebar between Projects and Threads
44+
- Shows 10 most recent executions with status emoji (🔵/🟢/🔴), schedule name, and relative timestamp
45+
- "View All Schedules" button navigates to /schedules
46+
- Clicking execution with thread_id opens thread in new tab
47+
- Loading and empty states handled
48+
- Files changed: frontend/src/components/drawers/app-sidebar.tsx
49+
- **Learnings for future iterations:**
50+
- The sidebar uses tab characters for indentation, not spaces
51+
- Collapsible sections follow a consistent pattern with SidebarGroup, SidebarGroupLabel, CollapsibleTrigger
52+
- useSchedules hook needs fetchSchedules() called manually on mount to populate schedule names
53+
- Files in .claude/specs are gitignored; use `git add -f` to include them
54+
---

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## v0.0.2-rc142
99

1010
### Changed
11+
- feat/722-frontend-schedule-refactor (2026-02-01)
1112
- feat/724-add-watcher-to-worker-reload (2026-02-01)
1213
- feat/715-ubuntu-execution-env (2026-01-31)
1314
- feat/442-able-to-edit-memorys (2026-01-31)

RALPH_TASK.md

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)