-
Notifications
You must be signed in to change notification settings - Fork 67
feat: add annotations field to Add Task Panel #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add annotations field to Add Task Panel #266
Conversation
|
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:
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! |
|
hey @its-me-abhishek, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This annotation logic retrieves the actual task ID after creation instead of using newest filter, which ensures reliable annotation attachment to the correct task in Taskwarrior.
Hell1213
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented annotations support in Add Task, wired it up in the backend with proper task ID handling, added read-only display in Task Details, and updated tests. All changes stay within the intended scope.
|
annotation lookup logic is fragile because it relies on the next report, which doesn’t guarantee ordering and can return unpredictable output depending on user config, report definitions, or task statuses. this makes the ID extraction unreliable and may fail after sync or if the report isn’t configured exactly as expected. We should switch to a stable source of truth by using task export (JSON) maybe and extracting the UUID of the last created task. UUIDs are consistent across sync and avoid ID-shift issues as ID is unreliable most of the times. |
Thank ! You were absolutely right about the fragile annotation lookup logic, I'm working on it will update PR shortly |
3cbc519 to
422c0cf
Compare
|
hey @its-me-abhishek , I’ve updated the annotations implementation so the task is identified reliably after creation and annotations are attached to the correct task using task export instead of report-based lookup. The PR is ready for review now. Thanks. |
422c0cf to
1d18419
Compare
backend/utils/tw/taskwarrior_test.go
Outdated
|
|
||
| func TestAddTaskWithTags(t *testing.T) { | ||
| err := AddTaskToTaskwarrior("email", "encryption_secret", "clientId", "description", "", "H", "2025-03-03", []string{"work", "important"}) | ||
| err := AddTaskToTaskwarrior("email", "encryption_secret", "clientId", "description", "", "H", "2025-03-03", []string{"work", "important"}, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nil values should be removed from these tests everywhere to prevent flaky nature
its-me-abhishek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix
1d18419 to
cf1bced
Compare
|
hey @its-me-abhishek |
| setIsCreatingNewProject, | ||
| uniqueProjects = [], | ||
| }: AddTaskDialogProps) => { | ||
| const [annotationInput, setAnnotationInput] = useState(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems this takes only one Annotation as an input, please fix this as there can be many annotations!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated , task can have multiple annotations like tags
For this as well, please add some textual value to that as '' or nil or [''] mostly end up in creating false positives |
Updated the PR , tasks have multiple annotations support , |
- Add annotations field to AddTaskRequestBody and frontend forms - Implement annotation processing using task export for reliable task ID - Fix stale state bug in handleAddTask function
cf1bced to
1ac343f
Compare
- Add annotations field to AddTaskRequestBody and frontend forms - Implement annotation processing using task export for reliable task ID - Fix stale state bug in handleAddTask function
Description
This PR adds support for annotations when creating a task. An annotations input has been added to the Add Task dialog (following the existing tags UX), and the backend has been updated to correctly apply annotations using Taskwarrior after task creation. A read-only annotations section is also included in the Task Details view, and update test mocks to include annotations field for TypeScript compatibility
The scope is intentionally limited to adding the annotations field during task creation; editing annotations is out of scope.
Contributes to #188
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes
Annotations follow the same UI pattern as tags for consistency. Backend uses proper task ID retrieval for reliable annotation attachment to Taskwarrior.
** Demo video**
Screencast.from.2025-12-19.10-40-31.mp4