Skip to content

[Bug]: Conversation feed stutters and bounces back while streaming (macOS, arm64 desktop) #146

Closed

Description

@ioapan

Summary

While a response is streaming, the conversation feed scrolls with heavy stutter / dropped frames, and scrolling up with the mouse bounces back to the newest content — so long streamed outputs can't be read in real time. Idle scrolling is fine; this only happens while tokens are arriving.

Environment

  • Command Code desktop 0.1.54 (auto-updated from 0.1.53 while testing — not fixed in 0.1.54)
  • macOS 27.0 (build 26A428)
  • Apple M1 (8-core); built-in Retina display 4480 x 2520 at native scaling, single display
  • App is native arm64 (Mach-O thin (arm64); sysctl.proc_translated = 0)
  • GPU acceleration on — helper runs as Command Code Helper --type=gpu-process

Steps to reproduce

  1. Open a session with a large transcript (observed around 3 MB / ~500 entries).
  2. Send a prompt that produces a long streamed response.
  3. While tokens are still arriving, scroll up with the mouse/trackpad.

Result: the feed stutters and snaps back to the bottom; earlier lines can't be read.

Expected

  • Scrolling stays smooth while streaming.
  • Scrolling up detaches from the auto-follow instead of bouncing back.

What was ruled out

  • Rosetta / translation — app is native arm64. It was previously running the Intel build; switching to the Apple-Silicon build did not fix this streaming scroll stutter.
  • Software rendering — GPU process is present and GPU-compositing flags are active on the renderer.
  • Non-native display scaling — display is at its native mode.
  • A settings workaround — the config registry exposes no scroll / auto-follow / transcript-render option.
  • A newer version — 0.1.54 is current.

Likely suspect

Helpers are launched with --disable-features=...,DropInputEventsWhilePaintHolding,.... With that feature disabled, input events aren't shed while a paint is held, so scroll input queues during heavy streaming repaint — which matches the reported "scroll up and it bounces back" behavior.

Requests

  • Add a scroll-follow toggle, or detach auto-follow as soon as the user scrolls up.
  • Consider disabling elastic overscroll for the feed (overscroll-behavior: none).
  • Consider re-enabling DropInputEventsWhilePaintHolding.
  • Investigate repaint/relayout cost for large transcripts while streaming.

Diagnostics

  • During streaming the renderer is the hot process; on the pre-arm64 (Intel) build the main process spiked to ~100% CPU.
  • No crash reports for the app; the ~/.commandcode data directory is small (no obvious leak).
  • Trace ids (for support): 99e8f6007c859816e280fac896c81bad, d0da42a640d1a24a1b6d1a1c7dcb2588

Activity

  1. 15844229646 commented on Oct 19, 2026

    @15844229646

    window 也存在这个问题

  2. catchem88 commented on Oct 21, 2026

    @catchem88

    +1 this is quite annoying

  3. added
    p1
    on Oct 22, 2026
  4. self-assigned this
    on Oct 22, 2026
  5. aliarain commented on Oct 27, 2026

    @aliarain
    Collaborator

    Thanks for the detailed report. We fixed both parts: scrolling up while a reply streams now stays where you put it, and each streamed word costs far less to draw, so scrolling stays smooth in long chats. This ships in an upcoming release. If you still see it after updating, please let us know.

  6. aliarain commented on Oct 28, 2026

    @aliarain
    Collaborator

    The bounce back while streaming is fixed for the next desktop update. We’re also working on the stutter. Please update when it lands and tell us if it still happens

  7. magicprinc commented on Nov 25, 2026

    @magicprinc

    Still reproducing on Windows 10 Home 22H2 (build 19045.6456) with Command Code Desktop 0.1.63.

    With the feed pinned to the very bottom, the chat view shakes up and down continuously while a reply streams. Nudging the viewport up by one wheel step makes it stop, so the viewport sitting exactly at the bottom is the only variable. Detailed reproduction and the two-way-correction hypothesis are in #174.

    This is terribly annoying. Reading the newest output during a long turn turns into a constant fight with the viewport, and it is the most disruptive thing I hit in daily use.

    Please fix this. I can test a candidate build and send per-frame scroll-position instrumentation if that helps.

  8. magicprinc commented on Nov 25, 2026

    @magicprinc

    Static read of the shipped 0.1.63 renderer bundle (Windows 10 Home 22H2, build 19045.6456) — the full breakdown with symbols is in #174. Short version, all grep-able in resources/app/out/renderer/assets/workspace-screen-DGk5kgiH.js:

    • Virtuoso's own follow is hard-disabled (bre=()=>!1); tail-follow is a custom rAF loop in totalListHeightChanged that advances ~27% of the remaining distance per frame (tre, e - e*(1-exp(-3*dt/150))).
    • A second path (_t) calls scrollToIndex({index:'LAST', align:'end'}) on feed row-count change and on the composer ResizeObserver. It targets the last item's end, which is 24-32 px short of the container bottom (the Footer spacer), while the follow loop targets scrollHeight - clientHeight. Snap up, eased return down, repeated while streaming — the up/down shaking.
    • Upward item-resize compensations are dropped on purpose: scrollBy is patched to discard negative offsets unless a pointer/touch/pin-break happened within 300 ms (Gp=300).
    • prefers-reduced-motion is never consulted on this path, so Reduce Motion changes nothing.
    • isFeedScrollHoldEnabled is called by the renderer but does not exist in out/preload/index.js, so the flag is undefined and the hold mode is always on.

    Please fix the pinned-to-bottom path — it is the most disruptive thing in daily use.

    @aliarain @ahmadawais

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

Metadata

Metadata

Assignees

Labels

p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions