Repository navigation
Unfold or fold every file of the Code tab from one row - #74
Conversation
The row under the count reads Expand all files while every file is folded and Collapse all files once any shows unfolded, as the desktop's toolbar button does. It sets one fold for every file and forgets each file's own, so files from later slices follow it, and another diff picked starts folded again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mutations showed the row could turn grey unnoticed, and that all_folded's check for no files never changes what shows: the row and Enter both need files first. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…7e50cd Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… again after a theme change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… page recipe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…043b63 and the fixes and recipes under it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row under the count pushes each file down one row and adds a stop for ↓, so the recipe counts the toolbar's rows in TB. The new section folds and unfolds every file with Enter and with a click, keeps a file folded after through a refresh, has the second slice follow the row, and checks that a picked commit starts folded. It also takes #70's viewed-fail race fix from the viewed-files branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds fail from its first open in the Code recipe The fold-all branch already held the same change, so the tree stays as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine count at the highest line number Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS+NOTES for head
Regression sweep: 13 of 13 recipes passed on both the parent and head. The parent sweep reuses the run for the identical dd84318 binary and recipes in Tests: independent Findings: no new product finding. Notes: Master 7ae927b recipes were also run against both binaries. Its CLI recipe stops at
Binaries are Evidence: |
The trip that reads no marks has to come back within 15 s of their first read. The whitespace steps sat inside that span, and on a macOS runner on CI the trip came back after 19 s, so t3term read the marks again and the recipe failed at its check on #76, #77 and #79. The trip now comes right after the second slice, as on #73 and #74, and a gotcha keeps later steps out of the span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a run while the file's text is read and brings #68's fix that lays review threads out again when the theme changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…comments out again when the theme changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS+NOTES for head
Regression sweep: 13/13 own recipes passed on the parent and head. The parent run reuses the identical binary and recipes under Rules: every positive drive and recipe passed its live check and its check after Patch review: compared the source additions and deletions against round 1's parent CI: macOS, E2E smoke (macOS), Linux build and Greptile all passed on this exact head. Greptile has no review thread or new finding. The Code feature file is updated. Findings: no new product finding. Notes: a connection capture caught the feed just before its reconnect word drew, while the thread already showed the protocol error. Repeating the same recipe on both builds gives identical captures and RPC counts. A Summary capture also caught the conversation's delayed reviewer rows at different times; fresh paired settled captures and requests match. See Master
Every newly built head printed Evidence: |
Adds the desktop's Expand all files and Collapse all files button to the Code tab, as a row under the count.
⇊ Expand all fileswhile every file is folded, and⇈ Collapse all filesonce any file shows unfolded. Enter or a click unfolds every file or folds them all, and the status line saysEnter expand all filesorEnter collapse all files.TB(7712fa5).Stacked on #73.
Both come from the fixture server, with #7's invented diff at 120x40.
r refreshleaves the second status line becauseEnter collapse all filesis two characters longer and the line has no room for it, as the status line already dropsrfirst.Decision log
What I noticed. docs/pull-request-panel.md listed the desktop's fold-all toggle among what the Code tab lacked. Reading a change file by file meant one Enter per file.
How I confirmed it. In the pinned T3 source (f570bd2):
Expand all fileswhile every file is collapsed andCollapse all filesotherwise (apps/web/src/components/pullRequest/PullRequestCodeTab.tsx:1239-1258). "Every file is collapsed" isareAllDiffFilesCollapsed, which is false for no files (apps/web/src/lib/diffCollapse.ts).expanded,foldedor none, on top of thediffFilesCollapsedsetting, plus the keys of files toggled apart from it, both held in the tab's own state (PullRequestCodeTab.tsx:225-232, pullRequestDiff.logic.ts:25-50).toggleAllFilessets the override and clears the toggled keys (PullRequestCodeTab.tsx:675-681), so a file that arrives later follows the override.Options.
⇊and⇈before the words, as the desktop puts chevrons on the button, so the row reads as a control and not as a note.What review changed.
all_foldedsurvived too, since the row and Enter both need files first, so that check is gone.f7866d8 merges #73 at dd84318, which brings #66's fix for a hunk that removes nothing at the highest line number (8073497) and its test. That test read the file's header at a fixed row, and the Expand all row moves it down, so f4d6ccc finds the header by its text.
ed13d8b and ce3e374 merge #73 at 8b26331 and e92d45f, which bring #72's fix that counts each Enter on a run while the file's text is read and the fixes that lay a thread's comments and its loaded pages out again when the theme changes (#68's ad1590c and #69's 942dad5).
Known limits.
diffFilesCollapsedsetting that picks the first fold isn't read, so files always start folded.Tests
Enter expand all fileswith the row chosen.⇊ Expand all filesrow.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Adds one row to expand or collapse every file on the Code tab.
No actionable issues found.
Reviews (5) · Last reviewed commit: "Merge the viewed-files branch at e92d45f..." · Reviewed by Greptile