Files
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

75 lines
4.3 KiB
Markdown
Raw Permalink 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.
# Segmented top bar across the app
The ChatGPT-style bar the chat introduced (round Back, title pill, actions
pill on the page's own background) is now the app's only top bar.
## Shared pieces (`lib/ui/adaptive/`)
- `segmented_bar.dart` — `SegmentedBar({required bool cupertino, required
String title, Widget? leading, bool automaticallyImplyLeading = true,
String? subtitle, IconData? subtitleIcon, VoidCallback? onTitlePressed,
String? titleSemanticLabel, Key? titleKey, List<Widget> actions,
Color? backgroundColor, Color? pillColor, Color? foregroundColor,
double bottomPadding = 8})`. An `ObstructingPreferredSizeWidget`: use it as
`Scaffold.appBar` (with `extendBodyBehindAppBar: true`) or
`CupertinoPageScaffold.navigationBar`; it handles the top safe area and
implies Back / close (Material `BackButton`/`CloseButton`, Cupertino
`CupertinoNavigationBarBackButton`/Cancel) like the stock bars.
- Layout: actions take their natural width first; the title shrinks and
ellipsises, keeping at least `minTitleShare` (25%) of the bar; only then
does the first action ellipsise.
- Background: a scrim of the page background, opaque over the status-bar
inset and fading out downwards. It ignores pointers: only the pills take
taps; taps between them reach the content behind.
- `preferredSize`: Cupertino reserves exactly 8 + 44 + bottom (the scaffold
disables text scaling in its navigation bar); Material reports a cap
(8 + 48×2 + bottom) and the scaffold sizes the bar to its content. Bar text
is clamped at 2× (the stock app bar clamps its title too).
- `segmented_bar_pieces.dart` — `SegmentedPill`, `SegmentedBackButton`,
`SegmentedTitlePill`, `impliedSegmentedLeading`.
- `glass_pill.dart` — `GlassPill`: the reusable frosted piece (one
`BackdropFilter` blur, sigma 16, clipped to the shape; fill
`surfaceContainerHigh` / `systemGrey6` at 72%; hairline `outlineVariant` /
`separator` border). Under `MediaQuery.highContrast` the fill is solid and
nothing blurs. Also the floating tab bars' pill (`notes/floating-tab-bars.md`).
- `segmented_bar_overlay.dart` — `SegmentedBarOverlay(bar:, child:)`: floats a
bar over content outside a scaffold (like `extendBodyBehindAppBar`), giving
the content the bar's measured height as `MediaQuery.paddingOf(context).top`.
## Floating behind the bar
- Material scaffolds use `extendBodyBehindAppBar: true`; Cupertino bars do not
fully obstruct. Either way content receives the bar height as media padding.
- The conversation transcript floats: `ChatThreadView` lays its header over
the transcript with `SegmentedBarOverlay`; the list pads its first item by
the bar height, so at rest nothing is hidden and scrolled history passes
behind the glass pills.
- The shell, `DetailPane` and most pages now float their content too (top
`SafeArea` dropped; lists pad by `withTopBarClearance` / `withBarClearance` /
`SliverTopBarClearance`, fixed notices use `TopBarNotices` / `BelowTopBar`).
See `notes/app-chrome-fixes.md` for what was converted and what still keeps
a top inset (chat list, settings, search, schedules toolbar, canvases).
- Bottom tab bars float too: see `notes/floating-tab-bars.md`.
## Converted
Shell bar (`shell/adaptive_shell.dart`), `DetailPane` (`shell/detail_page.dart`,
still drops only its app bar for barless content so the body never remounts),
chat header (`chat_thread_header.dart`, keys `chat-thread-header`, `chat-info`,
`chat-back`, `chat-model` kept), and every page-level bar in `lib/`:
application/{schedules,search,templates}_destination, artifacts gallery and
viewer, file diff viewer, chat sessions, chat image viewer, graph expanded
view, stage definition view, pipelines screen and filter page, run changes,
run visit page, run graph preview, usage stats, schedule pipeline editor,
search screen, saved server editor, settings, templates frame.
No `AppBar(`, `CupertinoNavigationBar(`, `SliverAppBar` or
`CupertinoSliverNavigationBar` remains in `lib/`. No converted bar had a
`bottom:` tab strip (run detail tabs live in the body).
## Evidence
Captures in `/tmp/segmented-bar-evidence/` (headless Chrome, web builds of
`tool/chat_composer_probe_entry.dart` with the new `CHAT_COMPOSER_PROBE_LONG`,
`CHAT_COMPOSER_PROBE_MODEL` and `CHAT_COMPOSER_PROBE_WIDTH` defines, and
`tool/chat_sessions_probe_entry.dart`).