Repository navigation
fix(native): match web shell command highlighting - #132
Merged
Merged
Conversation
This was referenced Nov 3, 2026
Open
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.
Native shell command details fell back to plain text or shell string colors for PowerShell, Perl, Ruby and XML. This ports the web's language requests into the existing cached background highlighter shared by command rows and raw inspectors.
The pinned web Highlights engine renders fish, AppleScript and Prolog as plain text. Native now does the same, clearing the surrounding shell string style. The fish and AppleScript grammar dependencies and registrations were removed.
Refs #64 and #78; follows #110. TR-CMDOUT and TR-INSPECT remain
partial: the web's broader filename catalog (including C/C++/Java and other plain-file targets) and lexer constructs beyond the covered cases still need parity work. The ledger records filename inference and unported web lexers as remaining work.Review corrections
All six findings at
1c742e2f84303914bb61c8062385109eb8dfaa02were reproduced and accepted.commandLabel.tsso comments, heredoc bodies, substitutions, parameter expansions and PowerShell here strings do not become standalone PowerShell statements. Multiple/quoted/tab-stripped heredocs and statements following them are covered.The six new production-path tests call
cached_commandwith the real production theme configuration. They exercise language selection, installed highlight/locals queries, embedded byte remapping and final theme-resolved colors. All six failed at the reviewed head. The additional Ruby instance-variable case also failed before its mapping fix. Core detection/query tests remain in place. Highlighting stays off the UI thread with the existing 64-entry/64-KiB cache and recursion budget.Dependencies and size
Ruby uses the pinned gpui-component feature. Its other requested supported languages have no feature in that pin, so they use dedicated grammar crates and the existing tree-sitter 0.26.13 runtime.
The refreshed snapshot development binary is 174,958,552 bytes: +7.69 MiB against the original base's 166,896,488 bytes, and 0.33 MiB smaller than the reviewed head's 175,306,808 bytes. Linked __TEXT is 95,846,400 bytes (+7.56 MiB against the base; 0.36 MiB smaller than the reviewed head).
nmconfirms no fish or AppleScript grammar entry points remain. Release binary size was not measured.Verification
Local evidence (factory instructions require local paths rather than uploads):
Heredoc regression: /private/tmp/native-64-r2-perl-inspector.png. AppleScript/plain: /private/tmp/native-64-r2-applescript-inspector.png.
Original before captures: /private/tmp/native-64-powershell-before.png, /private/tmp/native-64-fish-before.png, /private/tmp/native-64-ruby-before.png. Failing production tests: /private/tmp/native-64-review-failing.log. Final gate transcripts: /private/tmp/native-64-r2-workspace.log, /private/tmp/native-64-r2-clippy.log, /private/tmp/native-64-r2-check-changed.log.
Built with GPT-6.1 Sol in Codex