-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Summary
Add first-class recurring tasks with automatic generation and visibility in the UI.
Current behavior
- Tasks are one-off records in the
taskstable; there is no recurrence metadata in the schema documented in docs/DATABASE.md. - Task creation/update flows are handled through src/app/api/tasks/route.ts and UI in src/app/(dashboard)/tasks/TaskModal.tsx.
- The existing background worker (scripts/recurring-work.js) syncs GitHub issues and performs git safety pushes, but it does not create recurring tasks.
Proposed behavior
- Introduce a recurrence model (either a new
task_recurrencestable or columns ontasks) with fields such asrrule,next_run_at,last_run_at,timezone,enabled, andsource_task_id. - Add server-side generation that creates the next instance at schedule time and updates
next_run_at(cron or worker-friendly). - Update the task creation/edit UI to set recurrence rules and show the upcoming run in the task detail view.
- Ensure the kanban view shows generated instances in the correct status and project.
Scope
- Database migration for recurrence storage.
- API: extend POST/PUT to accept recurrence settings; add a lightweight endpoint to compute next run.
- Worker: scheduled job to create next instance (use existing worker patterns).
- UI: recurrence picker in TaskModal and display of upcoming run.
Acceptance criteria
- Recurring tasks can be created/edited with hourly, daily, weekly, monthly, and yearly cadences, as well as custom intervals and timezone support.
- A scheduled worker creates a new task instance at or after the next run time.
- Generated instances inherit project, tags, priority, and notes template.
- Recurring rules can be paused without deleting historical instances.
- No duplicate generation when the worker runs multiple times (idempotent by
(recurrence_id, run_at)).
Open questions
- What should be the default creation window (exact time vs. start-of-day)?
- Should recurrence live on the base task or a separate recurrence entity?
References
- docs/DATABASE.md (task schema)
- src/app/api/tasks/route.ts (task CRUD)
- src/app/(dashboard)/tasks/TaskModal.tsx (task form)
- scripts/recurring-work.js (background worker pattern)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested