Skip to content

feat: implement recurring tasks with UI, engine, and notifications#591

Open
inderjeet20 wants to merge 1 commit intoCCExtractor:mainfrom
inderjeet20:recurringTasks
Open

feat: implement recurring tasks with UI, engine, and notifications#591
inderjeet20 wants to merge 1 commit intoCCExtractor:mainfrom
inderjeet20:recurringTasks

Conversation

@inderjeet20
Copy link
Contributor

@inderjeet20 inderjeet20 commented Feb 14, 2026

fixes #588

Summary

This PR introduces complete recurring task support in the Flutter app for both Taskserver and Taskchampion/Replica profiles.
It adds recurrence selection, editing, display, next-instance generation, and notification handling, bringing the app closer to full parity with Taskwarrior CLI functionality.


Why

Taskwarrior already supports recurrence via CLI, but the Flutter app lacked proper UI and behavior support.
This PR enables full recurring workflows directly in the app, removing the need to rely on the CLI.


Key Features

1. Recurrence Engine

  • Added recurrence_engine.dart
  • Supported types:
    • Daily
    • Weekly
    • Monthly
    • Yearly

2. Task Creation (All Profiles)

  • Recurrence selector added to add-task composer:
    • None, Daily, Weekly, Monthly, Yearly
  • Recurrence fields persisted on save:
    • recur
    • rtype=periodic

Due-date behavior:

  • If recurrence is selected and due is empty:
    • Due defaults to end of today
  • Due remains editable
  • If recurrence is removed:
    • Auto-filled due is cleared
  • Manually set due dates are preserved

3. Add-task Modal Fixes

  • Save and Cancel now consistently close the composer.
  • Works across:
    • Bottom sheet
    • Dialog
    • Deep-link entry

4. Recurrence Editing in Task Details

Taskserver:

  • Editable recur field added.

Taskchampion/Replica:

  • Recurrence editing support added.

Network layer:

  • Modify payload updated to support recurrence fields.

5. Automatic Next-instance Generation

When a recurring task is completed:

  • Taskserver: next instance spawned via modify pipeline
  • Taskchampion (local DB): new pending task with shifted due/wait
  • Replica: new pending replica task with shifted due/wait

6. Recurrence Indicators in Task Lists

  • Added repeat badge
  • Added next-due text
  • Fixed badge overflow and layout issues

7. Notification Support

  • Scheduling and cancellation for due/wait notifications
  • Triggered on:
    • Insert
    • Update
    • Complete
    • Delete
    • Recurrence spawn

8. Dependency Updates

  • Upgraded:
    • uuid^4.5.2
  • Regenerated desktop plugin registrants

Behavior Notes

  • Recurrence works across all profiles.
  • Completing a recurring task:
    • Creates a new pending task
    • Preserves core attributes
    • Shifts due/wait appropriately
  • Recurrence badges render correctly without overlap.

Testing

Automated

  • Static analysis: no compile errors
  • Widget tests: Passed

Manual

Verified:

  • Creating recurring tasks
  • Editing recurrence
  • Completing recurring tasks → next instance created
  • Badge rendering and overflow behavior
  • Notification scheduling and cancellation

Screenshots

@SGI-CAPP-AT2
Copy link
Collaborator

@inderjeet20 , What is this next ? and it shows me same date no matter what is Recurrence

image

await Replica.addTaskToReplica(HashMap<String, dynamic>.from({
"description": homeController.namecontroller.text.trim(),
"due": getDueDate(homeController.selectedDates)?.toUtc(),
"entry": DateTime.now().toUtc().toIso8601String(),
Copy link
Collaborator

@SGI-CAPP-AT2 SGI-CAPP-AT2 Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENTRY Attribute is added

(just a bookmark for me)

@SGI-CAPP-AT2
Copy link
Collaborator

@inderjeet20 , I have suggested some changes for taskchampion (v3)

@inderjeet20
Copy link
Contributor Author

inderjeet20 commented Feb 16, 2026

@inderjeet20 , What is this next ? and it shows me same date no matter what is Recurrence

image

I just realized I didn’t set up the Taskserver environment while testing, so I couldn’t properly check the recurring task behavior across both backends. Because of that, the Taskchampion flow wasn’t tested the way it should have been.
I’ll set up the proper environment, reproduce the issue, and push the fixes so recurrence works correctly for Taskchampion as well.

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.

Feature Request: Add Support for Recurring Tasks

2 participants