Files
pipelines/app/notes/floating-tab-bars.md
T
alan c6c6dcfe18 fix(app): float content behind top bars and give each wide pane its own bar row
- Top-bar clearance helpers (withTopBarClearance, withBarClearance,
  SliverTopBarClearance, BelowTopBar, TopBarNotices); shell, DetailPane and
  the runs/pipelines/templates/artifacts/stage definition/filter/usage pages
  drop their top SafeArea and pad their own lists, pinned headers pin at the
  inset.
- Wide windows: the shell bar narrows to the list pane (ShellPaneSplit) and
  the open item's bar shares its row; item tabs float at the pane's top
  (PageTabsEdge) instead of stacking on the shell's tab bar; the floating
  tab pill no longer swells over leftover media padding.
- Pipeline detail is a DetailPane on wide too; Run/Runs move from FABs into
  the bar's actions; name and identity live in the title pill.
- Run detail title pill shows the real title with Run N, pipeline and
  version (the pill links to the pipeline); the body keeps only status,
  actions and notices; standalone detail draws the same segmented bar.
- One Runs tab badge: attention outranks running.
- Tests for content-behind-bar padding and the no-stacking wide layout;
  notes/app-chrome-fixes.md.
2026-10-31 03:36:22 +00:00

7.5 KiB

Floating glass tab bars

Every bottom tab bar in the app is now one ChatGPT-style floating glass bar: the shell's destinations, the run detail's tabs, the stage (visit) page's tabs and the pipeline detail's tabs. The NavigationRail (Material) and the 200px Cupertino sidebar are gone.

Shared pieces (lib/ui/adaptive/)

  • floating_destination_bar.dart — FloatingDestinationBar({cupertino, currentIndex, onTap, items}), FloatingDestinationItem({icon, label, selectedIcon, key}). The host's own NavigationBar (Material, 64 high, labels always shown, secondaryContainer indicator) or CupertinoTabBar (54 high, no text scaling, transparent, no border; the selected icon sits in a tinted capsule so selection does not rely on colour alone) inside the shared GlassPill. Tab semantics (selected, "tab n of m") come from the host control. The item key covers the whole tab (icon and label) on both hosts. The Cupertino path builds no Material widget.
    • Placement follows the width the bar is given, live (its own LayoutBuilder): below kFloatingBarWideWidth (600) the pill spans the width minus kFloatingBarMargin (16) per side; at or above it the pill is sized to its tabs (every tab as wide as the widest label + 24, at least 88 Material / 76 Cupertino) and aligned to the trailing (right) edge. Either way it floats 16 above the bottom safe area (SafeArea.minimum).
    • Align(heightFactor: 1), so a scaffold/overlay measures the pill, not the whole area; space beside a narrow pill does not take taps.
  • floating_bar_layout.dart
    • FloatingBarOverlay(bar:, child:) — floats a bar over the bottom of content outside a scaffold (the bottom twin of SegmentedBarOverlay); the content fills the area and gets the bar's measured height as MediaQuery.paddingOf(context).bottom.
    • withFloatingBarClearance(context, padding), FloatingBarClearance, SliverFloatingBarClearance — add that bottom padding to a list's own padding / end a column or CustomScrollView, so the last item clears the bar at rest. Lists without explicit padding (ListView default) already consume media padding.

