feat: enhance notification handling with scoped actions#36
Conversation
- Updated `markAllNotificationsRead` and `clearNotifications` functions to support optional filtering by trigger name, allowing for more granular control over notification management. - Adjusted the `NotificationsView` component to reflect the new scoped functionality, including updates to button labels and unread count displays based on active filters. - Added tests to verify the behavior of scoped actions for marking notifications as read and clearing notifications.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cd75a4f1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const handleClearAll = async (): Promise<void> => { | ||
| if (showClearConfirm) { | ||
| await clearNotifications(); | ||
| await clearNotifications(activeFilter ?? undefined); |
There was a problem hiding this comment.
Reset active filter after scoped clear
When clearNotifications is invoked with activeFilter, the selected filter is preserved even if that filter is completely removed. In that state, filteredNotifications becomes empty while other notifications still exist, and if only one trigger remains the chip bar is hidden by the existing filterChips.length > 1 check, so users can no longer switch back to “All” and those remaining notifications become inaccessible from the UI.
Useful? React with 👍 / 👎.
markAllNotificationsReadandclearNotificationsfunctions to support optional filtering by trigger name, allowing for more granular control over notification management.NotificationsViewcomponent to reflect the new scoped functionality, including updates to button labels and unread count displays based on active filters.Closes #31