Skip to content

feat: make start field editable#190

Merged
its-me-abhishek merged 3 commits into
CCExtractor:mainfrom
Hell1213:feat/make-start-field-editable
Nov 17, 2025
Merged

feat: make start field editable#190
its-me-abhishek merged 3 commits into
CCExtractor:mainfrom
Hell1213:feat/make-start-field-editable

Conversation

@Hell1213
Copy link
Copy Markdown
Contributor

@Hell1213 Hell1213 commented Nov 16, 2025

Description

Users can now edit the start date field directly from the task details dialog. Click the pencil icon next to the start field, select a date, and save.

While implementing this, I fixed some issues with taskwarrior command execution that were causing failures when adding or modifying tasks. The backend now properly uses temporary directories and the frontend correctly identifies tasks by UUID instead of ID.

What's Working

  • Edit start date with date picker
  • Save and sync start date changes
  • Complete tasks after editing start date
  • Add new tasks
  • Modify existing tasks

Changes Made

Frontend:

  • Added start date editing UI with date picker in task details dialog
  • Fixed task identification to use UUID instead of ID

Backend:

  • Added start parameter to edit task endpoint
  • Fixed taskwarrior commands to use temporary directories
  • Added rc.confirmation=off flag to prevent command hangs
  • Fixed add_task and modify_task functions

Screenshots:
Screenshot from 2025-11-16 11-19-04
Screenshot from 2025-11-16 11-19-37

Video Demo:

Screencast.from.2025-11-16.11-17-46.mp4

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified feature works in browser
  • Updated documentation, if needed

Additional Notes

This PR addresses one item from issue #166. The taskwarrior integration tests fail in local dev environment because they require a real taskwarrior server setup, but the feature works correctly in the actual application.

@its-me-abhishek
Copy link
Copy Markdown
Collaborator

Looks okay to me, please fix the conflicts

@Hell1213
Copy link
Copy Markdown
Contributor Author

Looks okay to me, please fix the conflicts
Thanks @its-me-abhishek — I’ve resolved the conflicts.
Pushing the updated changes now.

@Hell1213 Hell1213 force-pushed the feat/make-start-field-editable branch from a7cb28a to be70048 Compare November 16, 2025 07:28
@Hell1213
Copy link
Copy Markdown
Contributor Author

Looks okay to me, please fix the conflicts

All set now, everything’s fixed and the PR is ready for review and merge whenever you get a time.

Copy link
Copy Markdown
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.

Please look into this


// add task to the user's tw client
func AddTaskToTaskwarrior(email, encryptionSecret, uuid, description, project, priority, dueDate string, tags []string) error {
if err := utils.ExecCommand("rm", "-rf", "/root/.task"); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why's this removed?

)

func CompleteTaskInTaskwarrior(email, encryptionSecret, uuid, taskuuid string) error {
if err := utils.ExecCommand("rm", "-rf", "/root/.task"); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why's this removed as well?

return err
}

// Escape the double quotes in the description and format it
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the older comment provided more context imo

Comment thread backend/utils/tw/taskwarrior_test.go Outdated

func TestEditTaskInATaskwarrior(t *testing.T) {
err := EditTaskInTaskwarrior("uuid", "description", "email", "encryptionSecret", "taskuuid", nil, "project")
err := EditTaskInTaskwarrior("uuid", "description", "email", "encryptionSecret", "taskuuid", nil, "project", "")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

passing an empty field makes the test pretty vague

Comment thread backend/utils/tw/sync_tasks.go Outdated
// sync the user's tasks to all of their TW clients
func SyncTaskwarrior(tempDir string) error {
if err := utils.ExecCommandInDir(tempDir, "task", "sync"); err != nil {
if err := utils.ExecCommandInDir(tempDir, "task", "sync", "rc.confirmation=off"); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is not related to the scope of PR though, why'd we edit this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, I went beyond scope. Those files were giving me errors during testing so I fixed them too, but should've kept the PR focused on just the start field.

Should I revert the unrelated changes and keep only edit_task.go + frontend files?

@Hell1213
Copy link
Copy Markdown
Contributor Author

@its-me-abhishek
I’ll revert the unrelated backend edits and keep this PR focused on the start field.
I’ll push the updated changes .

Added start date field editing functionality to tasks
@Hell1213 Hell1213 force-pushed the feat/make-start-field-editable branch from be70048 to 7704b61 Compare November 16, 2025 11:16
@Hell1213
Copy link
Copy Markdown
Contributor Author

@its-me-abhishek ,plss kindly have a look ,ready for review !

)

func EditTaskInTaskwarrior(uuid, description, email, encryptionSecret, taskID string, tags []string, project string) error {
if err := utils.ExecCommand("rm", "-rf", "/root/.task"); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this shall be reverted. this file is also using ExecCommandsinDir instead of ExecCommands; which is also not really desired so please fix that

Copy link
Copy Markdown
Contributor Author

@Hell1213 Hell1213 Nov 16, 2025

Choose a reason for hiding this comment

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

I'll add back the rm -rf /root/.task lines. For ExecCommandInDir vs ExecCommand - should I use ExecCommand to match main branch, or keep ExecCommandInDir since SetTaskwarriorConfig uses it with tempDir?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd say just ExecCommand will work, as it is currently, in main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah I have pushed with accurate changes , it should be fine now !!

Added start date field editing functionality to tasks
@Hell1213 Hell1213 force-pushed the feat/make-start-field-editable branch from e774ce0 to e476e22 Compare November 17, 2025 07:59
@its-me-abhishek its-me-abhishek merged commit 8a771c7 into CCExtractor:main Nov 17, 2025
4 checks passed
ShivaGupta-14 pushed a commit to ShivaGupta-14/ccsync that referenced this pull request Dec 25, 2025
* feat: make start field editable

Added start date field editing functionality to tasks

* feat: make start field editable

Added start date field editing functionality to tasks

---------

Co-authored-by: Anirban Biswas <139000437+Rustix69@users.noreply.github.com>
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.

Make Task Model Fields Editable on Frontend and Backend

3 participants