qwen-code/packages/cli
wenshao 93036b1d04 refactor(cli): split LiveAgentPanelBody + drop dead isPending/isWaitingForOtherApproval props
Two structural reviews from deepseek-v4-pro via /review:

1. **Hook-order footgun.** The `if (dialogOpen) return null` guard
   sat between the hook block and a substantial block of pure-render
   code; an extension that added `useMemo`/`useRef`/`useCallback`
   below the guard would crash with "Rendered fewer hooks than
   expected" the next time `dialogOpen` toggled. Extract the pure-
   render logic into `LiveAgentPanelBody` so the guard becomes the
   parent's last statement, and any future "add a hook to the body"
   refactor naturally lands in the inner component (hook-free
   today, hook-free for as long as it stays a presentational FC).

2. **Dead pass-through removed.** `isPending` and
   `isWaitingForOtherApproval` were dead in the subagent renderer
   (LiveAgentPanel + BackgroundTasksDialog own that surface) but
   ToolGroupMessage still computed `isWaitingForOtherApproval` and
   forwarded both into ToolMessage. Drop them from
   `ToolMessageProps`, drop the computation + forwarding in
   ToolGroupMessage, drop the test factory references. ToolGroupMessage
   keeps `isPending` on its own props for upstream caller compatibility
   (HistoryItemDisplay et al. forward it) but stops destructuring
   it; the doc comment now points at the surfaces that own that
   gating today.

Coverage: existing 115 cases across LiveAgentPanel /
BackgroundTasksDialog / BackgroundTasksPill / ToolMessage /
ToolGroupMessage all green; the panel split is purely structural
and the dead-prop removal was verified TS-clean before commit.
2026-05-07 19:49:03 +08:00
..
src refactor(cli): split LiveAgentPanelBody + drop dead isPending/isWaitingForOtherApproval props 2026-05-07 19:49:03 +08:00
index.ts fix(cli): stop double-wrapping and double-printing API errors in non-interactive mode (#3749) 2026-05-03 08:39:31 +08:00
package.json chore(release): v0.15.6 (#3766) 2026-04-30 15:59:35 +08:00
test-setup.ts fix: prevent bogus shell permission rules in tests 2026-03-20 17:55:33 +08:00
tsconfig.json Add background agent resume and continuation (#3739) 2026-05-01 12:14:33 +08:00
vitest.config.ts refactor(core): Unify package exports and improve dev experience 2026-02-01 11:59:05 +08:00