Repository navigation
Stop the Code tab's lines wrapping, and scroll them sideways - #76
Conversation
…sideways The desktop's toolbar has a toggle that lets a diff's lines run on past the edge, where its numbers stay while the code scrolls. A row under the fold row now does that here: each line takes one row, and Shift+arrows, H and L, and the wheel turned sideways scroll their text while the numbers stay. The rows the tests compare gain the new row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ows off other tabs Shift+← and Shift+→ scroll sideways only on the Code tab and act as ← and → elsewhere, as they did before. The status line draws after the details, so the first frame after the wrap row offers H/L where the lines run past them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…into t3term/pull-request-wrap
A file's rows no longer note whether they wrap, since the toggle already lays every file out again. Tests now check the widest row across files, a step on a page one column wide, a frame of another link, a row exactly the page's width and a commit opened from the Timeline. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…50cd Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gain after a theme change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age recipe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s more toolbar rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3b63 and the fixes and recipes under it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the Code recipe Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recipe unwraps reader.rs's long line, scrolls it with L, H and the shifted arrows to its end and back, and checks that Esc with Alt+B and a refresh keep the scroll while the details opened again from the list start at the left. A picked commit keeps the lines unwrapped and #70 starts wrapped. TB counts the third toolbar row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e count at the highest line number Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the boundary unfold test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne before the whitespace steps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
…run while the file's text is read, tests that no hunk is read once the whitespace steps run out 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>
…mments out again when the theme changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS+NOTES for head
Regression sweep: 13 of 13 own-checkout recipes pass on each side. Base evidence Rules: doctor and check pass in the focused drives and before and after stop in the sweeps. Matched steps send the same CI: all four checks pass on this exact head, including macOS and E2E smoke. Greptile: no review threads; no new unanswered finding. The head updates Binary provenance: base Notes: master's current sweep is 11 of 13 on both sides, at No new blocking findings. Evidence stays under the paths above. All owned runs were stopped and checked; no branch or PR code was changed. |
Adds a row to the Code tab that stops its lines wrapping, as the desktop's wrap toggle does, and lets the reader scroll those lines sideways.
↵ Disable line wrappingsits under the fold row once the tab has files. Enter or a click lets each line run on in one row, and the row then reads↵ Enable line wrapping. A read again and another diff picked from the commits keep the choice. The status line saysEnter disable line wrappingorEnter enable line wrapping.Lscrolls their text half the details' width to the right, and Shift+← orHscrolls it back. A sideways turn of the wheel scrolls it 4 columns, in a terminal that reports one. The line numbers and marks stay put, and the headers, notes and review threads don't move. The text stops once the end of the widest line shows, and starts again at the left for another diff and when the details open again.H/L sidewayswhile a line runs past the details. On the other tabs, Shift+← and Shift+→ still act as ← and →.Stacked on #75.
All four come from the fixture server at 120x48, where the details show as a dialog. The fixture's reader.rs gains a long comment line so the dialog has something to scroll.
Decision log
What I noticed. docs/pull-request-panel.md listed the desktop's wrap toggle among what the Code tab lacked. t3term always wrapped, so a long line split across rows and a reader couldn't see its shape or line it up with the lines around it.
How I confirmed it. In the pinned T3 source (f570bd2):
wordWrapis a client setting that defaults to true (packages/contracts/src/settings.ts:506). The Code tab copies it into its own state (apps/web/src/components/pullRequest/PullRequestCodeTab.tsx:235), so another diff picked keeps the choice.Disable line wrappingorEnable line wrapping(PullRequestCodeTab.tsx:1279-1298) and sets @pierre/diffs'overflowtowraporscroll(874).pre-wrapandbreak-word. Withoverflow: scroll, each file scrolls sideways on its own under its own scrollbar, and[data-overflow=scroll] [data-gutter]{position:sticky}keeps the numbers in place.Options.
H/L, with Shift+arrows only on the Code tab. ←/→ andh/lalready move between tabs, so the shifted keys scroll in the same directions. On the other tabs, Shift+arrows act as plain arrows, as they did before.H/L sidewayshint depends on whether the frame's lines run past the details, which the frame decides. Drawn first, it described the frame before, and an idle TUI might never draw again to correct it.What review changed.
followresets the offset along with the scroll.a634a86 and ef9e2ca merge #75 at 15bb2da and 3036809, which bring #66's fix for a hunk that removes nothing at the highest line number (8073497) and its test, with the same patch.
bc9fb2d merges #75 at d9fd767, which returns from the Timeline before its whitespace steps, with the same patch.
b916980 and 044993f merge #75 at 7d8ecf8 and 49e292e, which bring #72's fix that counts each Enter on a run while the file's text is read, #75's test that no hunk is read once the whitespace steps run out, 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). On this branch
lay_outalso returns which rows scroll sideways, so the merges take three values in the new theme test, as for the other tests.Known limits.
H/Lwork everywhere.wordWrapsetting isn't read, so the lines always start wrapped, and the choice isn't saved.H/L sidewayswhile a row is chosen. The keys still work.Tests
H,Land the wheel in the pane and the dialog, Shift+arrows on the other tabs, and the status line offeringH/L sidewayson the first frame after the toggle and dropping it before the other keys when narrow.↵ Disable line wrappingrow. bc9fb2d changes only the Code recipe, which passes with it on ef9e2ca's build.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
Adds a wrap toggle and sideways scrolling to the Code tab.
No actionable new issues were found. No previous review threads were supplied.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Toggle wrapping] --> B[Clear cached file rows] B --> C[Lay out wrapped or unwrapped lines] D[Sideways key or wheel] --> E[Change sideways offset] C --> F[Clamp offset to widest line] E --> F F --> G[Cut visible text and keep numbers fixed] G --> H[Draw status hints]Reviews (6) · Last reviewed commit: "Merge the whitespace branch at 49e292e, ..." · Reviewed by Greptile