Skip to content

[Bug]: scroll keeps jumping around, making the app very hard to use. #20

Closed

Description

@ksr-13

GUI version

0.1.8

Operating system

macOS (Apple silicon)

Reproduction steps

Perform any coding task which uses a decent number of tokens where the conversation is a few screens long.
Once scroll comes into play, the screen jumps automatically.
Meaning I'm never at the end of the conversation where I have typed new instructions. The box to type in prompt stays stationary, but the rest of the window (LLM response) jumps up and down. Making it almost impossible for me to read what the LLM had to say to my last prompt.
The jumping happens every time you scroll past a complete response of the LLM.
The down arrow button to take you to the end of the chat also does not bring you to the end of the chat in such scenarios.

Expected behavior

Smooth scrolling.
No jumps in scrolling.
If while scrolling you hit the bottom of the chat, the scroll shouldn't jump back up into middle of the chat.
If while scrolling you scrolled up to a particular response the scroll shouldn't jump around.
The down arrow should bring you to the bottom of the chat, and not cause the chat response to jump around randomly.

Actual behavior

Perform any coding task which uses a decent number of tokens where the conversation is a few screens long.
Once scroll comes into play, the screen jumps automatically.
Meaning I'm never at the end of the conversation where I have typed new instructions. The box to type in prompt stays stationary, but the rest of the window (LLM response) jumps up and down. Making it almost impossible for me to read what the LLM had to say to my last prompt.
The jumping happens every time you scroll past a complete response of the LLM.
The down arrow button to take you to the end of the chat also does not bring you to the end of the chat in such scenarios.

Screenshots, recordings, or sanitized logs

No response

Safety check

  • I removed credentials and private project information from this report.

