fix(ui): keep wrapped code-row geometry aligned - #858
Open
benvinegar wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR centralizes split and stack code-row layout planning so geometry, rendering, clipboard output, and word selection use consistent widths.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness, security, or maintainability issue identified. The changed geometry, rendering, clipboard, and selection paths consistently consume the shared row-layout policy, and the investigated edge cases did not establish a reachable regression. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Row[PlannedReviewRow] --> Plan[planCodeRowLayout]
Plan --> Geometry[Wrapped row geometry]
Plan --> Render[Terminal rendering]
Plan --> Copy[Clipboard slicing]
Plan --> Selection[Word selection]
Geometry --> Bounds[Shared row boundaries]
Render --> Bounds
Copy --> Bounds
Selection --> Bounds
Reviews (1): Last reviewed commit: "fix(ui): align wrapped copy reservation" | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Wrapped row measurement and rendering independently calculated code widths. New-side note guides reserved a terminal column during rendering but not geometry measurement, so a row could measure as one line and render as two at an exact wrap boundary. Add-note column reservation could similarly drift from clipboard and word-selection layout.
Approach
PlannedReviewRow;DiffRowViewrather than reconstructing guide/anchor facts;This stays in the terminal rendering/geometry layer and does not change shared semantic review behavior.
Validation
Tested on Linux:
bun run test:integration— 132 passed, 1 platform skip;bun run typecheck;bun run lint;bun run deps:check;oxfmt --checkacross all changed source/test files;git diff --check main...HEAD.Before rebasing, the full suite reached 1,539 passed and 7 skipped with one environment-sensitive failure in unchanged
src/extensions/hostRuntimeModules.test.ts. That same test fails on currentmainbecause an outside temporary import unexpectedly resolves the repository's React installation.Wrapped-CJK benchmark medians were effectively flat against the original baseline, with no systematic regression. Automated PTY and TTY transcript coverage passed; no manual visual capture is included because the change corrects invisible geometry parity rather than intentional styling.
Limitations
Extremely narrow forced split layouts retain the existing minimum-pane-width behavior from
resolveSplitPaneWidths; this PR does not change that policy.This PR description was generated by Pi using OpenAI GPT-5.6 Sol