Repository navigation
Agent suggestions
Public previewDescription
The problem
When many files are modified in bulk by an external tool (in my case a coding agent writing across the repo while Desktop is open), the Changes list allocates the right number of rows but renders almost all of them blank. The blank rows aren't clickable — only the row that renders text responds.
This is the symptom #22497 describes ("the correct number of rows are allocated, but cells don't render their content"), but that fix shipped in 3.6.3 and I'm seeing it on 3.6.3.
The data is fine — only the rendering is wrong:
| Count | |
|---|---|
git status --porcelain |
13 |
| Desktop's "N changed files" header | 13 |
| Rows that actually render content | 1 |
Two details that may help narrow it down:
- The single row that renders is the last entry in
git statusorder, drawn at the bottom of the pane. Row positions are correct; the content isn't drawn. - The diff pane was showing
phpstan.neon(the 4th entry), so selection state is also correct — that row simply renders blank.
Resizing the window fixes it immediately. Switching to History and back does not. That distinction seems like the useful one: an ordinary re-render doesn't repair it, only whatever the resize path recomputes.
Distinct from #22596, which reports files genuinely missing from the list (count disagrees with git status). Here the count is right and only the cells fail to paint, so I don't think they're the same bug — happy to be told otherwise.
Release version
3.6.3
Operating system
macOS 26.5.2 (Darwin 25.5.0), Apple silicon
Steps to reproduce the behavior
- Open a repository in Desktop.
- Have an external tool modify a dozen or so files in quick succession (a coding agent, a codemod, a bulk find-and-replace — anything writing many files rapidly).
- Look at the Changes tab.
- Observe the header reports the correct file count, but most rows are blank and unclickable.
- Switch to History and back — still blank.
- Resize the window — all rows render correctly.
Log files
No response
Screenshots
The Changes pane reads "13 changed files" with a single rendered row sitting at the bottom of an otherwise empty list, while the diff pane shows a different file entirely.
Additional context
Related: #22497 (same symptom, fix shipped in 3.6.3), #22596 (different symptom, same trigger).
Activity
desktop-triage commentedon Jul 28, 2026
Suggesting
bug+priority-2: the report describes a rendering regression where Changes list cells fail to paint after bulk external file writes on 3.6.3, despite #22497 targeting the same symptom — the row count is correct but content is blank until the window is resized, which is a clear broken-behavior bug with a workaround. The issue is distinct from #22596 (missing files, wrong count) and is not a duplicate of any other open issue.francisrath commentedon Jul 28, 2026
I spent a while trying to reproduce this synthetically and couldn't, so posting the negative results and what I did learn — hopefully it narrows things for whoever picks it up.
Couldn't reproduce with any of these
Fresh repo, 49 files across six directories, GitHub Desktop 3.6.3 on macOS. In every case the Changes list rendered correctly:
How coding agents actually write files
This may be relevant since both this and #22596 involve an agent. Claude Code's file writes (both its whole-file and partial-edit paths, which are mechanically identical) look like this:
<file>.tmp.<pid>.<hex>inside the same directory, then renames it over the target. The temp file lives inside the repo, sogit statuswould briefly see an untracked file.changefor an ordinary in-place write.Also worth noting, because it surprised me and it invalidates "bulk write" as a mental model: the writes are sequential, roughly 2–3 seconds apart, even when the agent issues them together. Ten files took 23 seconds. So an agent session is a slow drip sustained over minutes, not a burst — the accumulated list grows one row at a time over a long period.
Behaviour when it does happen
From the original report:
git status) and rows were allocated — only the cell contents failed to draw, and blank rows weren't clickable.That last point seems like the most useful clue. #22497 added
recomputeGridSize()on the root grid plusforceUpdate()on the section grids, but only when!hasEqualRowCount— so it's scoped to row-count changes, and the section grids get a re-render rather than a size recompute. Given that a resize repairs it and a re-render doesn't, the difference between those two paths seems worth a look.I don't have a reliable enough reproduction to attempt a fix myself.
francisrath commentedon Aug 17, 2026
I have a deterministic repro and a fix that resolves it, and it turns out my original report had the premise wrong: the rows aren't rendering blank, they're not being rendered at all. Only one cell element exists in the DOM. Details below, but the repro is the useful part:
Repro (5/5 on 3.6.3, macOS)
The header shows the right count, and exactly one row renders — the last one, at the bottom of an otherwise empty pane. Resizing the window repairs it; a History round trip does not.
Step 2 is the necessary ingredient. Running the identical sequence without scrolling first renders correctly every time — I ran that as a control. Row counts don't matter: 60→5, 40→3, 80→12 and 30→2 all failed identically, and the untouched control passed.
Script that automates the above (macOS)
Launch Desktop with
open -a "GitHub Desktop" --args --remote-debugging-port=9222, open the repo you want to use, thennode repro-22619.mjs /path/to/that/repo. It only creates and deletes files inside<repo>/ghd-repro-tmp. On 3.6.3 it printsheader says "5 changed files", rows rendered: 1.What's actually happening
Reading React's state out of the running app at the moment of failure (60 files scrolled to the bottom, then shrunk to 5):
state.scrollTopscrollTopprop= sectionHeightexactly (5 rows × 29px)top: 116pxscrollTopToggling only that one value on the live list flips the symptom back and forth:
scrollTop = 0→ all rows render;= 9999→ one row;= 0→ all rows. Nothing else changes.Same signature as the in-the-wild capture I hit earlier, sampled at 8, 12, 15, 16 and 17 files: content height always exactly
rowCount × 29, always one cell, always indexrowCount - 1attop = (rowCount - 1) × 29, always zero blank cells.Cause
section-list.tsx:1371-1374clamps the per-section offset to the section's total content height instead of tosectionHeight - visibleHeight:So a stale
state.scrollTopyieldsrelativeScrollTop === sectionHeight. react-virtualized 9.22.6 then clamps that through_findNearestCelltocellCount - 1, andgetVisibleCellRange's loop can't advance past the end —start = stop = lastIndex.overscanRowCount={4}adds nothing, since overscan only runs in the scroll direction.How the offset survives:
SectionList.onScroll(:1783) stores whatever it's handed, unclamped, and the root grid is controlled viascrollTop={this.props.setScrollTop}(:1495). react-virtualized'sgetDerivedStateFromPropscopies a changedscrollTopprop into state without clamping againsttotalRowsHeight— only the DOM_onScrollhandler clamps — then firesonScrollwith that unclamped value. Andrepository.tsx:270-273suppliessetScrollTopfrom the savedchangesListScrollToponly on the History → Changes transition.That's why step 3–5 is required: the offset is re-injected after the list shrank, into a grid that is no longer scrollable (
overflowY: hidden), so no DOM scroll event can ever fire the one clamp that exists.onScrollthen re-saves the bad value, so it persists across further tab switches. The fake-scroll path that could otherwise resync is__WIN32__-only, so macOS/Linux have no escape hatch.This also inverts the clue from my earlier comment: History-and-back isn't a failed repair, it's the injection path.
Not just cosmetic
The files are real and all staged: in my original screenshot the header reads "17 changed files" with select-all checked and the button reads "Commit 17 files", while 16 of them have no row on screen. You can commit files you can't see, and can't uncheck one you didn't want — there's no row to click. Possibly worth more than
priority-3.Suggested fix
Clamp to the maximum scrollable offset:
const sectionHeight = this.getSectionHeight(section) const offset = this.getSectionScrollOffset(section) + const visibleHeight = Math.min(sectionHeight, height) const relativeScrollTop = Math.max( 0, - Math.min(sectionHeight, this.state.scrollTop - offset) + Math.min(sectionHeight - visibleHeight, this.state.scrollTop - offset) )I built this and re-ran the identical script against both builds:
The stale offset is still injected on the patched build —
changesListScrollTopread 1319, 739, 1899 and 449 before each transition — so the clamp is doing the work, not some side effect of the rebuild.Scrolling still tracks correctly with the clamp in place. On a 60-row list in a 421px viewport: offset 0 draws rows 0-18, 400 draws 13-32, 900 draws 31-49, and the bottom draws 45-59 ending on the true final row.
Clamping in
SectionList.onScrollbeforesetStatewould additionally stop the bad value being persisted and replayed, though it isn't needed to fix this.I checked whether the History list has the same defect, since
commit-list.tsxpassescompareListScrollTopintoListthe same way and its only reset (scrollCompareListToTop) fires just on branch-created-from-commit. It doesn't reproduce: planting a stalecompareListScrollTopand going Changes → History still renders every commit. The likely reason is that the commit list mounts empty while commits load, so it passes throughrowCount === 0, which react-virtualized explicitly zeroes the scroll offset for.SectionList's root grid never does, since itsrowCountis the number of sections rather than the number of files.I added a case to
section-list-scroll-test.tsxalongside the existing #22387 one: render aSectionListwith asetScrollToplarger than its content and assert every row renders. It fails without the fix (expected all 5 rows to render, got 1) and passes with it.app/test/unit/uiis 166/166.One aside for anyone else running the suite locally: on Node 25+ every test that imports
SectionListdies withCannot read properties of undefined (reading 'getItem')fromupdate-store. Those versions definelocalStorageinglobalThisbut leave itundefinedunless--localstorage-fileis passed, soglobal-jsdomtreats it as already present and jsdom's real one never lands. On the pinned Node 24.15.0 it's fine.One aside for anyone scripting this
Desktop only re-reads the working tree on a window focus transition, so an automated repro needs to defocus and refocus the window after changing files. By hand this happens naturally.
francisrath commentedon Aug 20, 2026
If you got time for it, have a look here also @niik - this one might actually be a bit worse than my first post suggested. You can end up committing loads of changes you don't actually see before it's committed. It has happened quite a few times in the last few weeks for me, and I think I finally nailed the repro on this one. I have PR draft ready for review if you want it.
crea7or commentedon Oct 3, 2026
It rarely appears and can be fixed only by the app restart (minimizing, switching tabs does not help).
francisrath commentedon Oct 3, 2026
I have a proposed fix that took me quite some time to nail down, but I'm pretty sure it solves it: #22741 - however, I already have an open PR in this repo and I can't submit this one before that merges. Hopefully soon 😅
francisrath commentedon Oct 13, 2026
Could a maintainer add the
help wantedlabel to this issue?I have a tested fix ready in #22741. It's a draft for now because I already have a PR open in this repo, and I'll take it out of draft as soon as that one merges. It includes a unit test that reproduces this on current
development(one row rendered out of five) and passes with the fix.