Skip to content

CLI shell scroll flicker on Windows Terminal / PowerShell #309

Closed

Description

@jongio

Problem

The Squad interactive CLI shell exhibits severe scroll flicker when running in Windows Terminal and PowerShell. The terminal output constantly scrolls and jumps, making the CLI unusable for interactive sessions.

Root Cause

The Ink (React for CLIs) v6.8.0 rendering pipeline has ~16 unsynchronized animation re-renders per second from 6 independent sources, each triggering a full terminal repaint:

Source Component Interval Re-renders/sec
Spinner animation InputPrompt.tsx 80ms 12.5
PulsingDot animation AgentPanel.tsx 500ms 2.0
Elapsed time tick AgentPanel.tsx 1000ms 1.0
Elapsed time display MessageStream.tsx 1000ms 1.0
Unstable Static keys App.tsx per render amplifier
Undebounced resize terminal.ts per event burst

Additionally:

  • Unstable <Static> keys (array indices) cause Ink to re-render the entire scroll buffer when new items are inserted, shifting all indices
  • Live region height toggling between 100% and explicit height causes layout jumps
  • Undebounced resize handlers fire rapid bursts of re-renders during terminal resize

Additional Issues Found

During investigation, three pre-existing test failures were discovered:

  1. test/marketplace.test.ts — Uses /nonexistent as a guaranteed non-existent path, but on Windows Node.js resolves this to D:\nonexistent (root of current drive), which can exist
  2. scripts/bump-build.mjs — Produces 4-part versions like 0.8.25.4 for non-prerelease builds, which npm rejects as invalid semver during npm install of packed tarballs
  3. test/cli-packaging-smoke.test.ts — Fails because the full test suite triggers prebuild which mutates package.json versions via bump-build.mjs

Environment

  • Windows 11 + Windows Terminal + PowerShell 7
  • Node.js 22.x
  • Ink v6.8.0, React 19
  • Squad CLI v0.8.25

Activity

  1. added a commit that references this issue on Mar 10, 2026
  2. bradygaster commented on Mar 10, 2026

    @bradygaster
    Collaborator

    Triage: Windows Terminal scroll flicker from unsynchronized Ink animations (~16 renders/sec). Also found 3 pre-existing test failures. P1 — blocks Windows CLI usability. @inco owns TUI rendering; other failures need triage.

  3. github-actions commented on Mar 10, 2026

    @github-actions
    Contributor

    📋 Assigned to INCO (CLI UX & Visual Design)

    Issue: #309 — CLI shell scroll flicker on Windows Terminal / PowerShell

    INCO will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    INCO, work on issue #309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions