26bb583f10
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
99 lines
5.6 KiB
Markdown
99 lines
5.6 KiB
Markdown
# Starting a run: labelled entry points
|
|
|
|
## Change
|
|
- Pipeline detail: the icon-only play button in the top bar is now a labelled
|
|
`FilledButton.icon` "Run" (same key, `runPipelineActionKey`). In a narrow bar
|
|
it moves into the More menu with its label, via the existing
|
|
`SegmentedOverflowAction`.
|
|
- Runs: an extended "New run" button (`runs-new-run`) floats over the list's
|
|
bottom-right corner while the list is the visible view (phone list, or the
|
|
desktop list pane). It sits above the shell's bottom bar: the button's bottom
|
|
is lifted by the body's bottom padding, the same inset the list clears. While
|
|
it is shown, the list's bottom padding also reserves its band (`_newRunBand`
|
|
in `lib/features/runs/screen.dart`), so the last row should rest above the button (no test covers this; ui-review to confirm).
|
|
It opens a searchable picker of active pipelines (archived ones are
|
|
withheld), reads the chosen pipeline's latest version, then opens the same
|
|
start dialog the Run button opens.
|
|
- The start flow moved out of `RunPipelineAction` into
|
|
`lib/features/pipelines/ui/run_pipeline_flow.dart` (`openRunPipelineFlow`),
|
|
so both entry points share one submit, pending-intent and accept path.
|
|
- The pending-intent store on Runs uses the same endpoint scope as Pipelines
|
|
(`lib/application/pending_run_scope.dart`).
|
|
- Walkthrough step 3 now reads: "Press Run on a workflow, or New run on the
|
|
Runs tab, to start one."
|
|
|
|
## Fix for ui-review rejection (visit 1)
|
|
- Defect: on a phone the "New run" button sat beneath the bottom navigation
|
|
(semantics rect y=928-984 at 430x900), so it was hidden and a tap reached
|
|
Settings.
|
|
- Cause: the button was the last child of a column under the list, and the
|
|
shell's body extends under the bar (`extendBody`), so the bottom of the
|
|
column was under the bar.
|
|
- Fix: the button is now an overlay positioned above the body's bottom inset,
|
|
and the list reserves the band. Desktop uses the same overlay.
|
|
- Tried first and rejected: wrapping the list in a `Column` with the button as
|
|
a second child (in both an `Expanded` and an outer form). It fixed the phone
|
|
position but broke row selection on desktop (`list_detail_consistency_test`
|
|
"selected rows" at 640 wide: row 1 kept its selected flag after row 2 was
|
|
opened). The overlay keeps the list as a direct child and passes that test.
|
|
|
|
## Files
|
|
- Source: `lib/features/pipelines/ui/run_pipeline_action.dart`,
|
|
`lib/features/pipelines/ui/run_pipeline_flow.dart` (new),
|
|
`lib/features/runs/screen.dart`, `lib/features/runs/ui/new_run_button.dart`
|
|
(new), `lib/features/runs/ui/new_run_flow.dart` (new),
|
|
`lib/features/runs/ui/new_run_picker.dart` (new),
|
|
`lib/application/pending_run_scope.dart` (new),
|
|
`lib/application/pipelines_destination.dart`,
|
|
`lib/application/runs_destination.dart`,
|
|
`lib/features/walkthrough/walkthrough_steps.dart`.
|
|
- Tests: `test/features/runs/ui/new_run_test.dart` (new),
|
|
`test/features/pipelines/ui/run_pipeline_launch_test.dart` (one case added),
|
|
`test/features/runs/ui/runs_list_refresh_test.dart` (finder scoped to the list
|
|
rows; its expectations are unchanged).
|
|
|
|
## Regression coverage for the rejection
|
|
- `new_run_test.dart` "New run clears the bottom bar and opens the picker on a
|
|
phone": the screen sits in a scaffold with `extendBody` and a NavigationBar,
|
|
as the shell does. It asserts the button's bottom is at or above the bar's
|
|
top, and that a tap on the button opens the picker. Before the fix it failed
|
|
(button bottom 884, bar top 820).
|
|
|
|
## Focused results (visit 2)
|
|
Command: `tool/memwatch/full.sh` with 19 test files (the new-run and launch
|
|
tests plus every test file that builds RunsScreen, the Pipelines Run action, the
|
|
Pipelines screen, Settings, or the walkthrough).
|
|
- 119 passed, 1 failed. Verdict named only the intended paths.
|
|
- Failing: `test/application/run_start_wiring_test.dart` "an accepted launch
|
|
opens the returned run and re-reads the runs list exactly once". It also fails
|
|
on untouched `main` (checked in a temporary main worktree, since removed): it
|
|
times out waiting for `get_pipeline` after tapping `pipeline-row-1`.
|
|
- `list_detail_consistency_test.dart`: passes (it failed with the rejected
|
|
`Column` layout; see Fix above).
|
|
- `new_run_test.dart`: 5 passed, including the phone bottom-bar case.
|
|
- `tool/analyze.sh`: clean (exit 0).
|
|
|
|
## Affected UI states (for ui-review to re-capture; not captured here)
|
|
1. Pipeline detail, wide bar: labelled "Run" next to the list and more icons.
|
|
2. Pipeline detail, narrow phone bar: Run should move into More, labelled.
|
|
3. Runs list, phone (430x900): "New run" floats above the bottom bar, clear of
|
|
the last row at rest. This is the rejected state; it must be re-captured.
|
|
4. Runs list, desktop: "New run" floats over the list pane's bottom-right.
|
|
5. New run picker: default, searching, no match, no active pipelines, error+retry.
|
|
6. Start dialog reached from the picker.
|
|
7. Walkthrough step 3 copy.
|
|
Before captures: `/tmp/ui-review/pipe-light-430x900/01-pipeline-detail.png`
|
|
(play icon unlabelled) and `/tmp/ui-review/base-light-430x900/03-runs.png`
|
|
(no New run).
|
|
|
|
## Limitations
|
|
- No UI was built or captured in this stage (per the stage instructions);
|
|
rendering is unverified. The phone position is verified only by the widget
|
|
test's layout geometry under a scaffold that mirrors the shell.
|
|
- `_newRunBand` is a fixed reservation (16 + 56 + 16). If the extended button
|
|
grows with text scale, the last row may need more room. Measuring it would
|
|
need a size callback; not done.
|
|
- The Runs picker reads only the current endpoint scope. Pending intents stored
|
|
under legacy endpoints are not offered by New run (Pipelines still offers them).
|
|
- Not run on web, a device or the Fold.
|