Skip to content

Add cron-based scheduling with prompt templates integration#164

Merged
chriswritescode-dev merged 16 commits intomainfrom
feat/cron-schedule
Mar 22, 2026
Merged

Add cron-based scheduling with prompt templates integration#164
chriswritescode-dev merged 16 commits intomainfrom
feat/cron-schedule

Conversation

@chriswritescode-dev
Copy link
Copy Markdown
Owner

Summary

  • Implement cron-based job scheduling using node-cron
  • Add prompt templates feature for reusable schedule configurations
  • Refactor Schedules page into modular tab-based architecture
  • Add comprehensive error handling and session monitoring
  • Full test coverage for schedules and prompt templates

Why

Replaces setInterval polling with cron-based scheduling for better reliability and resource efficiency. Prompt templates enable reusable schedule configurations.

What Is Included

  • Cron scheduler service with timezone support
  • PromptTemplate CRUD API and database layer
  • JobsTab, JobDetailTab, RunHistoryTab components
  • Session status recovery and error handling improvements
  • Full test coverage and documentation

Type Of Change

  • New feature
  • Refactoring
  • Performance improvement

Checklist

  • Code follows project style
  • Types updated
  • pnpm lint passes
  • Tests added

itz4blitz and others added 16 commits March 8, 2026 20:21
Add coverage reporting and exercise recovery, cancellation, and async failure paths so the schedules feature has stronger backend validation.
Keep cron schedules migratable, trim run polling payloads, and expose the health endpoint so Docker preview and PR feedback match the intended behavior.
…t, removing intervalMinutesToCronExpression utility
- Create PromptTemplateSchema and related types in shared package
- Add database layer with prompt-templates.ts and migration 009
- Implement REST API routes for prompt templates CRUD operations
- Add PromptTemplateService for business logic
- Create React hook usePromptTemplates and API client
- Add PromptTemplateDialog component for template management
- Register prompt-templates routes in main index.ts
- Add comprehensive test coverage for routes
- Extract JobsTab, JobDetailTab, and RunHistoryTab components
- Replace monolithic Schedules page with modular component structure
- Update ScheduleJobDialog to integrate prompt templates
- Refactor schedule-utils to remove deprecated code
- Improve UI with better tab navigation and run detail panels
- Add RunHistoryTab with log, assistant output, and error views
- Update minor UI components (tabs, header) for consistency
- Add try/catch around updateScheduleJobRunState calls
- Implement session status recovery for completed sessions
- Add finalizeRecoveredRun for handling recovered session states
- Properly dispose session monitors and clean up active runs
- Compute next run time correctly for manual triggers
- Add comprehensive tests for schedule database queries
- Update OpenCode API client for better integration
- Minor updates to RepoDetail and SessionDetail pages
- Add --watch-path flag to limit file watching to source directories
- Improves dev server performance by reducing watch scope
# Conflicts:
#	backend/src/db/migrations/index.ts
#	frontend/src/pages/SessionDetail.tsx
@chriswritescode-dev chriswritescode-dev merged commit 1e863c5 into main Mar 22, 2026
4 checks passed
@chriswritescode-dev chriswritescode-dev deleted the feat/cron-schedule branch March 22, 2026 22:23
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.

2 participants