Files
pipelines/app/notes/background-task-list-metadata.md
T

2.8 KiB

Rich background task list

Task rows now use the recorded description as their title (retaining the full command in selected detail). Native Material and Cupertino rows show task type/status and elapsed runtime, a day-first written local start date with 24-hour time, one bounded progress/description preview, and available tool/token counts. Selecting a task exposes the full command and identity, full progress/description, last tool, last update, counters and the existing lazy bounded output page.

Only recorded started_at drives elapsed time. Missing or invalid starts say “Start time unavailable”; an upstream duration_ms is labelled “Reported runtime” and never presented as a clock-derived uptime. Future starts report clock skew instead of a negative runtime. Zero counters remain distinguishable from absent counters.

One timer belongs to the mounted modal panel and captures one clock value per rebuild for all rows/detail. Closing/disposal cancels it. Ticks neither poll the server nor load output. Streaming partial frames and snapshots preserve metadata already learned without retaining tasks the current server snapshot no longer lists.

Focused watchdog checks: 36 existing shell/domain/background-controller/modal tests passed (peak 1296 MB, 12s); 6 new metadata/clock/layout/selection tests passed (peak 794 MB, 4s). Tests cover both native hosts at 390px and 2x text, duration/clock-skew/malformed values, partial metadata, no new requests on timer ticks, timer disposal, and lazy output only when selected. Bounded analysis was clean before the final opt-in fixture polish; final analysis and integration results follow below.

Rendered evidence uses the real full-app scratch fixture with opt-in chats=1&tasks=rich. Inspected wide Material light list/detail at /private/tmp/background-task-ui-wide-final/01-list.png and 02-detail.png, narrow Material dark list/detail at /private/tmp/background-task-ui-narrow-final/01-list.png and 02-detail.png, and Cupertino light list at /private/tmp/background-task-ui-cupertino-final/01-list.png. The native dialogs scroll selected detail and keep output bounded. Capture-owned servers and browsers exited normally. No production chats, devices or services were modified. Metadata availability depends on the backend update and provider support; the frontend never invents missing facts.

Final integration: tool/memwatch/full.sh 'test/features/chat/conversation test/features/chat/domain --no-pub' passed all 522 tests (peak 1966 MB, 44s), log /tmp/memwatch/out.YASMW0. Final bounded analysis of every changed Dart path is clean. Fresh fixture web build (including Wasm dry run) passed. Screenshot list/detail interactions succeeded and all five final PNGs were inspected. No physical-device or Safari acceptance is claimed.