Skip to content

[Windows Desktop] Preserve viewport position when reasoning/progress blocks collapse #37608

Open

Description

@jbellver

Environment

  • Application: Codex Desktop for Windows
  • Powered by: Codex & OWL
  • Version: 26.803.41515
  • Release date: August 7, 2026
  • Platform: Windows

Problem

While using the Codex Desktop app on Windows, the viewport unexpectedly shifts while I am reading a newly generated response.

A typical interaction is:

  1. Codex answers a question.
  2. I scroll down to read the complete response, ending up at the bottom of the conversation.
  3. I ask another question.
  4. The new response starts appearing roughly around the middle of the screen, which is a comfortable position for reading.
  5. I start reading the response while Codex continues generating it.
  6. Temporary reasoning/progress content above the answer is then hidden or collapsed.
  7. When that content disappears, the layout height changes and the viewport/scroll position is adjusted.
  8. As a result, the text I was reading suddenly moves vertically, usually leaving the current response much lower on the screen.

This makes it difficult to read Codex responses while they are being generated because the content can move unexpectedly.

Expected behavior

Collapsing or hiding reasoning/progress content above the current viewport should not change the visual position of the text the user is currently reading.

If content above the viewport changes height, Codex should compensate for that height difference and preserve the current reading position.

For example, the UI could preserve an anchor element and its viewport offset, or adjust scrollTop by the height removed when the reasoning/progress block collapses.

The important UX behavior is:

If I am reading a specific line of the response, that line should remain at approximately the same position on my screen when reasoning/progress content above it is collapsed.

Steps to reproduce

  1. Open Codex Desktop for Windows.
  2. Use a conversation long enough to require scrolling.
  3. Ask Codex a question.
  4. Scroll down and read the complete response until reaching the bottom.
  5. Send another question.
  6. Start reading the new response while it is still being generated.
  7. Wait for the temporary reasoning/progress content above the answer to be hidden or collapsed.
  8. Observe that the viewport shifts and the text currently being read changes position.

Actual behavior

The viewport moves when temporary reasoning/progress content collapses, interrupting the user's reading position.

Expected behavior

The viewport should compensate for layout changes above the visible area so that the content currently being read remains stationary.

Related

Possibly related to issue #32030, involving scroll-anchor recalculation when content changes height.

Activity

  1. added
    bug
    app
    windows-os
    on Aug 8, 2026
  2. github-actions commented on Aug 8, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. JohnnyCowabunga commented on Aug 9, 2026

    @JohnnyCowabunga

    I’m experiencing this exact issue as well with Codex for Windows. When the reasoning/progress content collapses, the viewport jumps and moves away from my current reading position.

  4. hui6900 commented on Sep 21, 2026

    @hui6900

    Reproduced on Windows with the current build, and traced the mechanism in the shipped renderer bundle. Posting because it changes what a fix has to touch.

    Environment: Windows 11 Pro (26200), Codex desktop 26.915.4065.0, app-provisioned runtime.

    1. Browser scroll anchoring is deliberately disabled. The transcript scroller is rendered with the compiled Tailwind utility .\[overflow-anchor\:none\]{overflow-anchor:none} (in webview/assets/app-shared-*.css) via the scroller's className, and the app also manipulates the property inline at runtime — there is code doing this.root?.style.removeProperty(\overflow-anchor`)`. So the browser feature that would normally hold the reading position is off by design and the app implements its own scrolling.

    2. There is an explicit "follow" state machine. In webview/assets/local-conversation-thread-*.js the view keeps followMode (user_follow / prework_follow / static / prework_watch) plus latest_turn_* transitions, and calls F.scrollToDistanceFromBottomPx(0, 'instant') when it decides it should be following. The height-delta compensation it applies on content changes only runs when Math.abs(delta) > 24 px.

    3. The obvious hypothesis was tested and does not explain it. I rebuilt the app from the Store MSIX, changed that single CSS declaration to overflow-anchor:auto (equal-length byte patch, plus re-syncing that file's integrity hash in the asar header), registered it as a separate package in developer mode, and verified the patched stylesheet is what the app loads. The jump is unchanged. So the movement is not "missing browser anchoring"; it is the app's own programmatic scrolling restoring the position it believes the user wants.

    What a fix would probably have to change: the follow logic — stop force-scrolling while the user has scrolled away (or re-anchor on content-height changes in the non-following modes) — rather than re-enabling CSS scroll anchoring.

    Repro notes: any response that streams long enough to produce reasoning/progress blocks; scroll up while it streams; the viewport is pulled back down when those blocks collapse. Happy to test a patched build on that path if useful.

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

    appbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions