feat: make diff tab width configurable#588
Merged
Merged
Conversation
Contributor
Greptile SummaryAdds configurable terminal-cell tab stops throughout Hunk.
Confidence Score: 5/5The PR appears safe to merge, with tab width consistently validated and propagated across the affected rendering paths. Tab expansion uses terminal-cell measurements, highlighted spans preserve their cumulative display column, and tab width participates in shared row planning and geometry cache invalidation; the changed paths also include focused coverage. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
CLI["CLI -x / --tab-width"] --> Config["Config resolution"]
TOML["tab_width in TOML"] --> Config
Config --> Bootstrap["App bootstrap"]
Bootstrap --> Interactive["Interactive diff renderer"]
Bootstrap --> Pager["Static diff pager"]
Public["OpenTUI tabWidth prop"] --> Components["Embeddable components"]
Interactive --> Rows["Tab-expanded diff rows"]
Pager --> Rows
Components --> Rows
Rows --> Geometry["Width, wrapping, and geometry caches"]
Reviews (1): Last reviewed commit: "feat: make diff tab width configurable" | 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.
Summary
tab_widthconfig plus-x/--tab-widthCLI overridesCloses #551.
Testing
bun run typecheckbun run lintbun run format:checkbun test test/pty/layout.test.ts: 13 passedbun run test:tty-smoke: 9 passedbun run build:binbun run test:integration: 55 passed; the direct-file atomic-save watch test timed out identically on a cleanorigin/mainworktreeThis PR description was generated by Pi using GPT-5.6