Skip to content

upstream port: bound SubAgent display by visual height (#3721) #193

@mabry1985

Description

@mabry1985

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestupstream-portBackport from QwenLM/qwen-code upstream

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions