You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filtering stays correct on large pull requests: files that GitHub loads later, diffs that GitHub virtualizes, and single file mode.
Acceptance criteria
Files that GitHub lists or loads after the first render are filtered without a reload, and the hidden count updates.
Diff blocks that GitHub removes and adds again while the user scrolls keep their state.
In single file mode the open file always stays visible. If it is a matching file, it shows Temporarily visible. The tree follows the tree filtering setting.
The extension's own injected nodes do not cause extra filtering passes.
End-to-end tests use the large pull request fixtures.
Finding from the fixtures (tests/fixtures/github/README.md, commit 49e302d):
800 small files (pr2-changes, pr2-changes-scrolled): the sidebar tree lists every file at once, the diffs render progressively, and rendered blocks stay mounted after scrolling.
About 150,000 lines (pr3-optimized): GitHub opens a view optimized for large pull requests, with Load Diff placeholders and a link to single file mode.
Single file mode is the URL ?mode=single (pr3-single-file, pr3-single-file-next). J and K move between files and change the URL hash to the new file's #diff-<sha256 of path> anchor, so the direct-link handling from Reveal hidden files from direct links #9 applies to this navigation.
Filtering stays correct on large pull requests. Diff entries are located inside GitHub's progressive-diffs-list and virtualized-diffs-list (the optimized view), and the hidden entry wraps the Loading placeholder that shares a file's #diff-<sha256> anchor. The hidden count always comes from the sidebar tree, which lists every file before the diffs render. A MutationObserver re-applies visibility when GitHub lists or renders more files, or removes and re-adds blocks, and it ignores mutations inside the extension's own nodes, so the page stays quiet after a pass. In single file mode (?mode=single) the open file counts as revealed: it stays visible with Temporarily visible, the hidden count excludes it, and the tree follows the tree filtering setting; J/K hash changes go through the direct-link handling from #9.
Tests (all on the large pull request fixtures):
PR 2 (800 files): 400 test files hidden from the complete tree; diffs rendered later (pr2-changes → pr2-changes-scrolled) filtered without a reload; blocks removed and re-created keep their state.
PR 1: files listed after the first render update the count (10 → 11) and get hidden.
PR 3 optimized view: 30 test files hidden; single file mode keeps migrations/001/up.sql visible with the label (299 hidden), and the next-file fixture with its #diff hash does the same for migrations/002/up.sql.
A MutationObserver sees zero mutations during a quiet second after filtering settles on PR 1 (with a reveal and tree hints) and PR 2.
Activity
ribeirogab commentedon Oct 2, 2026
Finding from the fixtures (
tests/fixtures/github/README.md, commit 49e302d):pr2-changes,pr2-changes-scrolled): the sidebar tree lists every file at once, the diffs render progressively, and rendered blocks stay mounted after scrolling.pr3-optimized): GitHub opens a view optimized for large pull requests, withLoad Diffplaceholders and a link to single file mode.?mode=single(pr3-single-file,pr3-single-file-next).JandKmove between files and change the URL hash to the new file's#diff-<sha256 of path>anchor, so the direct-link handling from Reveal hidden files from direct links #9 applies to this navigation.ribeirogab commentedon Oct 3, 2026
Filtering stays correct on large pull requests. Diff entries are located inside GitHub's
progressive-diffs-listandvirtualized-diffs-list(the optimized view), and the hidden entry wraps theLoadingplaceholder that shares a file's#diff-<sha256>anchor. The hidden count always comes from the sidebar tree, which lists every file before the diffs render. A MutationObserver re-applies visibility when GitHub lists or renders more files, or removes and re-adds blocks, and it ignores mutations inside the extension's own nodes, so the page stays quiet after a pass. In single file mode (?mode=single) the open file counts as revealed: it stays visible withTemporarily visible, the hidden count excludes it, and the tree follows the tree filtering setting;J/Khash changes go through the direct-link handling from #9.Tests (all on the large pull request fixtures):
pr2-changes→pr2-changes-scrolled) filtered without a reload; blocks removed and re-created keep their state.migrations/001/up.sqlvisible with the label (299 hidden), and the next-file fixture with its#diffhash does the same formigrations/002/up.sql.Commit: 57b2836.