Skip to content

feat(mobile): resize the tablet sidebar and expand a thread to the window - #9866

Open
FL-TechCouncil wants to merge 14 commits into
block:mainfrom
FL-TechCouncil:tablet-pane-sizing
Open

FL-TechCouncil wants to merge 14 commits into
block:mainfrom
FL-TechCouncil:tablet-pane-sizing

Conversation

@FL-TechCouncil

@FL-TechCouncil FL-TechCouncil commented Nov 22, 2026 •

Copy link
Copy Markdown

Stacked on #9568. Until #9568 merges, this diff also shows its commits. Only the last two commits, from feat(mobile): resize the tablet sidebar and expand a thread to the window on, belong to this PR.

What

Two ways to give a conversation or thread more room in the tablet layout (iPad, and an iPhone Duo lying open in landscape):

  • Narrower or wider sidebar: the edge between the docked sidebar and the conversation drags like the thread divider.
    • It goes down to 288 pt, which still fits Home's 256 pt Search / New / avatar bar inside its margins.
    • It widens to at most half the window, while the conversation keeps its minimum width (560 pt alone, 480 pt beside a thread or beside the Duo's strip).
    • Screen readers adjust it as a slider ("Sidebar width"). Each screen keeps its own dragged width while it is open, so Home's list doesn't resize Agents.
  • A thread on the whole window: a thread beside its conversation gets an Expand thread button in its header (native on iOS, in the strip on a Duo).
    • Expanded, the thread fills the window over the sidebar and the conversation, which leave input, focus and the screen-reader tree.
    • The same button (Show beside conversation) returns it beside them, and Control-Command-F toggles it from a keyboard. Back still closes the thread.
    • An expanded thread collapses once its layout is gone, for example a Duo held like a book.
    • Each newly opened thread starts beside its conversation.

How

  • ConversationThreadDivider gains label, minWidth and leading, so the sidebar edge reuses it with the pane anchored at the start.
  • AdaptiveConversationPane keeps the dragged sidebar width in its own state, clamps it, and caps the drag so the sidebar never undocks mid-drag. The sidebar handle's touch area sits mostly over the conversation's margin, so the list's trailing controls keep their taps.
  • ConversationPaneController.threadExpanded / setThreadExpanded, reset whenever a thread opens or closes or the selection changes. An expanded thread counts as covering, so the conversation and sidebar leave semantics, focus and input.
  • ConversationThreadExpansion (an inherited widget offered to the thread pane's pages) adds the toggle to FrostedAppBar's trailing actions on iOS and Material. It notifies headers only when the expanded state changes.
  • New Tabler icons: arrows-diagonal and arrows-diagonal-minimize-2.
  • ConversationPaneController and MediaQueryOverride move to their own files, re-exported from adaptive_conversation_pane.dart, to keep the pane under the file-size limit.

Testing

  • conversation_tablet_layout_test.dart:
    • The Duo landscape journey drags the sidebar edge to its minimum, adjusts it with the slider action and drags it to its maximum, keeping the draft. It then expands a thread, checking the window rect, the strip clearance and that the conversation and sidebar leave hit testing and semantics, and collapses it. Finally it closes and reopens the thread, which starts beside the conversation again.
    • The Duo journey also expands a thread, half opens the Duo like a book and lays it flat again (the thread is back beside the conversation), and remounts the screen to check a dragged width stays with its screen.
    • The iPad journey adds a 13-inch step, where the sidebar stays docked beside a thread and leaves semantics while the thread is expanded, Control-Command-F toggles the thread, and on iOS the toggle is a native header action.
    • I confirmed the journeys fail when the sidebar divider, its maximum, the expand state, the sidebar's covering under an expanded thread, the native action, the shortcut, the collapse or the per-screen width is removed.
  • dart format, flutter analyze, the full flutter test suite (5,927 tests) and the file-size check pass.
  • iPhone Duo simulator (iOS 27.2), #general, flat in landscape: dragged the sidebar to its minimum (Home's bar still fits), opened a thread beside the conversation, expanded it to the full display and collapsed it, then closed it. Nothing was sent.

Not tested: iPad on a simulator or device. Resizing the sidebar from a keyboard: like the thread divider, it is a pointer and screen-reader control.

Status

Ready, to merge after #9568. An agent review found six issues (a dragged width shared across screens, an untested native action, header rebuilds every frame, expansion outliving its layout, a handle over the list's controls, no keyboard path); all are fixed in the second commit. The author tested it on an iPhone Duo, including the book pose collapsing an expanded thread. To test, on an iPhone Duo lying flat in landscape or an iPad in landscape:

  1. Open a channel and drag the grabber on the sidebar's edge left, then right.
  2. Long-press a message and tap Reply to open its thread beside the conversation.
  3. Tap Expand thread in the thread's header (in the strip on a Duo), then tap it again.

Working means:

  • The sidebar narrows to where Home's bottom bar just fits, and widens only while the conversation keeps room.
  • Expanded, the thread fills the display; collapsed, it returns beside the conversation at its earlier width.
  • Drafts survive every step.

buzz-review-completed

🤖 Generated with Claude Code

FL-TechCouncil and others added 9 commits November 21, 2026 10:56
On tablets the conversation sidebar can now be hidden from the
conversation header (or Ctrl+Cmd+S). It hides itself when the
conversation would get too narrow, such as on an 11-inch iPad in
portrait, and the toggle then shows it over the conversation above a
scrim. Tapping the scrim, Escape, system Back or picking a chat closes
it.

Threads open in a pane beside the conversation when both fit, and the
sidebar steps aside to make room. Otherwise the thread covers the
conversation as before. Drafts survive switching between the two on
rotation. A draggable divider resizes the thread pane, and screen
readers adjust it as a slider.

Home's Search / New / avatar bar moves into the sidebar on tablets, so
it no longer overlaps the composer. Phones, Surface Duo and Settings
keep their current layouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
- Close the thread pane when a page is pushed above the selected
  conversation, and push threads opened from such pages instead of
  showing them in the pane.
- Return focus to the composer as soon as the sidebar overlay starts
  closing, instead of dropping it while the panes still excluded focus.
- Look the pane up without subscribing in openThreadPane, so rows and
  lists don't rebuild on every sidebar or thread change.
- Clear a pending overlay when the window turns compact.
- Keep the 280 pt minimum sidebar for Settings and Duo; only tablets
  use 288 pt.
- Don't repeat the sidebar shortcut while it is held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
The image and video viewers push a page onto the conversation navigator,
which closed the thread pane. They now use a route marked
KeepsConversationThread, so the thread stays open beside them.

Back now closes routes pushed above the conversation before the thread,
so it closes the viewer (or a sheet) first rather than the thread.

A second Back while the sidebar overlay slides away is spent on the
overlay instead of closing the conversation, and openThreadPane reads
the route through ModalRoute.settingsOf so callers don't rebuild on
route changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
_DetailRoutes now handles didReplace, so a route that arrives via
pushReplacement takes Back before the thread pane and closes the thread
like a push would.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
…cape

Lying flat in landscape, the iPhone Duo reports no hinge division, so its
list and conversation were a plain two-pane layout that the tablet
sidebar excluded only because of the side strip. The tablet layout now
resolves beside the strip, with the edge panes reaching under it and
content insets keeping their controls clear. The header toggle hides
and shows the list as on iPad, and a thread opens beside the
conversation. The list stays docked by default, as before, and a Duo
held like a book keeps its hinge-bound panes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
The Duo landscape journey now checks that only the pane reaching the
side strip keeps clear of it, and a table covers docking beside the
strip at both Duo inner widths, with and without a thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
… a thread

The thread pane's page routes block semantics for everything painted
before them in their container, which was the whole pane: with a
thread beside it, the conversation and the sidebar dropped out of the
screen-reader tree. The thread pane now has its own semantics
container, so the block stays inside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
Each pane's routes block screen readers only inside the pane's own
semantics container, so a sheet over the thread or the conversation
left the other panes reachable behind it. The pane now tracks pop-up
routes over the conversation and thread navigators, and while one is
open the other panes leave the semantics tree (the sidebar also leaves
input and focus).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
…ndow

- The docked sidebar's edge drags like the thread divider: down to
  288 pt (Home's bar inside its margins) and up to half the window,
  while the conversation keeps its minimum width. Screen readers adjust
  it as a slider. The width lasts for the app session.
- A thread beside its conversation gets an Expand thread button in its
  header (native on iOS, in the Duo strip on a Duo). Expanded, it fills
  the window over the list and conversation, which leave input, focus
  and the screen-reader tree; the same button returns it beside them.
  Each newly opened thread starts beside its conversation.
- The pane controller and MediaQueryOverride move to their own files,
  re-exported, to keep the pane under the file-size limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 55823dd54f104abca39bdfece49d1cb5e30ca628...0710d0bc3a9b7a849a4db58fd10896f9e9e93162.
A new review must complete for this exact range. When manual authorization
is required, a user with write access must comment exactly
@buzz-security-review 0710d0bc3a9b7a849a4db58fd10896f9e9e93162 to authorize a new review.
Any previous review applies only to its recorded range.

- Keep a dragged sidebar width per screen, so narrowing Home's list no
  longer resizes screens with their own sizing such as Agents.
- Notify thread headers only when the expanded state changes, instead
  of on every pane animation frame.
- Collapse an expanded thread once its layout is gone (a Duo held like
  a book, a compact window), so it doesn't come back expanded.
- Place the sidebar handle's touch area mostly over the conversation's
  margin, so taps on the list's trailing controls still reach them.
- Control-Command-F expands and collapses a thread from the keyboard.
- Cover the native iOS expand action, the shortcut, the collapse and the
  per-screen width in the journeys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
@FL-TechCouncil
FL-TechCouncil marked this pull request as ready for review November 22, 2026 11:45
@FL-TechCouncil
FL-TechCouncil requested a review from a team as a code owner November 22, 2026 11:45
FL-TechCouncil and others added 4 commits November 23, 2026 17:37
Resolve the conflict in adaptive_conversation_pane.dart by keeping the
thread-pane Navigator and adding main's diagnostic screen observer to it.
Move MediaQueryOverride into its own file to keep the pane under the
1200-line limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
…zing

Resolve the import conflict in adaptive_conversation_pane.dart, keeping
this branch's re-exports and main's diagnostic screen observer. Move
usesConversationPanes and bookDivisionOf into
conversation_pane_breakpoints.dart, re-exported from the pane, to keep
it under the 1200-line limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
Keep main's in-page reply (onReply) ahead of opening a thread, and open
threads through openThreadPane in main's new initial-route helper and
thread media reply. Keep the thread builder beside main's
requireFoldForSplit check in the pane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>
…zing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Albrecht <139878933+FL-TechCouncil@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant