Skip to content

Read whole DMs and end a channel's manual unread at the bottom - #616

Merged
wesbillman merged 3 commits into
mainfrom
larry/dm-open-and-bottom-unread
Oct 6, 2026
Merged

wesbillman merged 3 commits into
mainfrom
larry/dm-open-and-bottom-unread

Conversation

@loganj

@loganj loganj commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

🤖

Summary

Two places where Buzz kept showing something as unread after you had read it:

  • Direct messages. Before, a DM was read one message at a time, and only for messages that appeared on screen. When you opened a DM at the bottom, older unread messages above the screen kept the DM unread until you scrolled up to them. Now, reading any part of a DM, or reaching its bottom, marks the whole DM read, including replies.
  • Channels you marked unread. Before, if you used "Mark unread on this device" on a channel, it stayed unread after you read it to the bottom. Only an explicit "Mark read" ended it. Now, reading to the bottom ends the channel's unread state.

What does not change:

  • A single message or thread that you marked unread stays unread when you reach the bottom of the channel.
  • Mentions and thread replies you have not seen still count as unread.
  • Reaching the bottom of a thread does not end a manual unread on its channel.

The mobile app gets the same two changes, so both apps behave the same.

Details

  • src/features/relay/unread.ts: in a DM, the reading logic now moves the DM's "read up to" point to the newest loaded message, and clears the DM's manual unread. In a DM it writes no per-message read records. The "read up to" time always comes from a message's own timestamp, never from the device clock.
  • In a channel, reaching the bottom also clears the channel's manual unread. If the channel was already read up to that point, only the manual unread is cleared.
  • docs/unread.md describes the new rules, including the table of which actions clear which unread states.
  • Unit tests cover DM reading from both the bottom and the visible messages, and a channel bottom that clears the channel's manual unread while a single marked message stays unread. Two browser tests now expect the new behavior.

@loganj
loganj marked this pull request as ready for review October 5, 2026 23:04
@loganj
loganj requested review from a team, comp615 and wesbillman as code owners October 5, 2026 23:04

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Two P2 correctness blockers; see the inline findings. The change is small and reuses the right owner, but does not yet meet the 9/10 correctness bar. Merge criteria: transaction-safe automatic clearing of local intent, and one verified DM cutoff per earned dwell, with regression tests for both races.

Reviewed head ed7c046148269f5cbceb7a7e7c3d0991d4e1a466 against base a244e3cb3c3eaebac9d8daacdc9028b3eb35bab8. Existing CI, including Chromium/WebKit journeys and DCO, is green. Additional deterministic reproductions use the real read-state owners plus a mounted useReading hook: the changed code loses a newer cross-window manual mark and acknowledges post-dwell replies. Corresponding controls pass with the base version of unread.ts. These are service/hook tests with modeled geometry, not native/mobile or live-browser acceptance; broad CI was not rerun locally.

Comment thread src/features/relay/unread.ts
Comment thread src/features/relay/unread.ts Outdated
Larry added 3 commits October 5, 2026 19:49
Reading a DM now reads all of it: any earned dwell advances the DM's
channel frontier through the newest retained message, replies included,
and ends a manual unread on the DM. Reaching the live bottom of a channel
ends a manual unread on the channel. It does not move the channel
frontier, so mentions, replies and marked messages stay unread.

This matches the mobile app.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
After reload, webkit does not always restore the live bottom, so the
bottom catch-up never ran. Keep Channel settings open and scroll the
timeline to the bottom first.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Automatic reads checked manual-unread intent against this window's cached
journal, so an older dwell in one window could erase a newer Mark unread
saved by another window. The lease's validity now receives the journal
being replaced inside the storage transaction.

A dwell's catchUp and observe each took a fresh whole-DM cutoff, so a
message arriving between them was read without being seen. A lease now
takes one cutoff, witnessed by a verified message, and an empty observe
no longer reads the DM.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the larry/dm-open-and-bottom-unread branch from ed7c046 to 5c60392 Compare October 5, 2026 23:52

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No further changes requested: the transaction-current manual-intent fence and single witnessed DM cutoff address both findings in the previous review. I found no additional actionable regression in the fixes or public PR material.

Star Lord’s automated source review via Wes’s account; head 5c603922cdfd71889bec78654b1af6d5a9f5cb15, base 0bbf40aaaf0eb1fdb21a08c3500079922c812df8. Source-only: no tests or apps run; the CI required snapshot is successful (Windows skipped), while native/mobile and human acceptance remain unverified.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

No remaining blockers from my previous review. Both races are fixed, and I found no actionable regression in the fixes. The change now meets the 9/10 correctness/minimalness bar for this follow-up. This is a review comment, not an approval.

Reviewed head 5c603922cdfd71889bec78654b1af6d5a9f5cb15 against base 0bbf40aaaf0eb1fdb21a08c3500079922c812df8. Seven focused checks passed: the original three cross-window cases, mounted-reader late-arrival cases with fully visible and tall rows, pending-witness deletion, and the submitted mounted DM regression. These exercised unchanged production files with local reviewer probes and modeled geometry. An independent transaction/cancellation source review found no blockers. Existing CI is green, with Windows native validation skipped; broad suites were not duplicated locally. Native/mobile and human acceptance remain unverified.

@wesbillman
wesbillman merged commit d27bed1 into main Oct 6, 2026
22 checks passed
@wesbillman
wesbillman deleted the larry/dm-open-and-bottom-unread branch October 6, 2026 16:58
loganj pushed a commit that referenced this pull request Oct 6, 2026
Main now reads a whole DM on catch-up (#616), so a DM never gets an
activity: mark. Update the DM case and the coverage note to match.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
johnmatthewtennant pushed a commit that referenced this pull request Oct 6, 2026
* origin/main:
  fix(messages): show real upload progress for composer images (#662)
  chore: Use redirect_uri for oauth callback and enable Builderlab state param (#643)
  test(browser): measure the search palette after its entrance (#653)
  Cache coverage checks during read-state retention (#576)
  docs: define shared host boundaries and Canvas contract cases (#658)
  feat(plugins): allow bounded output for agent tool queries (#649)
  test(browser): measure GitHub panel actions after its enter motion (#625)
  Read whole DMs and end a channel's manual unread at the bottom (#616)
  docs: update Goose session viewer and add Pi session viewer (#651)
  Add Hermes Agent as a Tier 2 harness (#629)

Signed-off-by: Luna <0828be588d5c9c4d092c5b1cf01761d5aef63d6b104807fd8e8284d517dd1a99@buzz.block.builderlab.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants