feat: add circular dependency detection#366
feat: add circular dependency detection#366its-me-abhishek merged 2 commits intoCCExtractor:mainfrom
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:
More information on how to conduct a self review: 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 The previous PR had some merge/commit history noise, so I opened this PR. |
|
@its-me-abhishek yes , i have made the change wrt to your review |
its-me-abhishek
left a comment
There was a problem hiding this comment.
Please revert that, or provide some context for that change
| if (data.job !== 'Edit Task') { | ||
| getTasks(userInfo.email, userInfo.encryption_secret, userInfo.uuid); | ||
| } | ||
| // Refresh tasks after successful operations |
There was a problem hiding this comment.
won't this lead to blinking again, though?
There was a problem hiding this comment.
yes , you’re right I have reverted the change.
I have attached the video:
crct-.Trim.mp4
There was a problem hiding this comment.
Screen.Recording.2026-01-02.154858.-.Trim.mp4
There was a problem hiding this comment.
Also i have a doubt, Would it make sense to use syncTaskswithTwAndDb() here instead of calling getTasks()?
Since syncTasksFromTwAndDb() already performs the sync and updates the frontend state, is there a specific reason getTasks() is preferred in this case?
Description
Added cycle detection to prevent task dependency loops (e.g., Task A → Task B → Task A).
DFS algorithm with O(V + E) complexity for optimal cycle detection
Validates dependencies during add/edit/modify operations
Fixes: Circular dependency in task dependencies #308
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes