qwen-code/packages/cli
C0d3N1nja97342 82ba1d3e2d
fix(cli): keep exit_plan_mode plan visible inside the pending viewport clamp (#6867) (#6882)
* fix(cli): keep exit_plan_mode plan visible inside the pending viewport clamp (#6867)

The exit_plan_mode confirmation dialog rendered its plan body via
MarkdownDisplay with isPending={false}, which skipped fitPendingSlice.
The full plan then rendered inside MainContent's maxHeight +
overflow="hidden" wrapper (re-added by #6421 as an Ink backstop for the
scroll-to-top lock), and Ink clipped the bottom — silently dropping the
tail of a long plan and, in narrower terminals, the option buttons.

Add an opt-in enforceHeightBudget flag on MarkdownDisplay so callers
that render inside a bounded parent can share the streaming path's
rendered-height slice. Pass enforceHeightBudget from
ToolConfirmationMessage's plan body. Committed non-pending renders
(transcript, tool result markdown, PlanSummaryDisplay) keep the default
uncapped behavior.

Fixes #6867

* fix(cli): render truncation cue when exit_plan_mode plan is clipped

Address bot review on #6882: when `enforceHeightBudget && !isPending`
and the pre-slice actually dropped lines, render a dim single-line cue
naming the count of dropped source lines. Without a visible cue, a
model-authored plan could hide dangerous steps past the viewport budget
and users would approve them blind — the streaming path deliberately
omits the cue because the tail is still on its way, but a complete plan
inside the confirmation dialog has no such promise.

The cue is gated so it only appears in the exact scenario it's needed:
enforceHeightBudget on (only exit_plan_mode opts in today), non-streaming,
and something actually got dropped. Three regression tests pin each gate.
2026-07-15 01:02:28 +00:00
..
src fix(cli): keep exit_plan_mode plan visible inside the pending viewport clamp (#6867) (#6882) 2026-07-15 01:02:28 +00:00
index.ts fix(cli): add bootstrap fast paths (#6188) 2026-07-02 22:28:11 +00:00
package.json chore(release): v0.19.10 (#6855) 2026-07-14 05:12:22 +00:00
test-setup.ts feat(serve): persist dynamic workspace registrations (#6716) 2026-07-11 16:49:40 +00:00
tsconfig.json feat(channels): add WeCom intelligent robot channel (#6436) 2026-07-07 15:24:19 +00:00
vitest.config.ts feat(cli): Add runtime daemon channel control (#6741) 2026-07-13 02:53:27 +00:00