feat(tui): quiet statusbar footer + diff syntax highlighting#456
Open
tidux wants to merge 8 commits intotilework-tech:mainfrom
Open
feat(tui): quiet statusbar footer + diff syntax highlighting#456tidux wants to merge 8 commits intotilework-tech:mainfrom
tidux wants to merge 8 commits intotilework-tech:mainfrom
Conversation
Author
|
The reason the old diff count was so enormous in the ZeroClaw repository in particular is that there was a change from "main" to "master" as the tracking branch months ago, and so no amount of committing new changes back to master would ever make the old behavior drop to 0/0. |
… change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
Collaborator
|
Will review this later today, or when you request me for review! Just lmk The git fix is very welcome. I might keep the old git behavior, but as an alternate footer segment option. This change should be the default one. Diff coloring was something I had in progress work on; I can integrate that during review or after this PR |
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.

Justification
Two related TUI polish fixes:
Quiet statusbar footer: The previous statusline behavior was unusably noisy on large diverged feature branches. It didn't tell me at a glance how much of the giant red and green numbers were due to branch history divergence, recent working-tree changes, or untracked files. These changes align
noriwith most other common development tools.Diff syntax highlighting + relative line numbers: Diff output in the TUI now syntax-highlights code using tree-sitter (matching the file extension) and displays relative line numbers, making diffs significantly easier to read inline.
Implementation
Quiet statusbar footer
!instead of counting their linesDiff syntax highlighting + relative line numbers
render/highlight.rswith tree-sitter-based syntax highlighting keyed on file path extensionPathAwareFileChangewrapper soDiffSummarycan pass file path context into renderingDiffLineLayoutto centralize line-number width and padding calculationsValidation
just fmtcargo test -p nori-tuicargo build --bin noricargo test -p tui-pty-e2ejust fix -p nori-tuiScreenshots
Statusbar: Before vs After
Before:
After: