buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Persist Inbox "Show unread only" toggle across visits

Open thevidarbob opened this issue 4 months ago • 4 comments

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:

https://github.com/block/buzz/blob/485d03a358b6d695aaf97879f3fbaf2f308d0755/desktop/src/features/home/ui/HomeView.tsx#L109-L110

Steps to reproduce

  1. Open the Inbox.
  2. Enable Show unread only.
  3. 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.

thevidarbob avatar Jul 30 '26 03:07 thevidarbob

Backlog tracking note: #3682 is the active implementation for this issue. It replaces the Inbox's component-only unreadOnly state with a versioned localStorage-backed preference and includes coverage for the default, restoring both values, and persisting a later disable. The PR is currently open; contributors should coordinate there instead of starting a duplicate fix.

BradGroux avatar Jul 31 '26 23:07 BradGroux

Still reproduces on Buzz Desktop 0.5.10 (macOS), 2026-08-12. Independent confirmation from another user.

The toggle has to be re-enabled every time. There is no way to keep an unread-only Inbox as the default view.

Confirming the cause is unchanged on main today rather than assuming: desktop/src/features/home/ui/HomeView.tsx:112 is still

const [unreadOnly, setUnreadOnly] = React.useState(false);

so the state is still component-only and still initialises to false, exactly as the issue describes.

Flagging for whoever is triaging: #3682 is the linked fix and it has been open since 2026-07-30 with no activity since 2026-07-31. If it has stalled, this is worth freeing up for a different contributor rather than leaving it blocked on a PR that is not moving.

rrggrr avatar Aug 12 '26 15:08 rrggrr

This still reproduces on Desktop 0.5.23 and current main (HomeView.tsx:113 initializes unreadOnly with useState(false)). For anyone running an unread-only Inbox it has to be re-enabled on every visit, which makes the Inbox much harder to use day to day.

There are already three open fixes: #3682 (small, tested, mergeable since Aug 19), #6105, and #6151 (changes requested). Could a maintainer pick one of them - #3682 looks like the smallest path - so this doesn't stall further? Happy to test a build.

flowq-C avatar Sep 14 '26 07:09 flowq-C

https://github.com/block/buzz/pull/7672 merged.

ngthuydiem avatar Sep 23 '26 17:09 ngthuydiem