mirror of
https://github.com/block/buzz.git
synced 2026-11-15 22:02:04 +00:00
On iPhone, tapping back from a chat (or finishing a back swipe) cut straight to the chat list with no slide. This affects every chat opened in a compact conversation pane: Home channels and DMs, Solo chats, Search and Inbox. ### Cause Since the nested conversation navigator landed, popping a detail clears the pane's selection when the pop starts (Flutter reports the removed page right away, before the reverse transition). The pane then put the detail navigator offstage and stopped its tickers in that same frame, so the reverse slide ran invisibly and the list appeared at once. ### Fix The pane counts mounted detail routes. A popped route keeps its content mounted until its reverse transition ends, so the detail stays onstage and ticking until then. The selection still clears at the start of the pop, so nothing else about the pop changes (the list is uncovered and its toolbar returns as before). ### Regressions - Wide layouts (iPad, Duo) are unchanged: their detail was always onstage. - No extra rebuilds: the count drives only the detail's visibility and tickers, so opening or switching chats builds the chat screen as often as before (checked with a build-count test in compact and wide layouts). - Reopening a chat while the previous one slides away behaves as before: the new chat covers the list. ### Validation - Added steps to the existing iPhone back test: the chat is still on screen mid-pop after the back button and after a completed back swipe, then gone once settled; reopening mid-pop shows the reopened chat. The mid-pop step fails without the fix. - Full mobile suite, analyze and format. One unrelated media-placeholder test (`message_skeleton_geometry_test.dart`) failed once while two iOS builds loaded the machine, and passed on rerun. - Simulator run (iPhone 17 Pro, debug build, signed-in test community): Home list, open a Solo chat, back button, reopen, back swipe. Before on the left, after on the right. https://github.com/user-attachments/assets/a5b88c2b-dc86-4345-8a88-29142a0bf7dc buzz-review-completed --------- Signed-off-by: Tom Brow <tomb@squareup.com> Co-authored-by: Tom Brow <tomb@squareup.com> Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>