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

fix(mobile): read only shown events from filtered Activity rows - #9215

Merged
brow merged 4 commits into
mainfrom
activity-filtered-thread-read
Nov 9, 2026
Merged

brow merged 4 commits into
mainfrom
activity-filtered-thread-read

Conversation

@brow

@brow brow commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #9213 Activity filters UI, from its last Codex finding.

With Threads, Mentions or a People/Agents filter active, an Activity row holds only part of its conversation. Marking it read advanced the thread:<root> (or channel) marker through the row's latest event, which also read replies the filter hid. For example, reading a person's reply in People also read an older agent reply in the same thread.

Filtered rows now advance the synced thread or channel marker through every event that is read, stopping just before the first unread event the filter hides, and write local msg: marks only for shown events past that point. Once the hidden event is read too, the marker catches up and syncs both. This also fixes filtered DM rows from #9213, whose msg:-only reads never synced to other devices. Unfiltered rows are unchanged.

Testing

  • New widget test: "reading a thread row under People leaves hidden agent replies unread". It fails without the fix, and checks the synced marker stops short of a hidden unread reply, then advances fully once nothing hidden is unread.
  • flutter test test/features/activity/ (136 pass) and flutter analyze on the activity feature.

Before merge

  • Automated simulator run (iPhone 17 Pro sim, iOS 27, re-run on d17f79a; the catch-up change in 28b927e is covered by the widget test): with Agents selected, marked a channel mention row unread then read; it stays read under Anyone and after relaunch. Screenshots are in Buzz (internal data). The test account has no thread mixing agent and human replies, so the hidden-reply case is covered by the widget test.
  • Main vs PR simulator comparison of a filtered thread read with a hidden unread reply (iPhone 17 Pro sim, iOS 27; main at 65e8643, PR at b2414cf). Neither test account has a real thread with both a person and an agent mention, so this runs the Activity page on the simulator with seeded events through the widget-test harness (flutter run of the test). The thread has an older agent mention and a newer person mention, both unread. The steps: choose People, swipe the person row to read it, switch to Agents, then Anyone. Left is main, right is this PR.
    • After the read, the person row is read under People on both.

    • Under Agents, main shows the older agent reply as read (the thread marker moved to the person reply's timestamp). The PR keeps it unread (marker stops one second before the agent reply).

      cmp-4-agents-after

    • Under Anyone, the thread row is read on main and still unread on the PR, because its agent reply is unread.

      cmp-5-anyone-after

🤖 Generated with Claude Code

With Threads, Mentions or a People/Agents filter active, a row holds only
part of its conversation. Marking it read advanced the thread or channel
marker through its latest event, which also read the replies the filter
hid. Filtered rows now write msg: marks for just the events they show,
as filtered DM rows already did.

Follow-up to #9213 (review comment r4497322772).

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tom Brow <tomb@squareup.com>
@brow
brow marked this pull request as ready for review November 6, 2026 20:46
@brow
brow requested a review from a team as a code owner November 6, 2026 20:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-06T21:10:14.260563Z 28b927e Manual request
ℹ️ 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 6, 2026
@github-actions

github-actions Bot commented Nov 6, 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: 8cce12f591988f29cc2beab5ff0c89d51862f31b...b2414cf6d88ad2516809686e4c3ebe81c47e51f5
  • Model: gpt-6.1-sol

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


Review Summary

Overall Risk: MEDIUM

Filtered reads can advance synchronized read markers over unseen messages, suppressing unread state across devices.

Findings

[MEDIUM] Filtered reads advance past unread replies missing from Activity

  • Category: Reliability
  • Location: mobile/lib/features/activity/activity_page.dart:247 (source)
  • Description: The scan treats allItems as complete context history, but ActivityNotifier only fetches bounded, addressed events outside DMs. For example, a thread can contain a human mention at T, an unread unmentioned reply at T+10, and an agent mention at T+20. Under People, marking the human row read sets the thread marker to T+19 because the agent mention is the first hidden event in the feed. The unmentioned reply is absent from the scan and becomes read despite never being shown. Previously, this action advanced only to T.
  • Impact: Unread replies lose their unread indicators locally and on other devices receiving the synchronized marker. Read markers are monotonic, so the unintended advance cannot be undone.
  • Recommendation: Require complete context history before advancing a shared watermark across intervening events. Otherwise retain per-message marks, and do not advance to a hidden event's timestamp minus one without evidence that intervening messages are read.

Notes

  • No additional limitations were reported.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bee88f70a3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

msg: marks are local-only, so a filtered row marked read stayed unread on
other devices. Advance the synced thread or channel marker up to just
before the first unread event the filter hides, and fall back to local
msg: marks only for shown events past that point.

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tom Brow <tomb@squareup.com>
@brow

brow commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: d17f79acfb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Advance a filtered row's thread or channel marker through every event
that is now read, not just up to the row's own latest event, so replies
read under one filter sync once the hidden ones are read under another.

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tom Brow <tomb@squareup.com>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 6, 2026
@brow

brow commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28b927e93a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions github-actions Bot added codex-security-review-current The posted Codex security review matches its recorded range. and removed codex-security-review-current The posted Codex security review matches its recorded range. labels Nov 8, 2026

@tlongwell-block tlongwell-block 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.

🤖 Meli, Tyler’s AI agent, posting on his explicit behalf.

Approved as directed by Tyler.

Full mobile suite passed (4548 main, 67 skipped, 4 push, 27 crypto). The reviewer’s source assessment supports the hidden-unread cap and monotonic marker behavior. A main/PR simulator mark-read comparison remains incomplete.

Reviewed head: b2414cf6d88ad2516809686e4c3ebe81c47e51f5.

brow pushed a commit that referenced this pull request Nov 9, 2026
@brow

brow commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 @tlongwell-block The main vs PR simulator mark-read comparison is now in the description, under Before merge. In a thread with an older unread agent mention and a newer person mention, I read the person row under People. On main, the agent reply then shows as read under Agents. On this PR it stays unread, and the thread row stays unread under Anyone. No code changed, so your approval at b2414cf still applies.

@brow
brow merged commit f382855 into main Nov 9, 2026
53 checks passed
@brow
brow deleted the activity-filtered-thread-read branch November 9, 2026 14:59
bostonaholic added a commit that referenced this pull request Nov 9, 2026
…ction-p

* origin/main: (111 commits)
  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)
  fix(mobile): keep a sent thread reply above the composer (#9026)
  [buzz] Recover database pool capacity after stalled connections (#9267)
  feat: send a User-Agent on relay WebSocket upgrades (#9246)
  Record why relay connections close and quiet close warnings (#9245)
  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)
  ...

Signed-off-by: Matthew Boston <mboston@squareup.com>
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 — b2414cf6 Deployed Nov 8, 2026 by brow via Run Codex Security Review #13876
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.

5 participants