Merged
Conversation
…ontrols Remove the auto-mark-all-as-read timer that was causing announcements to disappear from the header on click. Announcements are now only marked as read via explicit per-item "Mark as read" buttons or the "Mark all read" header button. The drawer now splits items into unread (top) and an "Earlier" collapsible section for read items, which auto-expands when there are no unread items. Release notes are deduped against the main list.
Add useMarkAsUnreadMutation that deletes the activity record to revert an announcement to unread. Read items in the Earlier section now show a "Mark as unread" button so users can move items back to the top.
deleteItem likely fails on Directus permissions. Switch to updating activity records to read: false, which also handles multiple activity records correctly.
The readItems call on announcement_activity was silently failing (likely permissions), preventing the mutationFn from ever executing. Now activity IDs are extracted during announcement processing and passed directly to the mutation, eliminating the lookup entirely.
After mark-as-unread then mark-as-read, multiple activity records exist. The old check on activity[0] could pick the stale read:false record. Now uses .some() to match any read:true record, consistent with how AnnouncementIcon already checks read status.
Contributor
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR introduces mark-as-unread functionality for announcements. The feature refactors read/unread state management through separate mutations, adds activity ID tracking to announcements, reorganizes the UI to display separate read and unread sections, and updates localization strings across supported languages. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation