Files
Caspian 東澔 2190a8ffc4 feat: background task bar above the composer (#924)
* feat: composer-anchored background task panel

Replace the sidebar task panel with a composer-anchored strip + drill-down
card matching the workflow panel's visual language:

- Collapsed by default: single flat strip (current task w/ shimmer,
  done/total progress, aggregate status); expands in place with the
  workflow panel's height transition
- Expanded: task list capped at ~4 rows, drill-down detail per task
  (metrics line, command, terminal output, subagent prompt/report,
  clickable output file that opens in the in-app editor via the new
  open-file-in-editor shell event)
- Tasks carry their owning tool call so command/prompt/output render
  from real data; live streaming states graft onto historical tool parts
- Fallback mode (running scripts/terminals) preserved
- Panel sits in normal flow above the composer so expanding never covers
  the thread

* refactor: formalize composer-top bar families + flat chrome sync

Introduce composer-top-bars.tsx documenting the two bar families and
their stacking contract:

- Card bars (task panel, workflow panel): freestanding flat cards —
  chrome unified to rounded-lg + border-border/70 + bg-background,
  no shadow, matching the composer
- Docked bars (codex goal banner, submit queue): open-bottom bars that
  glue to the composer. New DockedBarStack enforces the rule that only
  the bottom-most visible docked bar keeps its open bottom; ones above
  it close into uniform rounded cards (both components now take a
  standard `docked` prop, replacing the ad-hoc hasQueueBelow)
- Docked bars move from the absolute overlay into normal flow directly
  above the composer so nothing can render between them and it
- Stack spacing normalized to 4px: overlay gap-1, private bottom
  margins removed from workflow panel / quick actions / context
  injector, task panel margins tightened

* refactor: extract CARD_BAR_CHROME + restore 6px overlay bottom gap

Card-family chrome now lives in composer-top-bars.tsx as a shared
constant used by both the task panel and the workflow panel; the
composer-top overlay keeps a uniform 4px gap between bars and 6px
above the composer stack.

* chore: add changeset + release announcement

* fix: address code-review findings for the background task bar

Correctness:
- Replace a literal NUL byte in use-background-tasks.ts's dedupe key
  (it made git treat the whole file as binary)
- isSubagentTask now recognizes the SDK's actual task_type
  "local_agent" (classification no longer hinges on subagentType alone)
- Collapsed strip's idle aggregate surfaces the worst terminal status
  (failed > killed > cancelled) instead of always painting green
- Detail view is id-addressed: a shrinking/reordering snapshot falls
  back to the list instead of silently showing a different task
- Output-file links outside the workspace reveal in Finder instead of
  erroring (the in-app editor only opens workspace files)
- Aborted/errored turns terminalize still-running task snapshots as
  cancelled so reloads don't resurrect perpetual "running" tasks
- Snapshot upserts are skipped when byte-identical to the last committed
  snapshot, and the persistence dedupe cursor only advances after a
  successful commit (rollbacks self-heal on the next task event);
  frontend emits keep their own dedupe cursor
- Unattributable task lifecycle events (no task_id/tool_use_id) are
  swallowed without minting phantom per-event TaskStates
- Persisted task_snapshot deserialization failures now log a warning

Cleanup:
- Remove 17 dead taskPanel* i18n keys from both locales
- Gate the repoScripts fallback query on fallback mode + 30s staleTime
- New integration snapshot test freezes the persisted task_snapshot
  storage shape end-to-end through convert_historical
2026-07-09 21:47:41 -07:00
..
2026-06-08 18:41:50 +08:00
2026-04-02 08:54:53 +08:00
2026-06-08 18:41:50 +08:00
2026-06-08 18:41:50 +08:00
2026-06-08 18:41:50 +08:00