Files
pipelines/app/notes/wide-shell-fixes.md

8.4 KiB

Wide shell fixes (review round 2, batches A + K)

From the second independent review (/tmp/app-style-review-r2/report-summary.md): P1-1, P2-9, P3-6 and P3-14. Follows notes/app-chrome-fixes.md and notes/floating-tab-bars.md.

P1-1: the destination bar stays over the list pane

On a wide split window the shell's FloatingDestinationBar was laid out over the whole window and right-aligned, so it sat over the detail pane. There it stacked with the chat composer (two glass pills bottom-right) and covered the run and pipeline detail content.

  • ListPaneWidth (lib/shell/list_detail.dart) narrows a shell bar to the list pane (listDetailListWidth, the split math the panes use) while the tab is split (ShellPaneSplit). It is placed at the pane's leading edge. When nothing is split it passes the whole width through. The widget tree is the same either way, so a split never remounts the bar.
  • The shell (lib/shell/adaptive_shell.dart) wraps both bars in it: the top bar (_ListPaneBar, which used to inline the same math) and the destination bar (bottom-start).
  • The destination bar still judges its own placement on the width it is given. At 1200 the list pane is 479 wide, so the pill spans the pane minus 16 per side. At 1600 the pane is 639 wide, so the pill is compact and right-aligned within the pane. It never crosses into the detail.
  • ListDetailPanes gives the detail pane only the system bottom inset (viewPadding.bottom), in addition to the top inset it already had. The composer, or any other bottom control, owns the pane's bottom edge. The list keeps the bar's height as its bottom padding.
  • Unchanged: on phones the bar spans the full width, and on wide windows with no split (Settings, Search, Schedules, Templates) it is compact and right-aligned. floating_destination_bar.dart needed no change.

Detail tabs at the bottom (operator request)

Beside a list, run and pipeline detail used to float their tabs at the top of the pane, under its bar (PageTabsEdge(top) from notes/app-chrome-fixes.md). The shell's tab bar now stays over the list pane, which leaves the detail pane's bottom free. So ListDetailPanes now says PageTabsEdge(edge: FloatingBarEdge.bottom), and the item's tabs float at the bottom of the detail pane, the same as on a phone page:

  • At 1200 and 1600 they are sized to their tabs and sit at the pane's trailing edge.
  • They sit 16 above the system inset.
  • The content pads its last item clear of them.

The chat composer owns the chat pane's bottom in the same way. No pill sits on top of another pill. The stage page is always a pushed page, so its tabs were already at the bottom. FloatingBarEdge.top remains in the layout primitives, but nothing in the app uses it now.

Status-bar inset in the detail pane (unfolded foldable)

On the Pixel Fold, the right pane drew its bar (chat header, run detail bar) under the status bar. The cause is that a Material Scaffold with an appBar and a bottomNavigationBar removes the top and bottom padding and view padding from its body. ListDetailPanes rebuilt the detail's insets from viewPadding, and inside the Material shell that is zero. Cupertino was unaffected.

The fix is in two places:

  • The shell publishes the system insets it saw before its scaffold: ShellSystemInsets in list_detail.dart, set in adaptive_shell.dart from MediaQuery.paddingOf.
  • ListDetailPanes gives the detail exactly those insets at the top and bottom. Outside a shell, viewPadding stands in.

The list side keeps the shell bar's height, so it was already correct. Headless Chrome has no status bar, so this is covered by widget tests only. It has not been verified on a device.

