3.4 KiB
3.4 KiB
Chat tab re-tap opens the active chat
Change
lib/shell/adaptive_shell.dart: newonDestinationReselectedhook onAdaptiveShell. Every tab control calls_tapDestination: the phoneShellNavigationBar, the wideFloatingDestinationBarand theShellNavigationRail. A tap on the destination already shown goes to the hook (when given); any other tap selects as before.lib/application/pipelines_app.dart: the Chat re-tap decision (chatRouteForRetapwith the retained workspace route) lives in_reselectDestination, passed asonDestinationReselected. Other tabs keep_selectDestination's behaviour.- Tests:
test/shell/destination_reselect_test.dart(new, 3 cases) andtest/application/chat_registration_test.dart(new phone case plus the composer-focus case; both answer main'schat_open_workspacesync through the newanswerOpenWorkspacehelper).
Merge with main
- Main had moved: the phone bottom bar (
ShellNavigationBar, fromphone-bottom-tab-bar) replaced the floating bar on phones and called_selectdirectly, which conflicted with this branch's_tapDestination. - Resolved by taking main's
adaptive_shell.dartand re-applying the hook at the three tap sites. Against main the shell differs only by the hook. - Merge of
mainis staged but not committed (left for land to conclude).
Focused results (app/, memwatch)
- Run on the merged worktree, 13 files named in the stage's list:
destination_reselect_test,chat_registration_test,app_route_test,tab_location_navigation_test,pipelines_app_test,tab_history_back_test,floating_tab_bar_test,navigation_rail_test,chat_control_tab_test,terminal_chat_tab_test,chat_wide_back_test,chat_scroll_back_test-> 60 passed, 8 failed. - The 8 failures are the same 8 tests that fail on untouched
main(checked in a detached main worktree):tab_location_navigation_test(4) andchat_registration_test(4: "mobile Chats retap reopens the retained multi-pane workspace after tabs", "a folded workspace rejects paste while retained behind the list", "mobile Chats retap stays on list with no history or a removed chat", "Chats retap restores a boot deep link after folding and Back"). Cause on main: the chat-open flow now sendschat_open_workspacebeforechat_subscribe, and those tests do not answer it. Not changed here. - The new tests pass: "phone Chat re-tap from the list opens the active chat", "mobile Chats retap from the list focuses the reopened chat composer".
destination_reselect_testpasses (3 cases).tool/analyze.sh-> clean.dart formaton the four touched files -> clean after formatting the test file.
States covered by tests
- Phone: list (chat detail Back'd) -> re-tap Chat ->
/chat/awith the thread. - Phone: re-tap Chat from the list focuses the reopened chat's composer.
- No open chats / removed chat: stays on the list (existing case, pre-existing failure on main, see above).
- Shell: re-tap calls the hook and not selection; other tab selects; with no hook a re-tap is a plain selection.
Limitations
- Not browser- or device-verified (no capture here, per stage rules).
- On a phone the open chat page covers the tab bar, so the "already showing" re-tap is not reachable there; it is not tested.
- The rail and phone bottom bar are covered by the shared
_tapDestinationentry, but no test drives a rail or bottom-bar tap through the hook yet.