Skip to content

fix(mobile): pane channel actions and keyboard rebuilds for #8568 - #9395

Merged
klopez4212 merged 4 commits into
kennylopez-iphone-duo-devicehubfrom
fix-8568-pane-navigation
Nov 12, 2026
Merged

klopez4212 merged 4 commits into
kennylopez-iphone-duo-devicehubfrom
fix-8568-pane-navigation

Conversation

@brow

@brow brow commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Targets kennylopez-iphone-duo-devicehub (#8568 iPhone Duo layouts), not main. Please merge it into that branch. It needs no approval there.

Our review of #8568 found three problems. This PR has the three fixes. Each fix is small and stays inside the code that #8568 adds or uses.

1. A channel action from channel details empties the screen

With #8568, a conversation opens in the conversation pane. The pane has its own navigator, on all phones, on the Duo and on tablets. Channel details now open in that navigator. But when Leave, Archive, Unarchive or Delete completes, _confirmAndRun closes the top page of the root navigator. That page is now Home, so the user sees an empty screen.

The fix: before the dialog opens, keep the navigator and the route of the channel details page. After the action completes, close that route only if it is still the current route. The action waits for the signed event and then for a channel refresh, so the user can go to a different page during that time. The check makes sure that we do not close that other page.

The same commit adds reopen: true when Activity opens a thread draft. Without it, in a split layout, a second tap on the same thread draft does nothing, because the pane ignores a selection that it already has. The Activity item opener already sets reopen: true.

2. Each keyboard frame rebuilds Home, the channel list and the conversation

Before #8568, a conversation was a root route above Home. CoveredRouteKeyboardInsets kept old keyboard insets for the covered Home route, so keyboard motion did not rebuild it. With #8568, Home stays the current root route, so that hold never starts. Also, Home and the pane read MediaQuery.of above the list and above the pane's navigator. Thus each keyboard animation frame rebuilds Home, the list and every detail route (20 of 20 frames on an ordinary phone; 0 of 20 before #8568).

The fix:

  • CoveredRouteKeyboardInsets gets an optional isCovered. The compact list uses it to say "the detail covers me", because its route stays current. The list also gets its own FocusScope, so focus in a closing detail does not count as focus in the list. With this, the list keeps the existing behavior: it holds its insets until the keyboard goes down, and it holds padding too.
  • Home and the pane make their MediaQuery changes in a small leaf widget (MediaQueryOverride), so the parent build does not depend on the keyboard insets.

3. A Home Screen shortcut does nothing over a Search or Activity conversation

On an ordinary iPhone, a conversation that opens from Search or Activity is in the pane's nested navigator. While a conversation is selected, the pane's PopScope makes the Search or Activity route report doNotPop. The Home Screen shortcut host (New chat, New DM, Bestie) goes back to Home with popUntil, which stops at a doNotPop route. Thus Home does not become the current route and the shortcut tap is dropped. Before #8568, that conversation was a root route, so the shortcut went back to Home and ran.

The fix: only in the compact layout with a selected conversation, the pane records its nested navigator for its route. The shortcut host closes the pages in that navigator. It stops at a page that refuses to close, as before. If all pages close, the host also closes the Search or Activity route and runs the shortcut. The wide and Duo layouts and both Back handlers do not change.

Not covered here: a Bestie shortcut when that Bestie is already selected, and the Settings and Agents panes, which exist only in the new wide and Duo layouts.

Pareto

What gets better: a channel action no longer empties the screen, a thread draft opens again in a split layout, keyboard motion in a conversation no longer rebuilds Home, the list and the detail routes, and Home Screen shortcuts work again over a Search or Activity conversation. Nothing gets worse: the action closes the same page that it closed before #8568, a page that refuses to close still stops a shortcut, and the list's keyboard behavior is the one that CoveredRouteKeyboardInsets already gives covered routes. No visible change outside these fixes, so no screenshots.

Validation

  • Added tests:
    • Leave from channel details in the conversation pane, on Android and iOS at 402×874: the list stays, and the root route is not closed.
    • Activity opens the same thread draft two times after Back, at 1100×800.
    • Over 20 keyboard frames at 402×874: zero rebuilds of the covered list, the channel, a thread above the channel, the covered channel, and Home.
    • A detail with a focused text field closes while the keyboard is up: the list keeps its held insets while the keyboard goes down.
    • The Home Screen shortcut journey at 402×874 on iOS: from a channel opened through Search, each shortcut (New chat, New DM, Bestie) returns to Home and runs. A profile editor that refuses to close, under another nested page, still stops the shortcut, and the shortcut runs after the user leaves the editor.
  • Each added test fails when this PR's production changes are removed and passes with them.
  • Full mobile suite: 4,767 Flutter tests passed (74 skipped), plus the unconfigured-push and secp256k1 suites. flutter analyze is clean.
  • Local pre-push checks were skipped: the stale-branch gate compares with main, but this PR targets the Adapt iPhone Duo layouts, rail navigation, and native sheets #8568 branch. The full suite above ran on this exact head.
  • No simulator or device run: the fixes change navigation targets and rebuild scope, which the widget journeys above cover.

Review discussion: buzz://message?channel=95213a25-483a-458b-9bc3-71891fa5aef6&id=56ce218299dab717220b492c460a5b331ad0c394e5e96ffe857bbfe7005edc98

🤖 Generated with Claude Code

square-tomb and others added 2 commits November 12, 2026 07:24
Channel details now open in the conversation pane's navigator, so
popping the root navigator after Leave, Archive, Unarchive or Delete
removed Home. Pop the navigator that owns the details route, and only
while that route is still current. Also reopen an Activity thread draft
that is already selected in a split layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
A conversation in the pane leaves Home as the current route, so
CoveredRouteKeyboardInsets never held the covered list, and Home and
the pane read MediaQuery.of above the list and the nested navigator.
Hold the covered list's insets with an explicit isCovered (in its own
FocusScope), and derive the MediaQuery overrides in a leaf widget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
@brow

brow commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 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-12T16:59:03.907839Z f4c92bd Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 41aed24a4d

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

square-tomb and others added 2 commits November 12, 2026 07:49
Signed-off-by: Tom Brow <[email protected]>

# Conflicts:
#	mobile/lib/features/home/home_page.dart
On an ordinary iPhone, a conversation opened from Search or Activity
sits in the pane's nested navigator, and the pane's PopScope makes the
destination route report doNotPop, so the shortcut host's popUntil
stopped there and dropped the tap. Let the shortcut unwind that nested
navigator and pop the destination, unless a page inside it refuses to
close.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
@brow
brow marked this pull request as ready for review November 12, 2026 16:56
@brow
brow requested a review from a team as a code owner November 12, 2026 16:57
@klopez4212
klopez4212 merged commit 1c5de88 into kennylopez-iphone-duo-devicehub Nov 12, 2026
45 checks passed
@klopez4212
klopez4212 deleted the fix-8568-pane-navigation branch November 12, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants