Diff review: staging a long file preserves scroll offset, causing next file to open mid-file (can skip small diffs)
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.217.1959 (669)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
When reviewing changes in the Codex App code diff view, if a file has a large diff and I scroll near the bottom to review the last hunks, then click “Stage file” in the file header action bar, the file is staged and the UI advances to the next file.
However, the scroll position is not reset after staging. The next file opens at roughly the same scroll offset (somewhere in the middle), as if the scroll space from the previously-reviewed long file is still applied. If the staged file was very long and the next files have small diffs, the view can jump past one or more files, making it easy to miss reviewing a file entirely unless I manually scroll back to the top.
This feels like the diff view is using a single scroll container and keeps scrollTop after the staged file collapses/removes, instead of snapping to the top of the next file.
What steps can reproduce the bug?
- Open Codex App and go to a set of changes (PR/branch/working tree) with multiple modified files.
- Open diff view for a file that has many changes (long diff).
- Scroll all the way down near the last diff hunks.
- Click “Stage file” in the file header action bar.
- Observe the next file shown after staging.
Result: the next file is displayed mid-file (not at the beginning). In some cases it appears to skip over files (e.g., landing on the 2nd/3rd next file) when the remaining diffs are small.
What is the expected behavior?
After staging a file in diff view:
- The UI should advance to the next unstaged file (or next file in the list),
- And the diff view should start at the top of that next file (scroll position reset to the beginning),
- Without skipping over any files due to preserved scroll offset.
Additional information
_No response_