Problem
The Inbox's Show unread only toggle resets to off whenever the Inbox view is remounted. Users who prefer an unread-only Inbox have to enable it again after navigating away, reopening the Inbox, or restarting Buzz.
The current Desktop implementation stores this only as component state and initializes it to false:
|
const [filter, setFilter] = React.useState<InboxFilter>("all"); |
|
const [unreadOnly, setUnreadOnly] = React.useState(false); |
Steps to reproduce
- Open the Inbox.
- Enable Show unread only.
- Navigate away from the Inbox and return, or restart Buzz and reopen the Inbox.
Current behavior
Show unread only is off again.
Expected behavior
Buzz remembers the user's last choice and restores the toggle to the same checked or unchecked state the next time the Inbox opens.
Acceptance criteria
- Enabling Show unread only remains effective after navigating away from and back to the Inbox.
- The enabled state is restored after restarting Buzz.
- Disabling the toggle updates the saved preference so it remains disabled on subsequent visits.
- Users without a saved preference retain the current default of off.
- Automated coverage verifies preference restoration and the default/fallback behavior.
Problem
The Inbox's Show unread only toggle resets to off whenever the Inbox view is remounted. Users who prefer an unread-only Inbox have to enable it again after navigating away, reopening the Inbox, or restarting Buzz.
The current Desktop implementation stores this only as component state and initializes it to
false:buzz/desktop/src/features/home/ui/HomeView.tsx
Lines 109 to 110 in 485d03a
Steps to reproduce
Current behavior
Show unread only is off again.
Expected behavior
Buzz remembers the user's last choice and restores the toggle to the same checked or unchecked state the next time the Inbox opens.
Acceptance criteria