Files
buzz/mobile/test/features
Wes 36ca4f493e fix(mobile): reply to a thread's head in its open page (#9889)
## Summary

On a mobile thread page, replying to the head message pushed another
copy of the same thread. A person who stays in one thread and keeps
replying to its head ends up with a stack of identical pages, and has to
tap Back through each copy.

Replying to the head from any entry point now focuses the composer of
the page that is already open. The entry points are swipe, long-press →
Reply, the inline media reply, and Reply in the image and video viewers.
If the page has no composer, as in an archived thread or for a
non-member, the head offers no Reply. Before this change, the head
pushed a copy of the page that had no composer either. Replies below the
head still open their own branch.

This is the head-Reply half of #9469, rebuilt on current main. The other
half, which handled a notification or link for the thread already in
front, is left out on purpose. It carried every open review finding on
#9469. iOS also shows no foreground banners (mobile has no `willPresent`
handler), so that path needs a tap from Notification Center while the
thread is on screen.

### Related issue

Part of #8641. The notification/link path stays open there. Supersedes
#9469.

### Testing

- The existing swipe journey now asserts that swiping the head and
long-press → Reply both keep one page and focus the composer.
- A new journey opens the head's photo, taps Reply in the viewer, and
asserts that the viewer closes onto the same page with the composer
focused. Reverting only the media path makes it fail.
- Full mobile suite at `233bf230b`, before the viewer journey was added:
5994 passed, 71 skipped. At `ba3ae9a70`, the new journey passes and the
pre-push `mobile-checks` hook passed.

### Recording

iPhone 18 Pro simulator, iOS 27.0, with fictional data. These clips run
the real channel and thread pages inside the widget-test harness, so the
composer focuses but no software keyboard appears. Each one swipes the
thread's top message to reply and then goes Back.

**Before (main):** the swipe pushes a second copy of the thread, and
Back lands in the same thread.


https://github.com/user-attachments/assets/9b226ede-6988-42cf-a17c-eedcbb3edecb

**After (#9889):** the swipe focuses the open thread's composer, and
Back returns to the channel.


https://github.com/user-attachments/assets/c1c6600d-e3ca-4e86-895e-365b4c430ab9

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

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 10:00:18 -07:00
..