Repository navigation
fix(mobile): load earlier edits to thread replies when a thread opens - #8870
Merged
Merged
Conversation
A reply edited before its thread was opened showed its original text and no "(edited)" marker. The thread query asked only for message kinds, and the channel window carries edits, reactions and deletions only for top-level messages, so an earlier edit to a reply was in neither result. Edits that land while the thread is open already worked through the live channel socket. Ask the thread query for include_aux, as desktop does. The relay already returns the edits, reactions and deletions of the root and every reply on that route, after each page's rows. A page's rows are the leading run of events reply-marked into this thread, at most 200: the relay sends them before the aux, and reactions and NIP-09 deletions are never rows. Only rows feed the reply cache and the cursor, so a reply-marked huddle event still fills a page and a reply-marked reaction never enters the reply cache. The root's aux repeats on every page; a reply-marked edit there can look like a row after a short final page, so the scan also ends when the next cursor does not advance. Rows and aux are deduplicated separately. The thread-summary scan still asks for replies only and pages exactly as before. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
loganj
added a commit
that referenced
this pull request
Oct 31, 2026
brow
approved these changes
Nov 2, 2026
brow
marked this pull request as ready for review
November 2, 2026 18:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
loganj
added a commit
that referenced
this pull request
Nov 3, 2026
Main now shields backslash escapes before rendering (#8925), so a trailing `\]` reaches the marker rule as text, never as display math. Drop that own-line rule; an escaped bracket now takes the inline marker. The thread edit-reload test from #8870 now expects the marker joined to the reply text. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
loganj
added a commit
that referenced
this pull request
Nov 4, 2026
Main now shields backslash escapes before rendering (#8925), so a trailing `\]` reaches the marker rule as text, never as display math. Drop that own-line rule; an escaped bracket now takes the inline marker. The thread edit-reload test from #8870 now expects the marker joined to the reply text. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
loganj
added a commit
that referenced
this pull request
Nov 4, 2026
Main now shields backslash escapes before rendering (#8925), so a trailing `\]` reaches the marker rule as text, never as display math. Drop that own-line rule; an escaped bracket now takes the inline marker. The thread edit-reload test from #8870 now expects the marker joined to the reply text. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
2 tasks
loganj
added a commit
that referenced
this pull request
Nov 9, 2026
Main now shields backslash escapes before rendering (#8925), so a trailing `\]` reaches the marker rule as text, never as display math. Drop that own-line rule; an escaped bracket now takes the inline marker. The thread edit-reload test from #8870 now expects the marker joined to the reply text. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
loganj
added a commit
that referenced
this pull request
Nov 10, 2026
Main now shields backslash escapes before rendering (#8925), so a trailing `\]` reaches the marker rule as text, never as display math. Drop that own-line rule; an escaped bracket now takes the inline marker. The thread edit-reload test from #8870 now expects the marker joined to the reply text. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Logan Johnson <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the mobile thread view, if a reply was edited before you opened the thread, the reply showed its original text and no "(edited)" marker. An edit that arrived while the thread was open worked.
The thread
/queryasked only for message kinds. The channel window carries edits, reactions and deletions (aux events) only for top-level messages, so an earlier edit to a reply was in neither result. The thread query now sendsinclude_aux: true, as desktop does (buzz-appsrc/features/relay/threads.ts). The relay already supports this on thedepth_limitthread route: it returns the aux events for the root and every reply, plus deletions of those (crates/buzz-relay/src/api/bridge.rs,bridge_thread_aux). A relay that ignores the flag gives the same result as before.The relay sends a page's rows (at most 200 reply-marked events, of any kind) before that page's aux events. It also repeats the root's aux on every page. So
fetchCompleteThreadtreats the leading run of events reply-marked into this thread, other than reactions and NIP-09 deletions, as the page's rows. Only rows count toward a page, move the cursor and feed the reply cache. A reply-marked huddle event still fills a page, and a reply-marked reaction never becomes a reply. A reply-marked edit of the root in the repeated aux can follow a short final page's rows and look like a full page, so the scan also stops when the next cursor does not advance. The thread-summary scan (fetchCompleteThreadReplies) still asks for replies only and pages exactly as onmain.Related issue
Found during the emulator testing of #8863.
Testing
just mobile-check,just file-size-checkandjust mobile-testpass.thread_replies_provider_test.dartadds two tests. The first checks that the query sendsinclude_auxand that an edit made before the thread opens folds into its reply. The second covers pagination: a reply-marked huddle row filling a page, a reply-marked edit that is a row on one page and aux on the others, a reply-marked reaction that stays aux, 200 reply-marked reactions after 199 replies (one query), 200 reply-marked root edits after a short final page (the progress guard ends the scan), an edit reply-marked into another thread that stays aux, and that the summary scan doesn't sendinclude_aux. It fails if any of these is removed: the reaction/deletion exclusion, the root check, the 200 cap, the progress guard, or the separate row and aux id sets.channel_detail_page_test.dartadds a journey: it opensThreadDetailPagewith the real thread query and a fake relay session that sends the reply's earlier edit only wheninclude_auxis set. It checks the edited text, that the original text is gone, and the marker. It fails when the flag is removed or when the provider drops aux.Before, the thread shows the original reply text with no marker. After, it shows the edited text and "(edited)". A live edit still lands.
🤖 Generated with Claude Code