qwen-code/packages
wenshao dbad3f9449 fix(cli): reconcile registry-missing snapshots as just-finished + address review nits
Hot-fix: the previous round's "drop the row when registry.get()
returns undefined" was too aggressive. `unregisterForeground` calls
`emitStatusChange(entry)` BEFORE it deletes the entry, so the
snapshot useBackgroundTaskView captures still says "running" while
the very next render's registry.get sees nothing. Dropping the row
outright made foreground subagents disappear from the panel the
instant they finished — users saw "SubAgents 不显示了" on tasks that
ran-and-immediately-completed.

Reconciliation now has three branches:
  1. live found → use live (newest recentActivities).
  2. snap says still-live but registry forgot → synthesize a
     terminal version with endTime pinned to the FIRST observation
     so the 8s visibility window gives the user a "the agent
     finished" beat then evicts cleanly. The first-seen-missing
     timestamp is held in a useRef map (without it, each tick
     resets endTime to `now` and the row never expires).
  3. snap is already terminal but registry forgot → drop (no
     useful state to keep showing).

Also addresses three smaller review notes (deepseek-v4-pro via
/review):

- DEFAULT_SUBAGENT_TYPE is now imported from
  @qwen-code/qwen-code-core (a new DEFAULT_BUILTIN_SUBAGENT_TYPE
  export referenced by both BuiltinAgentRegistry's seed entry and
  the panel's default-type elision). A backend rename now propagates
  instead of silently re-introducing the redundant
  `general-purpose:` prefix on every row.
- The useMemo body now reads `now` (as `reconcileAt`) so the
  dependency is semantically honest — a future "remove dead dep"
  cleanup can no longer silently freeze the panel on the first
  tool-call after a snapshot refresh.

Coverage delta: +5 cases on LiveAgentPanel.test.tsx — token rendering
on completed entries, status-icon routing for paused / failed /
cancelled (parametrized), case-insensitive prefix stripping in
descriptionWithoutPrefix, plus the rewritten ghost-row case
(synthesized terminal lingers 8s then evicts) and a sibling case
asserting already-terminal snapshots with empty registry still drop.

17 LiveAgentPanel tests pass.
2026-05-07 19:45:07 +08:00
..
channels feat(weixin): add image sending support via CDN upload (#3781) 2026-05-06 01:49:26 +08:00
cli fix(cli): reconcile registry-missing snapshots as just-finished + address review nits 2026-05-07 19:45:07 +08:00
core fix(cli): reconcile registry-missing snapshots as just-finished + address review nits 2026-05-07 19:45:07 +08:00
sdk-java fix(sdk-java): pass custom env to CLI process (#3543) 2026-04-24 10:37:52 +08:00
sdk-python fix(sdk-python): standardize TAG_PREFIX to include v suffix (#3832) 2026-05-06 11:14:02 +08:00
sdk-typescript refactor: extract shared release helper utilities (#3834) 2026-05-05 10:15:17 +08:00
vscode-ide-companion feat(cli): customize banner area (logo, title, hide) (#3710) 2026-05-07 10:17:53 +08:00
web-templates chore(release): v0.15.6 (#3766) 2026-04-30 15:59:35 +08:00
webui fix(core): address post-merge monitor tool and UI routing issues (#3792) 2026-05-04 21:19:41 +08:00
zed-extension chore(zed-extension): update package version to 0.10.0 2026-02-06 14:26:01 +08:00