Skip to content

Conversation

@Harshkamboj11
Copy link

What changed

  • Batched all task attribute updates into a single task modify command
  • Replaced taskID usage with stable UUID for task modification
  • Removed unsafe global Taskwarrior data deletion

Why

  • Spawning multiple shell processes for a single task update is inefficient
  • Using UUID prevents issues caused by volatile task IDs
  • Improves performance and safety in concurrent environments

How it was tested

  • Manual code review
  • Existing task edit flow remains unchanged

Notes

  • Annotation handling is intentionally kept separate

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

@its-me-abhishek
Copy link
Collaborator

Kindly add a self-code-review similar to this

@Harshkamboj11
Copy link
Author

I’ve addressed the formatting issue and added inline self-review comments explaining the batching logic, UUID usage, and why annotations are handled separately.

All required changes from my side should be complete now.
Please let me know if you’d like me to adjust anything further. Thanks!

@Harshkamboj11
Copy link
Author

@its-me-abhishek
Thanks for the review!
I’ve updated the implementation to use EditTaskRequestBody directly, restored the wait-date logic, and rewrote the annotation handling while keeping existing behavior intact.
Please let me know if anything else needs adjustment.

@Harshkamboj11
Copy link
Author

Harshkamboj11 commented Jan 7, 2026

@its-me-abhishek
Done.
Removed the extra comments and replaced json.Unmarshal with a streaming json.Decoder for export handling.

@its-me-abhishek
Copy link
Collaborator

@Harshkamboj11 the functions' usage in controllers should be updated as well, in order to make this work, currently it will break.

@Harshkamboj11
Copy link
Author

@its-me-abhishek
Yes, done 👍
Updated EditTaskHandler to construct EditTaskRequestBody and call the new EditTaskInTaskwarrior(req) API.
This should prevent any runtime break now.

Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

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

Looks good, tested locally, and works fine. Although the tests seem to break, could you please add those as well?

@Harshkamboj11
Copy link
Author

@its-me-abhishek
Resolved test conflicts by keeping request-based EditTaskInTaskwarrior tests aligned with the new API.

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