这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ccmdi
Copy link
Contributor

@ccmdi ccmdi commented Nov 2, 2025

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

  • Bug fix
  • New feature
  • Breaking change
  • UI/UX update
  • Docs update
  • Refactor / Cleanup

Related Areas

  • Authentication
  • Calendar UI
  • Data/API
  • Docs

Testing

  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Checklist

  • I’ve read the CONTRIBUTING guide
  • My code works and is understandable and follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • Any dependent changes are merged and published

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.

  • Bug Fixes
    • Delete: when the event is already gone, remove all optimistic actions for that event (not just drafts).
    • Create: clear any existing optimistic actions for the event before adding a create action.
    • Update/Drafts: remove the optimistic action on success and add a missing optimistic id for draft events to enable cleanup.

Written for commit 82ec3f6. Summary will update automatically on new commits.

@vercel
Copy link

vercel bot commented Nov 2, 2025

@ccmdi is attempting to deploy a commit to the analogdotnow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
analog Ready Ready Preview Comment Nov 5, 2025 2:23am

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

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.

2 participants