Repository navigation
fix(core): fix StreamDraftListController.deleteDraft removing the wrong draft - #3054
Conversation
… the draft list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesDraft matching
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Fixed issue severity: <fixed_issue_severity>Low</fixed_issue_severity> Merge Risk: ⚪ Minimal · up to The change is intended to keep channel and thread drafts distinct during deletion, and the added test targets that case. No concrete remaining risk is evident; merge after normal checks. 🚥 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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StreamDraftListController.deleteDraft removing the wrong draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3054 +/- ##
==========================================
- Coverage 78.02% 78.02% -0.01%
==========================================
Files 450 450
Lines 29320 29314 -6
==========================================
- Hits 22877 22872 -5
+ Misses 6443 6442 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Submit a pull request
Linear: FLU-956
Github Issue: -
CLA
Description of the pull request
Deleting a channel draft made
StreamDraftListControllerdrop a thread draft of the same channel from the list, while the channel draft stayed. The server deleted the right draft; only the list was wrong.What changes
deleteDraftmatches onchannelCidandparentId, so a channel draft (noparentId) only matches another channel draft. Before, a missingparentIdmatched any draft of the channel, and the first one in the list was removed.updateDraftuses the same(channelCid, parentId)key instead of a concatenated string.Testing
stream_draft_list_controller_test.dart: a thread draft followed by a channel draft of the same channel; deleting the channel draft leaves only the thread draft. Fails on master, passes here.Screenshots / Videos
flu-956_draft_delete_before_after.mp4
🤖 Generated with Claude Code
Summary by CodeRabbit