fix(web): delete reaction map entries by id - #9578
Conversation
📝 WalkthroughWalkthroughBoth issue reaction removal methods now delete reaction-map entries by the matched reaction ID instead of the reaction type. ChangesReaction removal
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
Fixes a bug in the web issue/comment reaction MobX stores where reaction map entries were being deleted using the emoji string key instead of the reaction id, leaving stale entries behind after removals.
Changes:
- Delete
reactionMapentries bycurrentReaction.idwhen removing an issue reaction. - Delete
commentReactionMapentries bycurrentReaction.idwhen removing a comment reaction.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/web/core/store/issue/issue-details/reaction.store.ts | Corrects reaction map deletion to use reaction id (consistent with how entries are stored). |
| apps/web/core/store/issue/issue-details/comment_reaction.store.ts | Corrects comment reaction map deletion to use reaction id (consistent with how entries are stored). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
When removing a work item or comment reaction, the store deleted from the reaction map using the emoji string instead of the reaction id. Entries are stored by id on create, so the old entry was left behind.
This PR deletes by
currentReaction.idin both issue and comment reaction stores.Type of Change
Test Scenarios
NA
References
NA
Summary by CodeRabbit