Refactor AgentExecutionDisplay to derive maxHeight and tool-call display budgets from assigned availableHeight instead of hard-coded 5. Eliminates flicker churn from width-driven refreshStatic() calls. Adds a shared sliceTextByVisualHeight() utility and a regression test using a measure-flicker harness.
Upstream PR
Why
Our flicker fixes (#125, #127) covered the foundation, but QwenLM#3721 is the targeted finish on AgentExecutionDisplay specifically. Today we still have hardcoded budgets and width-driven re-renders that cause subagent panel jitter under load.
Scope / effort
Medium. Per prior investigation:
- 8 files:
AgentExecutionDisplay.tsx/test.tsx, AppContainer.tsx, textUtils.ts, plus new scripts/measure-flicker.mjs and an integration-tests/terminal-capture/subagent-flicker-regression test.
AgentExecutionDisplay is actively maintained in our fork (last touched Apr 13 for naming refactor) — moderate conflict.
- The new
sliceTextByVisualHeight() exists in ToolMessage already; refactor lifts it to textUtils.
AppContainer.tsx is heavily diverged.
Especially valuable supplementary content: the measure-flicker.mjs script and integration test give us an automated regression catcher for future flicker work.
Prerequisites
None directly, but cleanest after recap polish (#183) and QwenLM#3667 (#184) so AppContainer has fewer in-flight diffs.
Links
Refactor
AgentExecutionDisplayto derivemaxHeightand tool-call display budgets from assignedavailableHeightinstead of hard-coded 5. Eliminates flicker churn from width-drivenrefreshStatic()calls. Adds a sharedsliceTextByVisualHeight()utility and a regression test using a measure-flicker harness.Upstream PR
fix(cli): bound SubAgent display by visual height to prevent flickerWhy
Our flicker fixes (#125, #127) covered the foundation, but QwenLM#3721 is the targeted finish on AgentExecutionDisplay specifically. Today we still have hardcoded budgets and width-driven re-renders that cause subagent panel jitter under load.
Scope / effort
Medium. Per prior investigation:
AgentExecutionDisplay.tsx/test.tsx,AppContainer.tsx,textUtils.ts, plus newscripts/measure-flicker.mjsand an integration-tests/terminal-capture/subagent-flicker-regression test.AgentExecutionDisplayis actively maintained in our fork (last touched Apr 13 for naming refactor) — moderate conflict.sliceTextByVisualHeight()exists inToolMessagealready; refactor lifts it totextUtils.AppContainer.tsxis heavily diverged.Especially valuable supplementary content: the
measure-flicker.mjsscript and integration test give us an automated regression catcher for future flicker work.Prerequisites
None directly, but cleanest after recap polish (#183) and QwenLM#3667 (#184) so AppContainer has fewer in-flight diffs.
Links