Files
buzz/mobile/lib/features
Logan Johnson 6384c6cdfa feat(mobile): mark edited messages after the body (#8863)
## Summary

Mobile showed "(edited)" only in the author header. A grouped follow-up
message has no header, so an edited follow-up had no marker at all. This
ports the placement from desktop
https://github.com/block/buzz-app/pull/2020 to the channel and thread
message bodies:

- **After prose:** the marker joins the last line, for example `Hi how
are ya. (edited)`. This includes a final list item or quote, as on
desktop. It is drawn in the timestamp style, with the metadata colour on
received messages and the bubble ink on your own messages.
- **After a block that text cannot join:** the marker goes on its own
line inside the same text bubble. This applies to code, tables, rules,
display math, indented code, a heading, a last line that ends in a link,
and a bare list, quote or checkbox marker. A link renders as a widget
span, so a joined marker would be read before the link by screen
readers. Any body that contains ```` ``` ```` always uses its own line.
gpt_markdown's fence rules differ from CommonMark, so putting the marker
inside the Markdown could change how the code renders.
- **After trailing images:** the marker goes below the gallery, outside
the bubble.
- The marker is injected only at render time: a private-use slot
character that the renderer removes from authored content first. Copy
text, previews and notifications still use the original message content.

**Out of scope:** the mobile forum models (`ForumPost`, `ThreadReply`)
have no edited state and don't fold edits, so forum posts still show no
marker. Search and inbox previews also show no marker, which matches the
preview rules.

### Related issue

Desktop parity for https://github.com/block/buzz-app/pull/2020. I found
no existing mobile issue or PR for this.

### Testing

At `5276d968`:

- `just mobile-check`, `just file-size-check` and `just mobile-test` all
exit 0.
- `edited_marker_test.dart`: a table test of which endings join inline
and which take their own line, including `` ```npm install``` ``, `~~~`,
indented code, tables, rules, math and bare block markers.
- `message_content_bubble_cases.dart`: rendered widget checks. For each
risky ending, the edited render is the unedited render plus one
`(edited)` line inside the same text bubble. The tests also cover
colours, trailing media, an open `<u>` and authored slot characters.
With the guards removed, this test fails.
- `channel_detail_page_test.dart`, edit journey: an edited message and
an edited grouped follow-up are marked and an unedited message isn't.
Copy text copies `Edited text` without the marker. Opening the thread
marks the edited head and the edited reply. With the thread wiring
removed, this test fails.
- Contrast (from review): received 5.34:1 light and 8.61:1 dark;
own-bubble accents at least 4.60:1.
- Android emulator run (screenshots below): every edited case shows the
marker where the rules above say, in light and dark. Not done: iOS
simulator and VoiceOver.
- Found during the emulator run, not caused by this PR: an edit made to
a thread reply before the thread is opened is not loaded, so the reply
shows its original text and no marker. The thread query asks only for
content kinds, and the channel history did not supply the earlier edit.
An edit that arrives while the thread is open shows correctly
(screenshot).

**Android emulator** (debug build of `5276d968` on a local relay, seeded
with edited messages):

| Prose, grouped follow-up, own bubbles, list | Code block, table,
fenced inline text, trailing image |
| - | - |
|
![emu-1-prose](https://raw.githubusercontent.com/block/buzz/673534d3aab0a87148655e19142965dbfdb6e3ef/pr-8863--emu-1-prose.png)
|
![emu-2-blocks](https://raw.githubusercontent.com/block/buzz/673534d3aab0a87148655e19142965dbfdb6e3ef/pr-8863--emu-2-blocks.png)
|

| Dark | Dark, trailing image | Thread (edit arrived while open) |
| - | - | - |
|
![emu-3-dark](https://raw.githubusercontent.com/block/buzz/673534d3aab0a87148655e19142965dbfdb6e3ef/pr-8863--emu-3-dark.png)
|
![emu-5-dark-media](https://raw.githubusercontent.com/block/buzz/673534d3aab0a87148655e19142965dbfdb6e3ef/pr-8863--emu-5-dark-media.png)
|
![emu-4-thread](https://raw.githubusercontent.com/block/buzz/673534d3aab0a87148655e19142965dbfdb6e3ef/pr-8863--emu-4-thread.png)
|

**Widget renders** (throwaway test, not committed):

| Light | Dark |
| - | - |
|
![edited-light](https://raw.githubusercontent.com/block/buzz/6a790edaaaa80acff4ed4a358be92e5ca8f86e25/pr-8863--edited-light.png)
|
![edited-dark](https://raw.githubusercontent.com/block/buzz/6a790edaaaa80acff4ed4a358be92e5ca8f86e25/pr-8863--edited-dark.png)
|

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:02:54 -08:00
..