Expand run detail output by default

Make run and visit output sections open when details are viewed while preserving user collapse behavior. Add coverage and implementation notes for the updated interaction.
This commit is contained in:
2026-11-12 01:56:41 +00:00
parent 2330f50268
commit 22af093eda
9 changed files with 323 additions and 86 deletions
+39
View File
@@ -0,0 +1,39 @@
# Run detail: Output section starts expanded
## Change
- The run Summary's Output section (`run-detail-summary-output`) now starts open.
Input still starts closed. The Summary's default is restored on a different run
and when a search hit names no section (`RunDetailTabs._resetSummarySections`).
- A visit's Summary Output (`run-visit-section-Output`) starts open; Input starts
closed (`_VisitSummaryState._closed = {'Input'}`).
- Both stay collapsible by tapping the title. The open/closed state lives in the
controller or State for that view only; it is not persisted.
- Long outputs: Output is a sliver. `RunFieldSliver` (in `run_field_body.dart`)
builds one `SliverList` row per recorded
field, so a map with hundreds of fields lays out only the rows on screen. It
is used for the run Summary Output (`_StickyField.sliverBody`) and the visit
Summary Output (`_section(..., lazy: true)`), both through `StickySection`'s
sliver path. A closed `SliverReveal` builds nothing.
- Input stays on the box path (`RunFieldBody`); it starts closed, so its cost is
paid only when the operator opens it. The box and sliver forms share the row
builder, so they render the same fields.
## Tests (run through `tool/memwatch/full.sh`, one quoted path list)
- Command: `tool/memwatch/full.sh 'test/features/runs/ui/run_detail_visit_sections_test.dart test/features/runs/ui/run_detail_summary_fields_test.dart test/features/runs/ui/run_detail_widget_test.dart test/features/runs/ui/run_search_selection_test.dart test/features/runs/ui/run_detail_tabs_test.dart test/features/runs/ui/run_detail_visit_test.dart'`
- Verdict (final code): `PASS: 49 passed, 0 failed, 0 skipped; peak 1884 MB; 32s; exit 0`
- New: visit Output starts expanded and collapses/reopens; run Output starts
expanded and collapses for the view; a 500-field visit Output opens with only
its first field built and the page scrolls to the last one (lazy regression).
- Updated (the old expectation was that Output started closed): visit tab/empty-state
tests, run Summary empty-wording and recorded-input tests, search-selection tests
for input, retired field and replacing a visit with the Summary.
- Not changed: Input's closed default and every Input expectation.
## Analyze
- `tool/analyze.sh`: `analyze: clean; 10s; exit 0`
- `dart format --set-exit-if-changed` on the changed files: formatted one widget
test file (whitespace only).
## Limitations
- No widget capture or browser/device check was run here; ui-review owns that.
- Very long Output is laid out when the section opens. Not measured for jank.