feat: make recur field editable#232
Conversation
|
Hey @its-me-abhishek, |
|
Please fix the conflicts |
Added recur field editing functionality. Users can set task recurrence (daily, weekly, monthly, etc.) and Taskwarrior automatically updates the rtype field. Both recur and rtype fields are now visible in task details.
5661902 to
ddd9866
Compare
|
@its-me-abhishek resolved all conflicts , and update the pr plss take a look when you get time , thanks . |
| onChange={(e) => | ||
| setEditedRecur(e.target.value) | ||
| } | ||
| placeholder="daily, weekly, monthly, etc." |
There was a problem hiding this comment.
imo it'd be better to provide a dropdown to choose from one of those..
There was a problem hiding this comment.
yeah thanks, A dropdown makes more sense.
I’ll update it with the common recur options and push the changes."
Replaced text input with dropdown for better UX. Removed 'None' option to simplify selection. Added hover effects for better visual feedback.
|
Hey @its-me-abhishek, |
|
|
||
| func TestEditTaskInATaskwarrior(t *testing.T) { | ||
| err := EditTaskInTaskwarrior("uuid", "description", "email", "encryptionSecret", "taskuuid", nil, "project", "2025-11-29T18:30:00.000Z", "2025-11-29T18:30:00.000Z", "2025-11-29T18:30:00.000Z", "2025-11-30T18:30:00.000Z", nil, "2025-12-01T18:30:00.000Z") | ||
| err := EditTaskInTaskwarrior("uuid", "description", "email", "encryptionSecret", "taskuuid", nil, "project", "2025-11-29T18:30:00.000Z", "2025-11-29T18:30:00.000Z", "2025-11-29T18:30:00.000Z", "2025-11-30T18:30:00.000Z", nil, "2025-12-01T18:30:00.000Z", "") |
There was a problem hiding this comment.
Shall add some value in the tests, a nil or "" will mostly make these tests pass, while being flaky
| <SelectItem | ||
| value="daily" | ||
| className="cursor-pointer hover:bg-accent" | ||
| > |
There was a problem hiding this comment.
Shall also have a None field by default, and it should be selectable too... clicking that would remove any recurrence, as in this implementation one can 'SET' recursion but can not remove any (via the UI)
|
@its-me-abhishek. |
|
@its-me-abhishek |
| } | ||
|
|
||
| // Handle recur - this will automatically set rtype field | ||
| if recur == "none" { |
There was a problem hiding this comment.
this is not intended... what I meant was,
in a scenario when one edits the recur field, while:
- having no recur set previously: They should get an option of None to revert back, while adding a task. Hence show 4 options in that case
- already having a recur set: Then one can only modify the existing - hence no need to show the None option.
In the first case there won't be a need for a none call on backend in case the user chooses none, as it would lead to an error anyways. And we will not have an option to set none in the second case as well.
So make no call via frontend if None is chosen. And show none only when No recur has been already set
|
@its-me-abhishek ,sure |
490fb0d to
7df0177
Compare
|
@its-me-abhishek , |
|
LGTM! Merging this |
* feat: make recur field editable Added recur field editing functionality. Users can set task recurrence (daily, weekly, monthly, etc.) and Taskwarrior automatically updates the rtype field. Both recur and rtype fields are now visible in task details. * chore: fix prettier formatting * refactor: improve recur field dropdown UI Replaced text input with dropdown for better UX. Removed 'None' option to simplify selection. Added hover effects for better visual feedback. * fix: show None option only when task has no recur set
Added recur field editing functionality with dropdown selection. Users can set task recurrence (daily, weekly, monthly, yearly) and Taskwarrior automatically updates the rtype field.
Changes
Backend:
Recurfield toEditTaskRequestBodymodelEditTaskHandlerto extract and pass recur parameterEditTaskInTaskwarriorto executetask modify recur:valuecommandFrontend:
editTaskOnBackendfunctionhandleEditTaskOnBackendcalls to pass recur valueTests:
How It Works
When users edit the recur field, the backend executes
task <id> modify recur:value. Taskwarrior automatically sets the rtype field to "periodic" for time-based recurrences. Both fields are displayed in task details - recur is editable via dropdown, rtype is read-only.UI Improvements
Checklist
npx prettier --write .gofmt -w .npm testAdditional Notes
RType Values:
periodic- Regular time-based recurrence (daily, weekly, monthly, yearly)chained- Recurs after previous instance completes (advanced use case)None- No recurrenceRType is automatically managed by Taskwarrior and cannot be edited directly. The UI shows "(Auto-set by recur)" when the field is empty to explain this behavior.
Screenshots

