mirror of
https://github.com/block/buzz.git
synced 2026-11-24 18:21:59 +00:00
## Summary - Honor the synced `seen:<channel>` timestamp in mobile row styling and the **Unreads** filter. Attention keeps its dot regardless of timestamp, and the row's mark-read menu uses the underlying unread state. - Hide the dot when the row shows a mute the relay has confirmed. Confirmation survives reconnects within the same account and relay. The row still exposes unread attention to screen readers. Unmuting on the phone restores any dot supported by retained unread evidence as soon as the bell disappears. - Apply the same `seen:<channel>` timestamp to the app icon badge's ordinary backlog count. Mentions and thread replies keep counting. Includes #9721. This reuses the existing read-state and mute sync. Pending mutes keep the dot visible, and the patch adds no relay requests or read-state writes. ### Related issue No matching issue or open PR found. Earlier mobile sidebar unread parity work is in #1303. ## Testing - `just mobile-install mobile-check mobile-test` - Widget coverage for backlog at and after the desktop cut, mentions on either side of it, the **Unreads** filter, the mark-read menu, pending and confirmed mute, and unmute while the relay still reports muted. - Scripted relay coverage for mute confirmation across reconnects, delayed and older responses, newer confirmations, and relay switches. Read-state tests cover reading a peer's `seen:` context during an ordinary mobile publish. - Badge provider tests cover backlog at and after the cut, plus mentions and thread replies older than the cut. ### Test on a phone with desktop alongside 1. Check out the PR. To install a local debug build, run `./scripts/mobile-worktree-overrides.sh` from the repo root, then run `flutter devices` and `flutter run -d <device-id>` from `mobile/` with Hermit active. Use the device signing setup if needed for a physical iPhone. Sign in to the same account and community on both clients. Use an already initialized mobile account and leave the phone on the channel list. [Device signing setup](https://github.com/block/buzz/tree/main/mobile#ios-push-capability) 2. Have a second account post an ordinary message in a test channel. Wait for its row to become bold on both clients. On desktop, open that channel and switch away quickly, before the 300 ms reading dwell. After sync, the phone row should lose bold. In the phone's section menu, choose **Filter…**, select **Unreads**, and tap **Apply**. The row should disappear. Use **Show hidden channels** and long-press the row to verify that **Mark Read** is still available. Dismiss the menu, tap **Hide filtered channels**, and have the second account send a newer ordinary message. The row should appear bold again. 3. For a mention older than the cut, have the second account @mention you in a different test channel before making the quick desktop visit. After leaving the channel on desktop, the phone should still show its attention dot. For a newer mention, do the quick desktop visit after an ordinary post in a separate channel, wait for its phone row to quiet, then send the @mention. Its phone row should gain a dot. 4. With the mention still unread, mute that channel on desktop. When the phone shows the muted bell, verify that the attention dot disappears. Turn off the phone's network connection, return to the channel list, then reconnect. The dot should stay hidden throughout. On the phone, long-press the row and choose **Unmute channel**. The dot should return as soon as the bell disappears. Keep the phone on the channel list throughout so it does not read the mention. 5. On a phone with app badges enabled, repeat the ordinary-message case in step 2 with that message as the only unread item. After the phone syncs the desktop visit, the app icon badge should clear. A newer ordinary message should bring it back. Device and desktop testing is pending. ### Before and after Before and after captures from the Flutter channel list widget with synthetic rows. The ordinary `desktop-seen` row loses bold, the confirmed-muted mention loses its dot, and the unread control stays bold. | Theme | Before | After | | --- | --- | --- | | Light |  |  | | Dark |  |  | --------- Signed-off-by: Wes <wesb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Star Lord <b89298dbe87c6b3fd8a425b535d9d161f23c88d555a47925ae0b04dfe02b201e@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@block.xyz>