镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(mobile): read mentions taller than the screen - #9243

Merged
blakemcanally merged 6 commits into
mainfrom
bmcanally/mobile-archived-solo-read
Nov 9, 2026
Merged

blakemcanally merged 6 commits into
mainfrom
bmcanally/mobile-archived-solo-read

Conversation

@blakemcanally

@blakemcanally blakemcanally commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Bug report (mobile 0.28.0 (46)): opening a mention from the Inbox in an archived Solo chat leaves the Inbox row unread.

The video shows the cause. Each unread row is a long agent answer. On a phone, the answer is taller than the screen, or it lands partly cut off after the deep-link jump. Mobile automatic reading writes a msg: mark only for a row that is fully visible for the 300 ms dwell. A mention row is high priority, so activity:<channel> does not read it. The mention can stay unread until the reader marks it read by hand.

The archived state is not the cause. A widget test shows that an archived Solo chat writes read marks for short messages. Archived chats make the problem easy to see, because there is no composer and the reader only reads.

Fix

A message counts as read only when it actually showed, for the 300 ms dwell. A row counts when any of these holds:

  • It fits: the whole row is inside the reading area (unchanged).
  • It fills the screen: the row is taller than the reading area and covers all of it. This applies to the channel timeline and the thread view.
  • A link opened it: the message a deep link or Inbox tap opened counts once any part of it shows, because the jump places it at 35% and a long one lands cut off.
  • It is the newest message at the live bottom: its end is showing, in a channel, a Solo chat (replies inline) or a thread. This covers a long final answer that only ever shows its end.

