Files
pipelines/app/notes/chat-wide-list-detail.md
T

45 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Wide Chat keeps rail and list beside the open chat
User request: on desktop, tablets and the unfolded Fold, opening a chat must not
replace the whole screen; the destination bar/rail and the chat list stay visible.
## Behavior
- At least `kListDetailMinWidth` (600 logical px, `lib/shell/list_detail.dart`)
Chat shows `ListDetailPanes`: the list (36% of the body, 280–400 px) beside the
open chat, with the destination rail/sidebar still visible. Before a selection
the detail pane says "Select a chat to open it here."
- The open chat sits in a `DetailPane` (the former private detail-page frame in
`lib/shell/detail_page.dart`, now shared) with its own bar (title, model, info)
and **no Back**; the shell bar keeps the list's New chat/Refresh. Another row,
`/close`, a destination or a route change swaps or clears it.
- Narrower than 600 nothing changed: a chat is a pushed Navigator page with stock
Back (f22afabd / cf784245).
- Resizing across the threshold moves an open chat between the pane and a pushed
page (`DetailPageHost.sync` follows the width).
## Open decision
With a chat open in the wide layout no page is pushed, and the router still
excludes a selected chat from the root double-back (cf784245). Android system
Back there therefore exits the app in one press. Not changed here because the
user explicitly asked to remove chat Back interception; needs a decision.
## Evidence
- Tests: new `test/features/chat/chat_list_detail_test.dart` (1280 and 800 wide:
rail, list, swap, no Back, no pushed route; 390: pushed page). Updated the 900-px
deep-link test to two-pane expectations and pinned phone-path tests to 390 px.
`flutter analyze` clean; full suite **1,862 tests pass**.
- Browser: `tool/chat_list_detail_probe.mjs` on a loopback fixture,
captures in `build/chat-list-detail-1280/` and `build/chat-list-detail-800/`.
- Not deployed, no APK, no device verification.
## Follow-up: wide Back
User asked to fix the single-press exit. With a chat open beside the list the
router now applies the list root's double-back (`_chatBesideList`, read from the
window width in `AppRouterDelegate.build`); phones keep the pushed chat page and
stock Back with no root interception. No chat-specific Back callback was added.
Regression: `test/application/chat_wide_back_test.dart`; full suite 1,866 pass.