Codex Desktop: sticky code-block header leaves code visible above it while scrolling
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.831.21537 (build 7579), read from the installed desktop app's bundle metadata at report time. Bundle identifier: com.openai.codex.
What subscription do you have?
Not specified.
What platform is your computer?
macOS 26.3.1 (a), build 25D771280a.
What issue are you seeing?
The sticky header/toolbar of a fenced code block is positioned incorrectly when scrolling a conversation in the Codex desktop app.
In the observed state, the top of a code block has scrolled out of view and its header (the language label “纯文本” / plain text, wrap control, and copy control) is pinned near the top of the conversation. However, several code lines remain visible above that pinned header, extending into the top window/title-bar region. The header also overlays the body of the same code block. This makes the header appear as a floating strip partway through the code, instead of forming a clean top boundary for the visible code content.
The user supplied an annotated screenshot highlighting this header. In that screenshot, the header is roughly 50 px below the top of the window, with code text visibly rendered above it and more code below it. This report describes that screenshot; the behavior has not been independently reproduced by the reporting assistant.
Impact: reading code while scrolling is confusing, and the relationship between the toolbar and the code it controls is visually broken.
What steps can reproduce the bug?
Observed interaction:
- Open a conversation in the Codex desktop app that contains a response with a multiline fenced code block.
- Scroll down through the conversation until the code block's original top has moved above the visible conversation area, while its remaining lines are still visible.
- Inspect the code block header as it becomes sticky near the top of the window.
- Observe code lines above the pinned header, in addition to the code below it.
Suggested minimal content for verification (not yet independently tested): ask the assistant to return a plain-text fenced code block containing numbered lines 01–80, followed by a paragraph and another short fenced block. Scroll the first block past the top of the conversation and inspect the header and clipping at the top edge.
What is the expected behavior?
The code block header should pin to the intended top boundary of the conversation's visible content area. Code scrolling behind the header should be clipped or occluded correctly, so that stray code lines do not appear above the header or inside the window's title-bar region.
The header should remain visually associated with its own code block and leave with that block when it scrolls out of view.
Additional information
- Observed in the Chinese UI with the light theme.
- The supplied screenshot contains multiple plain-text code blocks in one response.
- Reproduction frequency and the first affected version are unknown.
- Possibly related: #20593 concerns the copy button no longer staying sticky. This report concerns a header that does remain visible but has incorrect positioning/clipping. A shared cause has not been established.
- The original screenshot includes unrelated private conversation and sidebar content, so it is described here rather than attached to this public issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the Codex desktop app with a multiline plain-text fenced code block, then scroll it past the top of the conversation and inspect the sticky header and clipping. Done means the header stays at the intended content boundary, code does not appear above or through it, and the header leaves with its code block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100