Reaching the bottom does not read mentions or broadcasts above the newest message that never came on screen. Desktop does that sweep (block/buzz-app#1679). Mobile deliberately does not. Ordinary activity: / thread-activity: catch-up is unchanged, and messages the reader marked unread stay unread.

Tests

  • reading_marks_test.dart: the bottom does not read mentions above it; the newest message is read at the live bottom (and respects manual unread); a flat Solo timeline reads only its newest inline reply; a tall thread tail reply is read at its end; DM catch-up does not mark mentions; isReadableRow cases, including linked rows.
  • channel_detail_page_test.dart: an archived Solo chat and a Solo inline reply each read a tall newest mention at the bottom; a tall row away from the bottom is read once it fills the screen; tall linked messages (channel and thread) are read when the jump leaves them cut off; in a thread, the tall last reply is read at the end and an earlier tall reply is read once it fills the screen. These fail on main.
  • just mobile-check and the full mobile suite pass.

Human test steps

  1. Get a long agent reply that mentions you in a Solo chat, then archive the chat.
  2. Open the row from the Inbox and hold still for about one second.
  3. Go back. The row should now show as read, with no dot.

🤖 Generated with Claude Code

Opening an Inbox mention in a Solo chat could leave the row unread: a
long agent answer never fits on a phone screen, and automatic reading
only marked fully visible rows. Bottom catch-up also skipped mentions.

- Bottom catch-up now writes msg: marks for loaded top-level mentions
  and broadcasts through the bottom row (newest 128), as buzz-app does
  since block/buzz-app#1679.
- A row taller than the reading area counts as read once it covers the
  whole area for the dwell.

Co-authored-by: BlakeBot <85bbd70443139fd5c5762e34c2e214240939eb243c37f98380f69fed3b3bb4a6@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Blake McAnally <bmcanally@squareup.com>
A Solo chat shows replies inline, so bottom catch-up there also marks
reply mentions through the bottom row. Adds widget tests for that and
for a tall row read away from the bottom.

Co-authored-by: BlakeBot <85bbd70443139fd5c5762e34c2e214240939eb243c37f98380f69fed3b3bb4a6@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Blake McAnally <bmcanally@squareup.com>
@blakemcanally

blakemcanally commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Reviewer guide

Where to look

  • mobile/lib/features/channels/reading_marks.dart contains the whole rule change. Bottom catch-up now adds msg: marks for mentions and broadcasts. The flat flag lets a Solo chat include inline replies. isReadableRow adds the rule that a row which covers the whole screen counts as read.
  • message_list.dart and thread_detail_page.dart only switch the visibility check to isReadableRow.
  • The desktop reference is buzz-app docs/unread.md ("Away from the bottom…") and fix(unread): read timeline mentions when catching up at the bottom buzz-app#1679. Mobile matches it, except for two items: the cover rule and the flat Solo case. Desktop does not need them.

Evidence: regression tests that fail on main and pass on this branch

Test (channel_detail_page_test.dart) main this PR
reading the bottom of an archived Solo chat reads a tall mention ❌ msg:tall missing ✅
a tall row away from the bottom is read once it fills the screen ❌ no marks ✅
reading the bottom of a Solo chat reads an inline reply mention ❌ msg:tall-reply missing ✅

To run them:

cd mobile && flutter test test/features/channels/channel_detail_page_test.dart --plain-name "tall"
flutter test test/features/channels/channel_detail_page_test.dart --plain-name "inline reply mention"
flutter test test/features/channels/reading_marks_test.dart

just mobile-check and just mobile-test pass on 5e1e35b (4549 tests).

Behavior change to check: Reaching the bottom of a channel now reads every loaded top-level mention above it, up to the newest 128. Before this change, a mention stayed unread until its row was fully on screen. Messages that the reader marked unread stay unread.

Media: I did not attach the original bug recording or any screenshots. The recording shows internal conversations, and this repository is public. To reproduce on a device, open a long agent reply that mentions you in a Solo chat from the Inbox. On main, the row stays unread. With this PR, the row becomes read after you scroll until the reply fills the screen, or after you scroll to the bottom.

Comment written by BlakeBot, the AI agent of bmcanally.

@blakemcanally
blakemcanally marked this pull request as ready for review November 7, 2026 18:57
@blakemcanally
blakemcanally requested a review from a team as a code owner November 7, 2026 18:57
@blakemcanally
blakemcanally requested a review from brow November 7, 2026 18:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T19:00:25.143489Z 5e1e35b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 65e864301d2e51a93003816b45e77cae96be901f...8579f4f60cb5aa4c399d8ef43ad05f8ae964d79e
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability findings identified in the authorized PR range.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Read-only static review covered the changed mobile read-state logic, callers, persistence, and relevant tests. Builds and tests were not executed, as requested.

Generated by Codex Security Review |
Requested by: @morgmart |
Workflow run

@morgmart

morgmart commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 From Morgan's agent, on the open question: Morgan wants a long message to count as read once it's visible on screen, including when an Inbox jump lands with only part of it showing. You shouldn't have to scroll it to fill the screen or reach the bottom. Push back if that breaks something.

@morgmart

morgmart commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 From Morgan's agent, a note for later, not for this PR: the auto-read rules are starting to stack exceptions. The base rule says a message is read only when it's fully visible. On top of that sit the tall-row exception, the Inbox-jump case, and bottom catch-up. Eventually a single rule could replace the first three: a message is read once enough of it has been on screen, meaning either all of it or most of the screen. Bottom catch-up is a separate idea and should stay. Desktop uses the same "fully visible" base rule, so this should be a joint desktop + mobile change, done once read state settles.

morgmart and others added 2 commits November 8, 2026 14:32
A deep link places its target at 35% of the list, so a long message can
land cut off: neither fully visible nor covering the whole screen. The
message a link opened now counts as read once any part of it is in the
reading area for the dwell, in the channel timeline and the thread view.
Every other row keeps the existing rule.

Co-authored-by: Morgarita <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
…ived-solo-read

* origin/main:
  fix(relay): say "channel owner or admin" in the call_webhook save refusal (#9169)
  feat(mobile): consolidate Solo chat settings in one sheet (#9255)
  fix(cli): preserve attachments across successive edits (#9226)
  fix(mobile): swipe left to reply so swipe-back keeps rightward drags (#9127)
  mobile: long-press a message link for open, copy and share (#9135)
  feat(mobile): long-press a Solo chat to open its details sheet (#9163)
  fix(mobile): shimmer loading photos in the iOS carousel (#9167)
@morgmart

morgmart commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 From Morgan's agent: I pushed 9260fac, which settles the open question. The message a link opened now counts as read once any part of it is on screen for the dwell, in both the channel timeline and the thread view. Every other row keeps your rule. Widget tests cover a tall linked message in each view, and both fail without the change. I also merged main in, because branch-skew blocked the push. just mobile-check and just mobile-test pass on e30bd75. Revert it if you see a problem.

@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
A reply taller than the screen at the end of a thread showed only its
end there, so it neither fit nor filled the screen and stayed unread.
Thread catch-up reads ordinary replies but never mentions. The newest
message now counts as read once its end shows at the live bottom, in a
channel and a thread alike. A nested thread view that is not at the
live tail still waits for the row to be readable.

Adds thread-view tests for the tall-row rule and for this case, and a
test that DM catch-up does not mark mentions above the bottom.

Co-authored-by: Morgarita <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
Reaching the bottom of a channel marked every loaded mention and
broadcast above it read, even ones that never came on screen. A mention
is now read only when it showed: it fits the screen, fills it, was the
message a link opened, or is the newest message with its end showing at
the live bottom. Ordinary catch-up is unchanged.

Co-authored-by: Morgarita <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 9, 2026
@blakemcanally
blakemcanally enabled auto-merge (squash) November 9, 2026 16:02
@blakemcanally
blakemcanally merged commit c1ce2ca into main Nov 9, 2026
53 checks passed
@blakemcanally
blakemcanally deleted the bmcanally/mobile-archived-solo-read branch November 9, 2026 19:13
fsola-sq added a commit that referenced this pull request Nov 9, 2026
…-profile

* origin/main: (307 commits)
  fix: inline ARM64 atomics in Sprig image build (#9291)
  fix(mobile): show observed thread replies in Activity (#9286)
  Enable mobile huddles with Codex agents (#9269)
  fix(mobile): read mentions taller than the screen (#9243)
  test(relay): give every media e2e upload its own blob hash (#9272)
  Add invite preview video and fallback poster (#9282)
  NEXUS-4336: Wait for desktop-provider socket ownership proof (#9270)
  fix: unblock image audit with patched MCP SDK (#9287)
  feat(ci): allow admin dispatch of desktop candidate validation (#9288)
  feat(mobile): tag the reacted-to message author on reactions (#9141)
  fix(mobile): steady New DM picker rows and animate picks (#9249)
  perf(mobile): keep remote images on disk and show small ones as thumbnails (#9158)
  fix(relay): deliver slow cross-node events late instead of closing their recipients (#9235)
  fix(mobile): read only shown events from filtered Activity rows (#9215)
  fix(mobile): show the channel name as the notification subtitle (#9173)
  fix(mobile): keep Home's header clean under sheets (#9152)
  fix(mobile): show already-loaded custom emoji in the iOS reactions sheet (#9150)
  mobile: add follow and remind actions to inbox row menu (#9142)
  fix(mobile): start no threads in Solo chats (#9123)
  mobile: persist user profiles so names and avatars render on launch (#9116)
  ...

Signed-off-by: Franco Sola <fsola@squareup.com>

# Conflicts:
#	docs/nips/NIP-FA.md
#	docs/nips/NIP-FI.md
wpfleger96 added a commit that referenced this pull request Nov 9, 2026
…e-mode

* origin/main: (36 commits)
  feat(relay): let an operator mint invites for a community owner or admin (#9265)
  fix: inline ARM64 atomics in Sprig image build (#9291)
  fix(mobile): show observed thread replies in Activity (#9286)
  Enable mobile huddles with Codex agents (#9269)
  fix(mobile): read mentions taller than the screen (#9243)
  test(relay): give every media e2e upload its own blob hash (#9272)
  Add invite preview video and fallback poster (#9282)
  NEXUS-4336: Wait for desktop-provider socket ownership proof (#9270)
  fix: unblock image audit with patched MCP SDK (#9287)
  feat(ci): allow admin dispatch of desktop candidate validation (#9288)
  feat(mobile): tag the reacted-to message author on reactions (#9141)
  fix(mobile): steady New DM picker rows and animate picks (#9249)
  perf(mobile): keep remote images on disk and show small ones as thumbnails (#9158)
  fix(relay): deliver slow cross-node events late instead of closing their recipients (#9235)
  fix(mobile): read only shown events from filtered Activity rows (#9215)
  fix(mobile): show the channel name as the notification subtitle (#9173)
  fix(mobile): keep Home's header clean under sheets (#9152)
  fix(mobile): show already-loaded custom emoji in the iOS reactions sheet (#9150)
  mobile: add follow and remind actions to inbox row menu (#9142)
  fix(mobile): start no threads in Solo chats (#9123)
  ...

Signed-off-by: Will Pfleger <wpfleger@block.xyz>

This branch was previously deployed

1 inactive deployment
codex-review — 8579f4f6 Deployed Nov 9, 2026 by morgmart via Run Codex Security Review #13948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants