-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add circular dependency detection #366
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert that, or provide some context for that change
frontend/src/components/HomePage.tsx
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this lead to blinking again, though?
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.
yes , you’re right I have reverted the change.
I have attached the video:
crct-.Trim.mp4
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.
Screen.Recording.2026-01-02.154858.-.Trim.mp4
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.
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