6.3 KiB
Templates, sheets, dialogs, Settings and artifact errors (review r2 D + H + L)
Fixes from the second style review (/tmp/app-style-review-r2/report-summary.md):
P1-3, P2-1, P2-7, P2-10, P3-7, P3-8, P3-9, P3-10 and P3-12.
Templates (P1-3, P2-1)
- Gallery (
features/templates/ui/template_gallery.dart): the oldListTile/CupertinoListTilelist is gone. Rows areAppListRows with anAppListAvatar.initial(keytemplate-avatar-<key>, a theme accent picked by the template key), the name as the bold title and one subtitle line: the description, thenN stagesonly when the server parsed the source. Thestage count unavailableline, chevrons and full-width dividers are gone. Row keystemplate-row-<key>are kept. - Width:
templatesContentMaxWidth= 720 (the Settings column), start-aligned viatemplatesColumn, for the gallery and the detail. - Background: both Templates scaffolds (
TemplatesFramestandalone andapplication/templates_destination.dart) useAppColors.backgroundon Cupertino; the inset-grouped band is gone. - Detail: the bar's title pill shows the template name with its description
as the subtitle (
templateBarTitle;TemplatesFrame.title/subtitle, which publishes throughShellBar; the Templates destination passes the subtitle to itsSegmentedBar). The body no longer repeats the name as a headline (only a bar-less embedded page still names it). Create is a compact button at its own width (MaterialFilledButton.icon, Cupertino medium filled), keytemplate-create-actionkept. TheKey / releaselabel/value pair is one muted line: the key (template-key, selectable, read as "Key …") and· Includes a schedule. The Cupertino muted style is now 15ptsecondaryLabelinstead of the 10pt tab caption.
Sheets (P2-7, P3-9)
lib/ui/layout/app_sheet_header.dartAppSheetHeader: title (route-naming header) + optional extra actions + Done (MaterialTextButton, Cupertino boldCupertinoButton). On a narrow sheet at large text the extra actions wrap under the title.- Used by the Runs filter sheet (key
runs.filter.done; Clear filters moved to a headerClear, keyruns.filter.clear, shown only when something is active), the Material Runs sort sheet (runs.sort.done) and both Needs you sheets (attention-done; Clear all stays as a Material header action and the Cupertino Clear-all group). The Cupertino sort stays a native action sheet with title and Cancel; the current order is its default action. - Filter sheet split out to
runs/ui/runs_filter_sheet.dart; shared choices and labels inruns_filter_options.dart. Statuses read in sentence case (runStateLabel), also on applied chips and the usage legend. Status keeps checkboxes on Material (several may be picked); Pipeline, Time range and Trigger are check rows (ListTilewith a trailing check andselected, in a mutually exclusive semantics group). - Not done: the chat "Chat information" sheet still says
Close(chat_thread_view.dartbelongs to the chat lane). It should adoptAppSheetHeader(Done) for full consistency.
Dialogs and action sheets (P2-10, P3-12)
- Cupertino decision prompt: options are
DecisionOptionRows (runs/actions/decision_option_row.dart, keyhuman-decision-option-<o>): label-coloured text, the target in secondary text, an empty circle until picked and a filled check circle when picked, hairline separators, the whole row tappable. Material keeps its radio list. RunMoreMenupassessheetTitle: runMoreMenuTitle(run)(title or pipeline, elseRun <id>), so the Cupertino run action sheet is titled like the chat row sheet.
Usage page (P3-7)
The body no longer starts with a Usage heading (the bar says it). No usage:
"No usage has been reported for these runs." No run in the last 7 days:
"No runs started in the last 7 days." instead of seven zero labels. Otherwise
the chart draws bars over a baseline axis, counts only above days with runs.
Settings (P3-8)
secondaryActionLabelis alwaysReconnect(neverConnectbesideDisconnect); keys unchanged.- Notifications:
NotificationPermissionTileis one compact row: a short state line (Alerts are off…), one short helper line andEnable(MaterialFilledButton.tonal, Cupertino small tinted; named "Enable notifications"). The browser's full sentence for the state is the row's semantics label.NotificationPermissionViewgainedheadline/helper. - Cupertino
Save workspaceis a small tinted button, so disabled reads as a disabled button.
Artifact viewer (P3-10)
artifactPreviewFailureMessage (artifacts/domain/artifact_preview_failure.dart)
maps no-answer, 404/410, 401/403, 5xx and other statuses to plain sentences;
exception text is never shown. The failure message carries a Retry button
(artifact-preview-retry) that refetches (failures are not cached).
Tests
New: test/features/templates/ui/template_layout_test.dart (720 cap, named
bar, compact Create, 320 @2x), test/features/runs/ui/runs_sheets_test.dart
(header/Done, Clear, check rows, sentence case, sort header, usage empty
states and chart), test/features/artifacts/domain/artifact_preview_failure_test.dart,
a Retry test in artifact_viewer_page_test.dart, decision option-row
assertions in decision_action_test.dart, runMoreMenuTitle in
run_list_row_test.dart, and the Reconnect assertion in
settings_screen_test.dart. Updated for intentional changes: the template
gallery screen and behind-bar tests, runs toolbar test (sentence case;
reveal also ensures visibility), notification tile and wiring tests.
Full suite (after merging main bd370c99): 2150 passed. flutter analyze clean, flutter build web OK.
Evidence
/tmp/r3-c-evidence/: web build of tool/templates_wiring_probe_entry.dart
over /tmp/wave2-e-scripts/fixture_server.mjs, driven by
/tmp/wave2-e-scripts/shoot.mjs (spec generator /tmp/r3c-scripts/mkspec.py).
{m,c}-{templates,tdetail,filter,sort,needsyou,usage,decide,settings}-{560,1200}-{light,dark}
(+ -empty decide before picking, -top Settings top), c-runmenu-*,
{m,c}-artifact-560-{light,dark} (404 → friendly message + Retry). The fixture
cannot validate sources, so stage counts are absent in the gallery captures.
No device run: Android and iOS are unverified.
Known gap: the usage page body is not width-capped on wide windows (summary caps belong to batch K).