aabd22b5ad
Replace the narrow-layout floating destination pill with a full-width Material 3 NavigationBar. Reuse the shell destination model and badge wiring while preserving re-selection callbacks and hiding the bar for keyboard/detail states.
3.6 KiB
3.6 KiB
Phone bottom navigation bar
Replaces the floating round destination pill on phone-width windows (narrower
than the 600 px list-detail split) with a full-width Material 3 NavigationBar:
Pipelines, Runs, Chat, Search, Settings, each with icon, label and the rail's
badges. Wider windows keep the floating bar (the list beside an open item needs
it) and the rail keeps its existing layout.
Changed paths
app/lib/shell/shell_navigation_bar.dart(new):ShellNavigationBar, the phone bar. ReusesdestinationDetails,shellTabDestinationsand the shell's badge icon builder. Settings is its fifth destination. Wrapped inSafeArea(bottom only). Returns nothing while the keyboard is open (viewInsets.bottom > 0).app/lib/shell/adaptive_shell.dart: phone path uses the new bar; the floating bar stays for wider non-rail windows;hideNavigationspecs still hide the bar. Pushed detail routes already cover the shell, so the bar stays hidden there.- Tests:
test/shell/shell_navigation_bar_test.dart(new, 7 cases),test/shell/shell_bar_test.dart,test/shell/floating_tab_bar_test.dart,test/shell/attention_badge_test.dart,test/shell/navigation_rail_test.dart,test/shell/split_destination_bar_test.dart,test/application/settings_page_test.dart,test/widget_test.dart,test/perf/background_work_bench_test.dart(countsShellNavigationBarrebuilds now, since the pill is no longer built on phones).
Behaviour decisions
- Re-tap:
ShellNavigationBarcallsonSelectedon every tap, including the shown destination, soAdaptiveShell._select(and itsonDestinationSelectedcallback) fires on re-tap. Run 404's hook is not in this branch; nothing to rename. - Settings selected: the bar marks Settings (index 4) while the Settings page is open. The Pipelines gear stays in the Pipelines toolbar.
- Keyboard: the bar leaves whenever the keyboard is open on a phone, not only in
chat. Chat on phone already hides it through its workspace
hideNavigation.
Focused results
Command: tool/memwatch/full.sh with one quoted path list (new shell test, the
shell and application users of the bar, widget_test, two features/chat files,
perf bench). The verdict line named only those paths.
- Final run: 129 passed, 2 failed. Both failures are
test/application/search_wiring_test.dart("field and artifact hits select their run detail selection", "an abandoned selection does not replay on run reopen"). They also fail on an untouched base worktree (HEAD9bb87e51, detached temporary worktree, removed afterwards), with the sameokEditableText assertion. They are pre-existing and unrelated to the bar. - New file alone:
shell_navigation_bar_test.dart7/7 passed. tool/analyze.sh: clean (0 errors, 0 warnings, 0 infos) after the final edits.
Affected UI states (not captured here)
- Phone (390 px) bar, each of Pipelines, Runs, Chat, Search, Settings selected: covered by widget tests for selection, not rendered.
- Badges: running count on Runs, unread on Chat (widget tests).
- Keyboard open: bar absent (widget test).
- Pushed detail route: bar absent (existing test,
shell_bar_test.dart). - Chat workspace: bar absent (existing
hideNavigation). - Light and dark captures: NOT produced. Capture belongs to ui-review.
Limitations
- No device or browser verification of the bar. Its metrics (80 dp
NavigationBarheight, SafeArea) and the gesture-inset clearance are verified only in widget tests with the padding faked. - Settings-as-destination on the phone bar is new behaviour; the Pipelines gear is still present.
- Medium widths (600 px to the rail threshold) keep the floating pill, by design.