P2-9: Schedules on a wide window

  • The strip (schedule_list_toolbar.dart) now holds the field and the filter, with the count as a muted label (Material bodyMedium / onSurfaceVariant, Cupertino 15pt secondaryLabel). The helper paragraph "Saved run configurations, not pipeline definitions." has moved to the empty state (No schedules yet. keeps its own text).
  • If the strip is at least kScheduleToolbarRowWidth (520) wide, everything sits on one row. On narrower strips the field takes the first row, and the filter and count wrap below it (Wrap, so 2x text never overflows).
  • Rows are capped at kScheduleListMaxWidth (the strip's 720 plus its 12 inset) from the leading edge, so a row's trailing time ends under the strip's trailing edge. The ListView still spans the pane, so the whole area scrolls.

P3-6: one empty-pane placeholder

EmptyDetailPane (lib/shell/empty_detail_pane.dart) shows the destination's own icon (destinationDetails, per host) above one short muted line, centred. Runs, Chat and Pipelines all use it:

  • "Select a run to open it here."
  • "Select a chat to open it here."
  • "Select a pipeline to open it here." This was "Select a pipeline.", and the tests have been updated.

The chat screen's private _NoChatSelected is gone.

P3-14: reading width on wide windows

ReadingWidth / kReadingMaxWidth = 840 (lib/ui/layout/reading_width.dart) caps a body from the leading edge and passes the full height through. Its structure is the same at every width, so crossing the cap never remounts the body or loses its scroll position.

  • Run detail (run_detail_tabs.dart): Summary, Input, Output and Timeline are capped. Graph, Changes and Artifacts keep the whole pane.
  • Stage page (run_detail_visit.dart): every section except Artifacts and Changes is capped.
  • Pipeline Summary (pipeline_detail_panel.dart _scrolling): the content inside the ListView is capped, so the whole pane still scrolls.

The cap is applied around the bodies, so run_detail_tab_bodies.dart, run_detail_visit_session.dart and pipeline_summary_view.dart are untouched (other workers own them).

Tests

New:

  • test/shell/split_destination_bar_test.dart covers both hosts:
    • At 1200 and 1600 split, the pill stays within the list pane and does not overlap the detail. The detail composer reaches the bottom edge, and the list still clears the bar.
    • At 1200 unsplit, the pill is compact at the right edge.
    • At 390, the pill spans the phone.
    • At 600 and 840 split with 2x text, there is no overflow.
  • test/shell/split_status_bar_test.dart covers both hosts at 1200 with a 40px status bar (tester.view.padding and viewPadding):
    • The list bar, the detail pane bar and a self-drawn header (like the chat thread's SegmentedBarOverlay) all start at y ≥ 40.
    • The list and the item content still start at y=0.
    • The item tabs float at the pane's bottom, inside the detail pane, and do not overlap the shell tabs; the list clears them.
    • Before the fix, Material failed with the bar at y=8.
  • test/ui/layout/reading_width_test.dart:
    • The cap applies from the leading edge, and the body is not remounted across the cap.
    • Run Summary is capped at 1200 and full width at 390 (both hosts).
    • The stage page Summary is capped and its copy button sits within the cap.
    • Pipeline Summary is capped.
  • test/features/schedules/ui/list/schedules_wide_test.dart: at 1200, rows are 732 wide, the time ends inside the strip, and the field, filter and count are on one row with no helper line (both hosts).
  • test/shell/empty_detail_pane_test.dart: icon above a muted line, centred, for each destination on both hosts.

Updated:

  • schedules_layout_test.dart (the helper is no longer in the strip).
  • schedule_screen_harness.dart (size:).
  • The pipelines tests (placeholder wording).
  • chat_list_detail_test.dart, pipelines_screen_test.dart and runs_screen_test.dart now assert EmptyDetailPane.
  • pane_bar_row_test.dart: the item tabs are now at the bottom of the pane (they were under the pane bar).
  • run_detail_tabs_test.dart: at 1000 the Summary body is now kReadingMaxWidth wide from x=0 instead of spanning the window.

Evidence

Captures are in /tmp/r3-a-evidence/. They were taken with headless Chrome using the reviewer's /tmp/app-style-review-r2/shoot.mjs over a web build of tool/app_host_probe_entry.dart (build/r3-app_host):

  • Runs fixture: runs, run1, stage, chat, thread (RICH=1), schedules and settings at 560, 1200 and 1600, Material and Cupertino, light, with dark at 1200 and 1600 for run1, stage, thread and schedules.
  • Pipelines fixture: plist and pdetail.

The specs are in /tmp/r3-a-evidence/scripts/.

Known gaps: there was no device run, so Android and iOS are unverified.