Where

  • Shell (shell/adaptive_shell.dart): Material keeps Scaffold(extendBody: true, bottomNavigationBar: bar) at every width; Cupertino uses FloatingBarOverlay inside SafeArea(bottom: false). Neither structure depends on width, so resizing never remounts a destination (the destination IndexedStack keeps its GlobalKey). Destination keys shell.destination.<name> now live on the floating bar items (both hosts). Badges (attention, running, unread) unchanged.
  • Run detail (features/runs/ui/run_detail_tab_strip.dart, run_detail_tabs.dart): the header no longer carries the strip; the tab body is a FloatingBarOverlay with the tabs at every width. Keys run-detail-tabs, run-detail-tab-<name> kept. kRunDetailBottomTabsWidth, the bottom flag and the strip's scroll-into-view are gone (all tabs are always visible).
  • Stage page (run_detail_visit_sections.dart, run_detail_visit.dart): the same; keys run-visit-tabs, run-visit-tab-<name> kept. The selected tab is visitTabFor(section), so Input/Output highlight Summary.
  • Pipeline detail (features/pipelines/widgets/pipeline_tabs.dart, pipeline_detail_panel.dart): the same (it was a bottom bar on phones); pipeline-detail-tabs, new pipeline-detail-tab-<name>. Run/Runs are now the top bar's actions, not FABs (notes/app-chrome-fixes.md).
  • DetailPane (shell/detail_page.dart) no longer consumes the bottom inset; its content (run detail, pipeline detail, chat thread with its own SafeArea composer) handles it. Beside a list on a wide window the open item's tabs float at the top of the pane instead (PageTabsEdge, FloatingBarEdge.top), so they never stack on the shell's bar; see notes/app-chrome-fixes.md.
  • Not converted (judged not bottom tabs): the segmented filters/toggles at the top of lists and viewers (SegmentedButton / CupertinoSlidingSegmentedControl in markdown source view, artifact gallery mode, diff form, pipeline scope, schedules filter). They switch a view's mode in place, not pages.

Content clearance

Scrollables under a floating bar that use explicit padding (or slivers) now add the clearance: run Summary (run_detail_tab_bodies.dart), field tabs, Timeline, artifacts gallery (artifact_visit_list.dart), Changes (changes_viewer.dart), visit Summary and Session, pipeline Source, Settings (now SafeArea(bottom: false)), Search (both bodies, SafeArea(bottom: false)), Cupertino chat sessions list. Runs, Pipelines and Material chat lists use default ListView padding.

widget_test failure on main

Material shell adapts at width 390.0 and supports large text failed with BoxConstraints(0.0<=w<=-32.0) NOT NORMALIZED. The test wraps the shell in MediaQuery(data: MediaQueryData(textScaler: 2x)), whose default size is Size.zero; FloatingDestinationBar sized itself from MediaQuery.sizeOf(context).width - 32 (the screen) instead of the space it was laid out in. The bar now measures its own constraints (LayoutBuilder), which is also what lets it follow a pane's width rather than the window's. The test keeps its intent (2x text, both widths, tab switching) and now also asserts no rail and no exception.

Tests

New: test/shell/floating_tab_bar_test.dart (phone full width; wide right-aligned, under 60% of 1200, content full width, tap beside the bar reaches content; content bottom padding equals the bar's height + margin; resizing moves the bar without remounting content; bottom safe area; selected semantics; no Material widget in the Cupertino bar; 320px at 2x), test/ui/adaptive/floating_bar_layout_test.dart (last list item clears the bar at rest at 390 and 1200; taps beside the wide bar reach content). Updated: widget_test.dart, shell/attention_badge_test.dart, application/list_detail_consistency_test.dart (taps destination keys), application/chat_registration_test.dart, features/chat/chat_list_detail_test.dart, features/pipelines/pipeline_tabs_test.dart (floating placement at 320/390/720/1200 at 2x), features/pipelines/pipelines_adaptive_test.dart, features/runs/ui/run_detail_tabs_test.dart (floating full width / right aligned, content behind the bar with clearance), features/runs/ui/run_detail_visit_sections_test.dart (placement at 390/884/1000), features/runs/ui/run_decision_wiring_test.dart (banner spans the header inset instead of the old strip). Test-font widths are inflated (every glyph a full em), so wide-width assertions in run/visit tests use 70%.

Evidence

Headless Chrome captures in /tmp/floating-tabs-evidence/: shell-{material,cupertino}-560, shell-material-1200, shell-cupertino-1200-dark (new tool/floating_tabs_probe_entry.dart, ?platform=cupertino&theme=dark&tab=runs), run-detail-*, run-timeline-cupertino-*, stage-page-* (tool/run_detail_visit_probe.dart, stage pages opened by CDP clicks), and the real app over the loopback fixtures: app-runs-material-560, app-run-detail-material-{560,1200}, app-pipelines-material-560, app-pipeline-detail-material-{560,1200} (tool/runs_probe_entry.dart, tool/pipelines_wiring_probe_entry.dart). The full app is Material on the web by design (prefersCupertino is false on web), so Cupertino evidence comes from the standalone probes.

Known gaps: no device run (Android/iOS unverified); the existing tool/run_detail_visit_probe.mjs predates this change (it still looks for a Graph tab) and was not updated.