Files
pipelines/app/notes/app-list-row.md
T
alan 3c56db37fd Share one list row across runs, pipelines, chat, search and schedules
AppListRow (Material + Cupertino) with avatar, bold title and trailing
time, one muted line, one overflow menu style, inset dividers, selected
and emphasised states and a compact mode. Pipelines get a legible initial
avatar, schedule rows shrink to two lines with Edit/Pause/Delete in an
overflow menu, and the shell chat list scrolls behind the bar.
2026-10-31 04:15:01 +00:00

7.6 KiB

One shared list row (style review batch 3: F6, F8 results, F16)

Before this change Runs, Pipelines, Chat, Search results and Schedules each drew rows differently (see /tmp/app-style-review/report.md). They now all use one component, on both hosts.

Shared pieces (lib/ui/layout/)

  • app_list_row.dart, AppListRow: the leading slot, then a bold one-line title with time on the same line (the time takes at most 40% of the line), then one muted subtitle line with an optional subtitleLeading (status dot) and subtitleTrailing (unread dot), then an optional menu.
    • Styles come from the host's type scale. Material: title titleMedium w600 (letter spacing 0), subtitle bodyMedium, time bodySmall, all in onSurfaceVariant. Cupertino: title textStyle w600, subtitle and time 15pt secondaryLabel.
    • selected: Material secondaryContainer (title in onSecondaryContainer), Cupertino tertiarySystemFill. AppListRow.selectedColor gives the fill. Semantics are a container with selected and button.
    • emphasized (unread or attention): w700 title, accent time in w600.
    • Tapping: Material uses InkWell on a Material surface. Cupertino uses a GestureDetector that highlights systemGrey4 while pressed, like a table cell, and fades nothing. tapKey goes on the tap target.
    • divider (default true): a hairline inset to the start of the text column. Cupertino uses separator at 1 physical pixel; Material uses outlineVariant at 1. Lists turn it off for the last row of a group.
    • Compact mode: when the row is narrower than kAppListRowCompactWidth (280), it drops the avatar, the time and the menu, and shows compactSubtitle if one is given. keepMenuWhenCompact keeps the menu (chat, pipeline schedules).
    • No fixed heights. Padding is 16 horizontal and 10 vertical. At 2x text in a 320px row everything ellipsises without overflowing.
    • Test keys: appListRowSurfaceKey and appListRowDividerKey.
  • app_list_avatar.dart
    • AppListAvatar is a 40px circle (the CircleAvatar default) holding an icon (22) or text. The circle is filled with the foreground at 14%, or a neutral fill when there is no foreground. An optional corner badge is supported. The glyph scales down to stay inside the circle at large text.
    • AppListAvatar.initial shows the first letter in 18pt w700. It replaces the pipelines initial that used to read as an empty circle.
    • AppListStatusDot is a small dot that follows text scaling and can carry a semantics label.
  • app_overflow_menu.dart: AppOverflowMenu<T> and AppMenuAction give the app one overflow control. Material uses a PopupMenuButton with Icons.more_vert. Cupertino uses a CupertinoButton with CupertinoIcons.ellipsis that opens a CupertinoActionSheet with Cancel. Item keys sit on the popup items or sheet actions on both hosts. Used by the run menu (list rows and the run detail header), chat rows, search artifact hits and pipeline schedule rows.

Migrated

  • Runs (runs/ui/runs_list.dart): RunListRow is a thin AppListRow. Its leading slot is the status avatar. Rows are separated by inset dividers, with no divider before a day heading. The key run-row-<id> is now on the row. run-list-more-menu-<id> and the menu item keys are unchanged. run-row-surface-<id> is gone; use appListRowSurfaceKey. The run detail's menu uses the same control, so its Cupertino icon changed from ellipsis_circle to ellipsis.
  • Pipelines (pipelines/widgets/pipeline_list_panel.dart): one list for both hosts. The Cupertino inset-grouped section and the full-width Material dividers are gone, and so is the chevron. The legible initial avatar keeps the key pipeline-avatar-<id>. The latest-run dot is now AppListStatusDot, keeping pipeline-status-<id>. Compact rows show the latest state word. The compact threshold moved from 220 to 280.
  • Chat (chat/ui/sessions/session_row_content.dart ChatSessionRow, used by both session_list_material.dart and session_list_cupertino.dart): the separate Material ListTile and Cupertino CupertinoListTile rows are gone. The Cupertino list no longer uses inset groups; a directory header is now a small grey label. All keys are kept: chat-row-<id>, chat-actions-<id>, chat-row-unread, chat-row-working and chat-row-starred. Titles are now w600, or w700 when unread (they were w500/w700). The menu stays when compact.
  • Chat in the shell (chat/screen.dart): the BelowTopBar wrapper is removed. The list pads itself by the bar height (Material through default ListView padding, Cupertino explicitly), so it scrolls behind the bar like the other lists.
  • Search (search/ui/search_result_row.dart SearchResultRow, used by both bodies): the leading slot is the kind icon in an avatar, or the image thumbnail, now 40px. The recency is the time. The line starts with the kind in bold ("Field · …"), then shows the snippet with the match in bold. SearchKindTag, the two-line title and the Cupertino inset group are gone. Artifact hits keep search.actions.<target> and the tooltip "Open…".
  • Schedules list (schedules/ui/list/schedule_list_row.dart): the six-line block is now two lines. The clock avatar is green when enabled and grey when paused, and also carries the status as its semantics label. The time is scheduleNextDueShort ("22 Oct 09:00" or "Paused"). The line shows the timer and the pipeline/version. The prompt, workspace, timezone and exact due time are left to the editor the row opens. The list stays read-only and has no menu: its tests require no Edit/Pause/Delete, and the list controller has no mutations.
  • Pipeline Summary schedules (schedules/ui/pipeline/schedule_pipeline_row.dart): the same two lines, with the line "v2 · Every 24h · mon · Europe/London". The inline Edit, Pause/Enable and Delete text buttons moved into an overflow menu under a new key, scheduleRowMenuKey(id). The item keys scheduleRowEditKey, scheduleRowToggleKey and scheduleRowDeleteKey are kept, and Delete is destructive. A busy row disables its menu and tap. A tap on the row edits it. A refusal appears under the row with scheduleRowErrorKey.

Tests

  • New: test/ui/layout/app_list_row_test.dart covers both hosts. It checks the layout order, inset divider, tap, menu icon and items, the selected and emphasised styles, compact mode, keepMenuWhenCompact, 320px at 2x in light and dark, and the initial avatar.
  • Updated for intentional changes: list_detail_consistency_test, pipelines_destination_test, chat_list_detail_test, chat_active_selection_test, chat_session_row_layout_test, chat_session_row_material_test, pipeline_list_composition_test (inset divider and legible avatar), pipelines_adaptive_test, pipelines_screen_test, pipeline_summary_schedules_test, schedules_layout_test, schedule_pipeline_section_test (actions open through the menu) and search_bar_layout_test.

Evidence

The captures are in /tmp/wave2-d-evidence/. They were taken with headless Chrome using the reviewer's driver (a copy pointed at this worktree's tool directory). The sources were:

  • lib/main.dart over the runs and pipelines fixture servers;
  • the new tool/app_host_probe_entry.dart, which is the same composition with ?host=cupertino;
  • tool/chat_sessions_probe_entry.dart, tool/schedules_list_probe_app.dart, tool/schedule_pipeline_probe_app.dart and tool/search_selection_probe_entry.dart.

The captures were taken at 560 and 1200, in light and dark, on Material and Cupertino. There was no device run, so Android and iOS are unverified.