Files
pipelines/app/notes/chat-background-task-modal.md

1.8 KiB

Background tasks badge and modal

  • Removed the pinned task list from above the transcript. A compact native N tasks button now sits above Send (singular for one task). It remains discoverable at zero; loading/failed reads never invent a known count.
  • Opening it shows a native Material/Cupertino modal with the same live running task facts and lazy session-scoped, 64 KiB output reads. Selected output appears under its task. Exits update the count and remove stale selected output.
  • The badge and modal share one controller/subscription. A slow snapshot cannot resurrect an exit or discard a newer live task. Session replacement/disposal invalidates pending reads and removes only the owned modal, not another route.
  • Done, barrier and system Back use normal modal dismissal. Task updates do not rebuild the transcript; small caption roles preserve composer space at 2x text.
  • Refused/unavailable/empty output remains distinguished. Output is selectable, bounded and explicitly exposed to accessibility.

Verification

  • Full flutter test: 1,936 passed; conversation subset: 304 passed; focused background controller/modal suite: 25 passed. Clean analysis.
  • Real browser probes: Material 1280 and Cupertino 390, using loopback fixtures. Checked button geometry above Send, absence of inline task content, native modal, no eager output read, exact bounded query, live exits and empty state. Captures inspected in build/background-task-modal-{material,cupertino}/.
  • Existing output and narrow/2x text tests now exercise the modal. New tests cover live count, Done/Back, session switches, stale reads, owner disposal and preservation of an unrelated top route.
  • This item is implemented separately from the newer prompt/row/stage/sizing follow-ups. No public deployment or device installation of this item yet.