Activity

  1. added
    bug
    on Aug 7, 2026
  2. self-assigned this
    on Aug 13, 2026
  3. aliarain commented on Aug 13, 2026

    @aliarain
    Collaborator

    We’ve shipped a bunch of feed pin/follow and long-session fixes since this report. Could you retest this on 0.1.11 with a long streaming session? I’m keeping it open until we know scrolling is actually stable.

  4. ksr-13 commented on Aug 14, 2026

    @ksr-13
    Author

    On 0.1.11, scroll up is a lot better. It's not jumping around as much anymore. I can scroll to the top of the conversation in very long conversations. Scroll to the bottom still jumps around. I cannot manually scroll to the bottom as it will hit a point where it will jump back up. The down arrow button does take you to the end of the conversation. I'm yet to test live responses being added at the end of the conversation.

  5. aliarain commented on Aug 14, 2026

    @aliarain
    Collaborator

    this is useful, thanks. glad the main scrolling behavior is much better now. I’m looking at the remaining case where scrolling near the bottom jumps back up, keeping this open until that’s gone too.

  6. claell commented on Aug 18, 2026

    @claell

    I also just experienced this issue on Windows.

  7. ksr-13 commented on Aug 23, 2026

    @ksr-13
    Author

    The scrolling issue is fixed for me on 0.1.18. Probably in the release before that.

  8. claell commented on Aug 27, 2026

    @claell

    Still there for me, although potentially slightly better now.

  9. claell commented on Aug 27, 2026

    @claell

    Actually, it's pretty bad. It is very hard to scroll down to the bottom. Doesn't matter whether I use the page up or page down keys or scrolling wheel. What sometimes helps is when the agent is still running, I can do the Ctrl + B combination to hide the left sidebar. Then it will go to the end. Or when the agent is finished, then I think there is a button to scroll down. So this is the current workaround that I use. But it's pretty broken as of now. And also switching through chats will kind of forget their last position. And when I go back into a chat, it will be somewhere in the middle and not at the end of the chat where I left off before.

  10. aliarain commented on Aug 27, 2026

    @aliarain
    Collaborator

    Thanks for the detailed report. This is P0 for me now. The Ctrl+B/sidebar behavior and chat position being lost when switching chats are especially useful clues. I’m looking into the scroll anchoring/state restoration and will get this resolved as soon as possible. Keeping this open until it’s stable on Windows too.

  11. claell commented on Aug 27, 2026

    @claell

    That's nice. Thank you for looking into it. I think that scrolling in general is not so easy to get right. I have seen this with the Element Matrix client. They still have problems. And sometimes one can make things worse with "fixes" like remembering scroll positions, etc., when not done right. I hope you will find a good fix. But I'll find my way around in the meantime.

    Keyboard navigation like #6, #10 are potentially big productivity wins to look at next for the future (and #19 of course, quick win for proper bug filing in this GitHub repo).

  12. aliarain commented on Sep 7, 2026

    @aliarain
    Collaborator

    Update: the chat surface was rebuilt in 0.1.28 (turn work fold, composer card) and the feed pin-to-bottom logic changed with it. @claell please retest the three cases you listed: scrolling to the bottom with wheel or Page Down while the agent runs, Ctrl+B no longer being needed to reach the end, and the position being restored when switching back to a chat. If any of the three is still wrong on Windows, please say which, and I will keep this at P0. @ksr-13 thanks for confirming it was fixed for you on 0.1.18.

  13. claell commented on Sep 12, 2026

    @claell

    Still not fixed for me (tested with every new release). It is a bit hard to describe and right now, I don't have time for a video. But I still can't reach the bottom of a message when just scrolling down. For example: Update the app, open it, then a chat gets loaded with the last message properly scrolled to the bottom. The I scroll up, and down again. I can't reach the bottom, anymore. Not sure whether I tried again with Page Down. But the software button to go to the bottom of the conversation still works as workaround.

  14. WolfWithoutDuck commented on Sep 16, 2026

    @WolfWithoutDuck

    Additional data from Windows on 0.1.30: the feed container's height itself transiently changes, and the browser then clamps scrollTop

    Environment

    • Command Code desktop 0.1.30 (current latest), Windows
    • Long single chat; large window — the feed scroller's clientHeight is 1389 CSS px
    • Measured on an unmodified install of 0.1.30 (no local patches)
    • Reproduces while merely wheel-scrolling down; the agent does not have to be streaming at the moment of the jump

    Reproduction

    1. Open a long chat (feed a few thousand px tall) and scroll up slightly so the feed is not pinned to the bottom.
    2. Wheel-scroll down.
    3. At some point the feed jumps upward by a large amount (2223 px in my capture) and stays there — you can no longer reach the bottom by scrolling. The "Jump to latest" button still works, same as @claell reported.

    What the observer sees

    Instrumenting the feed scroller ([data-virtuoso-scroller]) with a scrollTop setter patch + scrollTo/scrollBy/scrollIntoView/focus hooks, a scroll listener, and a requestAnimationFrame poll of clientHeight/scrollHeight (timestamps are performance.now()):

    43028.3 SCROLL 9858 -> 9969 | delta 111  | scrollHeight 11596 -> 11596 | clientHeight 1389 -> 1389
    43030.2 DOM-MUT 2 childList,attributes:style
    43031.1 LAYOUT clientHeight 1389 -> 1389 | scrollHeight 11596 -> 9134  | scrollTop 7746
    43035.5 SCROLL 9969 -> 7746 | delta -2223 | scrollHeight 11596 -> 11595 | clientHeight 1389 -> 1389
    43054.9 DOM-MUT 2 childList,attributes:style
    ```text
    43061.8 LAYOUT clientHeight 1389 -> 1389 | scrollHeight 9134  -> 14057 | scrollTop 7746
    43067.6 SCROLL 7746 -> 7747 | delta 1     | scrollHeight 11595 -> 11596 | clientHeight 1389 -> 1389
    43067.8 LAYOUT clientHeight 1389 -> 1389 | scrollHeight 14057 -> 11596 | scrollTop 7747
    

    43072.2 SCROLL 7747 -> 7858 | delta 111

    
    ### Interpretation
    1. The feed's `scrollHeight` **collapses to 9134 for ~30 ms, overshoots to 14057, then settles back to 11596**. This is the content height changing, not the user scrolling.
    2. During the collapse `maxScrollTop = 9134 − 1389 = 7745`, so the browser clamps `scrollTop` from 9969 → **7746**, which matches the jump exactly. Nothing in the app asks for that scroll.
    3. When the height recovers to 11596, `scrollTop` stays at 7747 — **≈2222 px of reading position is lost permanently**. Nothing restores it: `overflow-anchor` is `none` on `[data-virtuoso-scroller]` (so Chrome's native scroll anchoring cannot help), and the app's own recovery paths only re-pin while `atBottomState` is true.
    4. The two transient values are symmetric around the real one: `11596 − 9134 = 2462` and `14057 − 11596 = 2461` — i.e. exactly one item (~2461 px tall: a long turn / large tool-output block) appears to be dropped from, and then double-counted in, the virtualizer's size tree during a single re-measure.
    5. The only programmatic scrolls in the capture are Virtuoso's own size compensations — `scrollBy({behavior:"auto", top:144})` and `scrollBy({top:-144})` from `scrollByCallback`. So it compensates 144 px deltas while the actual swing is 2461 px. No `scrollTo`, no `scrollIntoView`, no focus-driven scroll, and no `scrollTop` write occurs at the moment of the jump.
    
    ### Relevant feed props on 0.1.30
    `followOutput`, `atBottomStateChange`, `atBottomThreshold: 48`, `increaseViewportBy: { top: 800, bottom: 800 }`, `totalListHeightChanged`, `initialTopMostItemIndex: { index: "LAST", align: "end" }`, `components: { Header, Footer }` (each a `<div class="h-6 sm:h-8">` spacer), `computeItemKey: (_, row) => row.id`, `scrollerRef`.
    
    There is **no `defaultItemHeight`, no `itemSize`, and no `heightEstimates`**, so any item that has not been measured yet falls back to the virtualizer's default estimate. For long turns (code blocks, tool output) that estimate is far below the real height, so a re-measure can move the size tree by thousands of px.
    
    ### Possible directions
    - **Preserve the scroll anchor across re-measures.** After `totalListHeightChanged`, if the height dropped and `scrollTop` was clamped while `isAtBottom` is false, restore `scrollTop` to its pre-change value (retrying for a few frames until the layout settles). That alone would make it possible to scroll to the bottom again.
    - **Give the virtualizer better height hints** (`defaultItemHeight` and/or `heightEstimates` for the last few turns) so the size tree doesn't swing as far.
    - **Separately (smaller, ~24–32 px):** every "go to bottom" path that uses `scrollToIndex({ index: "LAST", align: "end" })` stops at the last item's bottom rather than the container's bottom, landing one `Footer` spacer short. The `totalListHeightChanged` handler and the Jump-to-latest button use `scrollTop = scrollHeight - clientHeight` and therefore disagree with it. This looks like upstream petyosi/react-virtuoso#199 / #1071 / #1447.
    
    @claell's observation that hiding the sidebar (`Ctrl+B`) lets them reach the end fits this too: changing the width forces a re-layout/re-measure, and the position happens to land correctly afterwards.
    
    Happy to run further instrumentation (per-item `data-known-size` vs measured height, or Virtuoso's `logLevel` DEBUG) to pin down which item's size is being dropped.
    
  15. WolfWithoutDuck commented on Sep 16, 2026

    @WolfWithoutDuck

    这个问题对我来说仍然存在(每次新版本发布后都测试过了)。描述起来有点困难,而且我现在也没时间录视频。但我仍然无法通过向下滚动到达消息的底部。例如:更新应用后打开,聊天窗口加载完毕,最后一条消息也正确滚动到了底部。然后我向上滚动,再向下滚动,就再也到不了底部了。我不确定我是否尝试过使用 Page Down 键。不过,使用软件自带的滚动到对话底部的按钮仍然可以作为临时解决方案。

    Same here. I subscribed recently, installed the latest version, and after only a short while I can no longer scroll to the bottom. That makes the app effectively unusable for me, because I can't see the newest messages. It's been painful to work with.

  16. sakyii commented on Sep 18, 2026

    @sakyii

    这个问题对我来说仍然存在(每次新版本发布后都测试过了)。描述起来有点困难,而且我现在也没时间录视频。但我仍然无法通过向下滚动到达消息的底部。例如:更新应用后打开,聊天窗口加载完毕,最后一条消息也正确滚动到了底部。然后我向上滚动,再向下滚动,就再也到不了底部了。我不确定我是否尝试过使用 Page Down 键。不过,使用软件自带的滚动到对话底部的按钮仍然可以作为临时解决方案。

    这个问题对我来说仍然存在(每次新版本发布后都测试过了)。 描述起来有点困难,而且我现在也没时间录视频。 但我仍然无法通过向下滚动到达消息的底部。 例如:更新应用后打开,聊天窗口加载完毕,最后一条消息也正确滚动到了底部。 然后我向上滚动,再向下滚动,就再也到不了底部了。 我不确定我是否尝试过使用 Page Down 键。 不过,使用软件自带的滚动到对话底部的按钮仍然可以作为临时解决方案。

    Same here. I subscribed recently, installed the latest version, and after only a short while I can no longer scroll to the bottom. That makes the app effectively unusable for me, because I can't see the newest messages. It's been painful to work with.同样是这里,我最近订阅了,安装了最新版本,过了一会儿,我再也无法滚动到底部了。这使得该应用程序对我来说实际上无法使用,因为我看不到最新的消息。一起工作很痛苦。

    me too

  17. 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.

  18. 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

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions