118 lines
6.3 KiB
Markdown
118 lines
6.3 KiB
Markdown
# 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 old
|
|
`ListTile`/`CupertinoListTile` list is gone. Rows are `AppListRow`s with an
|
|
`AppListAvatar.initial` (key `template-avatar-<key>`, a theme accent picked
|
|
by the template key), the name as the bold title and one subtitle line: the
|
|
description, then `N stages` only when the server parsed the source. The
|
|
`stage count unavailable` line, chevrons and full-width dividers are gone.
|
|
Row keys `template-row-<key>` are kept.
|
|
- Width: `templatesContentMaxWidth` = 720 (the Settings column), start-aligned
|
|
via `templatesColumn`, for the gallery and the detail.
|
|
- Background: both Templates scaffolds (`TemplatesFrame` standalone and
|
|
`application/templates_destination.dart`) use `AppColors.background` on
|
|
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 through `ShellBar`; the Templates destination passes the subtitle
|
|
to its `SegmentedBar`). 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 (Material `FilledButton.icon`, Cupertino medium filled),
|
|
key `template-create-action` kept. The `Key / release` label/value pair is
|
|
one muted line: the key (`template-key`, selectable, read as "Key …") and
|
|
`· Includes a schedule`. The Cupertino muted style is now 15pt
|
|
`secondaryLabel` instead of the 10pt tab caption.
|
|
|
|
## Sheets (P2-7, P3-9)
|
|
|
|
- `lib/ui/layout/app_sheet_header.dart` `AppSheetHeader`: title (route-naming
|
|
header) + optional extra actions + Done (Material `TextButton`, Cupertino
|
|
bold `CupertinoButton`). 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 header `Clear`, key `runs.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 in `runs_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 (`ListTile` with a trailing check and `selected`,
|
|
in a mutually exclusive semantics group).
|
|
- Not done: the chat "Chat information" sheet still says `Close`
|
|
(`chat_thread_view.dart` belongs to the chat lane). It should adopt
|
|
`AppSheetHeader` (Done) for full consistency.
|
|
|
|
## Dialogs and action sheets (P2-10, P3-12)
|
|
|
|
- Cupertino decision prompt: options are `DecisionOptionRow`s
|
|
(`runs/actions/decision_option_row.dart`, key `human-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.
|
|
- `RunMoreMenu` passes `sheetTitle: runMoreMenuTitle(run)` (title or pipeline,
|
|
else `Run <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)
|
|
|
|
- `secondaryActionLabel` is always `Reconnect` (never `Connect` beside
|
|
`Disconnect`); keys unchanged.
|
|
- Notifications: `NotificationPermissionTile` is one compact row: a short
|
|
state line (`Alerts are off` …), one short helper line and `Enable`
|
|
(Material `FilledButton.tonal`, Cupertino small tinted; named "Enable
|
|
notifications"). The browser's full sentence for the state is the row's
|
|
semantics label. `NotificationPermissionView` gained `headline`/`helper`.
|
|
- Cupertino `Save workspace` is 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).
|