-
-
Notifications
You must be signed in to change notification settings - Fork 186
fix(web): clear optimistic action properly when deleting event #410
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
|
@ccmdi is attempting to deploy a commit to the analogdotnow Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
1 issue found across 1 file
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="apps/web/src/components/calendar/flows/delete-event/delete-queue-provider.tsx">
<violation number="1" location="apps/web/src/components/calendar/flows/delete-event/delete-queue-provider.tsx:50">
`removeOptimisticAction` deletes entries by optimistic action ID, but this line now passes the real event ID. That key won’t exist in the optimistic-action map, so the optimistic delete entry never clears and the event continues to linger in state.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
apps/web/src/components/calendar/flows/delete-event/delete-queue-provider.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
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.
No issues found across 1 file
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
there's still a double submit issue when you click outside the event creation area: |
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.
No issues found across 5 files
Description
Fix events reappearing after deletion by properly cleaning up optimistic actions. Similar to #337
Current behavior: deleting events causes them to visually persist
Fixed behavior: deleted events do not visually persist
Screenshots / Recordings
Add screenshots or recordings here to help reviewers understand your changes.
Type of Change
Related Areas
Testing
Checklist
Notes
I threw a TODO in there because I'm pretty sure this bug originates elsewhere, but this fixes the immediate issue ¯\_(ツ)_/¯
By submitting, I confirm I understand and stand behind this code. If AI was used, I’ve reviewed and verified everything myself.
Summary by cubic
Fixes deleted events reappearing by properly clearing optimistic actions across delete, create, and update flows. Prevents ghost events and stale optimistic updates from persisting in the calendar.
Written for commit 82ec3f6. Summary will update automatically on new commits.