Merge commit 'bc376c3fffd975af275f051d362e56e33d5a8a3d' into pipelines/run-20261112-1022-remove-white-strip-and-empty-header-circ-e0fb

This commit is contained in:
2026-11-12 10:47:01 +00:00
17 changed files with 635 additions and 121 deletions
@@ -0,0 +1,67 @@
# Phone chat list: terminal button over the Chats header
## Defect
At 430px the floating terminal shortcut (`TerminalShortcutBubble`, end 12,
top = safe top + 64) sat on the chat list's `Chats` section header at
[370,64,48,48]. It hid the header's count and collapse chevron and left a
stray glyph beside it. Evidence: `/tmp/ui-review/base-light-430x900/07-chat.png`,
`/tmp/ui-review/chatmenus-light-430x900/01-chatlist-more.png`.
Run 393 had removed a duplicate terminal icon from the narrow list bar, so the
list had only the floating bubble.
## Change
- `lib/features/chat/ui/sessions/chat_sessions_screen.dart`: `_actions(context)`
now appends `terminalChatBarAction(context)` after New chat and Refresh. It is
null on wide layouts (the shell bar keeps Terminal there) and with no
terminal surface, so it appears only on a narrow layout with a surface.
- `lib/application/pipelines_app.dart`: the floating bubble's `onChat` is now
`false` on every route. On a narrow layout every Chat-tab bar carries Terminal
itself (the list's top bar, and an open chat's bar via
`chat_thread_view.dart`'s `terminalChatBarAction`), so the bubble has no
remaining place. The earlier rule (`kind == chat && chatSessionId != null`)
still showed it on an open chat, duplicating that chat's Terminal entry.
- `lib/application/app_terminals.dart`: doc comment for `surround(onChat:)`
now says pages whose own bar carries Terminal pass false. No behaviour change.
Result on a phone: exactly one terminal entry on the chat list (top bar) and on
an open chat (its bar), and no floating control over any header.
## Focused tests (memwatch, from app/)
- `test/application/phone_chat_terminal_entries_test.dart`: new, 2 tests at
430x900 through the app shell. `/chat` and `/chat/abc123` each have no
`TerminalShortcutBubble` and exactly one Terminal `ChatBarAction`.
Against the previous `onChat` rule the open-chat test FAILS (the bubble is
shown), so it guards the reviewer's finding. Restored after that check.
- `test/features/chat/ui/sessions/chat_list_terminal_action_test.dart`: 4 tests.
Narrow top bar carries Terminal beside New chat and Refresh, and tapping it
toggles. The Chats heading sits below the bar. Wide has no list terminal.
No terminal surface has no list terminal.
- Users of the changed wiring, all in the same run:
- `test/application/pipelines_app_test.dart`
- `test/features/terminal/terminal_surface_test.dart`
- `test/features/chat/ui/sessions/chat_sessions_floating_bar_test.dart`
- `test/features/chat/ui/sessions/chat_sessions_screen_test.dart`
Combined run of these six plus the list test: PASS 28/28 (`memwatch: PASS`,
exit 0), run after the final edit.
- Not re-run in this pass: `test/features/chat/shell/chat_shell_terminal_test.dart`
and `chat_shell_terminal_session_test.dart` (listed as users in an earlier
pass). The `onChat` change does not touch the shell's wide path.
- `tool/analyze.sh`: clean (0 errors, 0 warnings, 0 infos) after the final edit.
## Not verified here
- No rendered capture. The before/after screenshots at 430x900 are for ui-review.
- The open-chat test checks the Terminal action by label, not by semantics
identifier. In the open chat's bar the identifier lookup found nothing even
though the action is present, so this is a limit of the probe, not evidence
of a missing entry. A capture is needed to confirm what is drawn.
## Open limitations
- `TerminalShortcutBubble` is now never shown by the app shell (`onChat` is
always false). It and `TerminalSurface`'s shortcut code remain, with their
own tests. Removing them is a follow-up if the owner agrees.
- A narrow Chat-tab route with no chat bar would now have no terminal entry at
all. None was found in the code, but this was not exhaustively checked.
- The bubble's old top edge on an open chat was not checked against that chat's
bar; with the bubble gone that check is moot.
+72
View File
@@ -0,0 +1,72 @@
# Settings destination: Back only when pushed; one Settings entry per screen
Run 20261112-1022 (stage 01-implement). Not committed.
## Rule
- Settings opened from a shell control (rail item, phone bar item) is a
destination: no Back arrow. The Pipelines item leaves it for the Pipelines body.
- Settings opened any other way (a first load / deep link to `/settings`, a route
change that is not a shell control, the Pipelines gear) is a pushed page: Back
returns to Pipelines.
- The Pipelines bar's gear is kept only where the floating tab bar is the shell's
sole navigation (window width at least 600 and below the rail's 697; see
`showsFloatingTabBarOnly`). There the floating bar lists tabs only, so the gear
is the one Settings entry. The phone bar and the rail both offer Settings, so the
gear is gone there.
## Changed paths (app/)
- `lib/shell/adaptive_shell.dart`: `_navigatingTo` / `_settingsPushed`; `_noteShown`
is called on a shown-destination change; Back is built only when Settings is
pushed.
- `lib/shell/navigation_rail.dart`: `showsFloatingTabBarOnly(context)`.
- `lib/shell/destination.dart`: doc comment only.
- `lib/features/pipelines/screen.dart`: the bar's gear is shown only when
`showsFloatingTabBarOnly`; the rail check is gone. The non-shell paths keep the gear.
- `lib/application/pipelines_app.dart`: `_selectDestination` leaves Settings for the
Pipelines body (`_bodyRoutes`) instead of re-selecting the Settings route filed
under the Pipelines tab (the nav-only Settings has no Back, so without this the
Pipelines item would trap the user on Settings).
- Tests, new: `test/shell/settings_back_test.dart` (nav selection has no Back; route
push has Back and returns; first load has Back; nav after pushed clears Back);
`test/features/pipelines/pipelines_settings_gear_test.dart` (phone and rail: no
gear; floating band: gear present and its handler opens Settings).
- Tests, changed: `test/application/settings_page_test.dart`,
`test/application/tab_location_navigation_test.dart`,
`test/application/settings_registration_test.dart`,
`test/shell/navigation_rail_test.dart`. They now tap the nav item instead of the gear
and expect no Back on nav-opened Settings.
## Focused results (memwatch, from app/)
- New shell + gear tests and shell/rail/bar files: 54 passed, 0 failed.
(`settings_back_test`, `pipelines_settings_gear_test`, `navigation_rail_test`,
`shell_bar_test`, `tab_history_back_test`, `shell_navigation_bar_test`,
`split_destination_bar_test`, `pipelines_screen_filter_test`)
- Final run over all affected files (12 paths): 60 passed, 7 failed. The 7 are all
app-level tests that fail on HEAD for the same reason (see below). None is new.
- `settings_page_test`: "390 ... no gear ..." and "1200 ... rail ..."
- `tab_location_navigation_test`: "Settings is retained ...", "a delayed read ...",
"an explicit root URL ...", "Settings does not clear ..."
- `settings_registration_test`: "Settings shares socket and one native bar"
- Baseline check: a copy of app/ with HEAD's versions of the edited files fails the
same tests in the same way (`Expected: '/settings' Actual: '/pipelines'` after a
nav tap, and `Found 0 widgets with key 'segmented.more'` for the gear at 390).
`templates_wiring_test` passes on both.
- `tool/analyze.sh`: clean (0 errors, 0 warnings, 0 infos).
## Limitations
- App-level Settings navigation is not verified by these tests: a tap on the Settings
nav item does not change the route in this harness, on HEAD or on this change. The
behaviour is covered at shell level (`settings_back_test`) and by the gear test.
- System Back on a nav-opened Settings still closes to Pipelines (the shell's
PopScope is unchanged).
- The mid-width band keeps the gear by design (the floating bar has no Settings
entry). Adding Settings to the floating bar would remove it; not done here.
- Not built or captured here (ui-review owns that). States to re-capture:
- `base-light-430x900/12-settings.png` and `circle/01-hover.png`: Settings from the
nav has no Back arrow.
- `base-light-430x900/01-pipelines.png`: no Settings gear in the Pipelines header.
- A width between 600 and 696: the gear stays, and it opens Settings with Back.