Repository navigation
fix(native): highlight shell commands and scale work rows - #110
Merged
Merged
Conversation
This was referenced Nov 3, 2026
rynfar
force-pushed
the
nw/108-transcript-gaps
branch
from
November 3, 2026 06:26
7dd57b9 to
beb5b17
Compare
This was referenced Nov 3, 2026
Closed
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.
Expanded command inspectors used plain text and work rows stayed at 14px when the interface size changed. This ports the Bash command surface from
ShellCommandBlock.tsx,HighlightedTokens.tsx, andembeddedScripts.ts, using the existing native Tree-sitter highlighter. Both command-output rows and dynamic-tool inspectors use that shared surface.Commands tokenize on the background executor, with a bounded cache by command and syntax palette, plain fallback, visible controls, selection, and embedded-script byte mappings (inline interpreter arguments, heredocs, nested shell wrappers, escaped quotes and UTF-8). Heredoc output files use the same extension inference as native file previews, including Rust, Go, and TSX. Work rows now scale their text, line height, icon slots, spacing, group caps, error/approval labels, question-and-answer histories and image attachments, and worktree offsets with the interface font size; code/output font size remains fixed as on the web. Interface-size changes invalidate the persistent transcript and group-list measurements while preserving the reader’s proportional scroll position.
Addresses #108; advances #64 and #78. TR-CMDOUT and TR-INSPECT remain
partial: the existing highlighter lacks PowerShell and fish/Perl/AppleScript/Ruby/XML embedded grammars. These fall back to plain text or the surrounding shell string style. Grammar availability is the remaining command-highlighting gap.Verified with
cargo test --workspace(1,076 tests),cargo clippy --workspace --all-targets -- -D warnings, snapshot-feature build, theme generation check, parity-sync tests (42 passed), conformance generation check, andvp run check:changed fork/native. Regression tests failed before the fixes: embedded file extensions, and actual GPUI list measurements for offscreen main/group rows when font size changes in either direction. No styling unit tests were added.Offscreen captures use the existing Replay smoke thread read-only, with isolated native credentials. No server writes, paid turns, real windows, clipboard use, or dev servers. PNGs stay local as requested:
/private/tmp/native-108-evidence/before-dark-16.png/private/tmp/native-108-evidence/after-dark-16.png/private/tmp/native-108-evidence/before-light-16.png/private/tmp/native-108-evidence/after-light-16.png/private/tmp/native-108-evidence/before-dark-20.png/private/tmp/native-108-evidence/after-dark-20.png/private/tmp/native-108-evidence/before-light-20.png/private/tmp/native-108-evidence/after-light-20.png/private/tmp/native-108-evidence/before-command-dark-20.png/private/tmp/native-108-evidence/after-command-dark-20.png/private/tmp/native-108-evidence/before-command-light-20.png/private/tmp/native-108-evidence/after-command-light-20.pngLive 16→20px resize evidence uses
--font-size 16, expands the rows, then applies--resize-font 20in the same offscreen process:/private/tmp/native-108-evidence/before-question-light-20.png/private/tmp/native-108-evidence/review-question-light-16-to-20.png/private/tmp/native-108-evidence/review-question-dark-16-to-20.png/private/tmp/native-108-evidence/review-work-dark-16-to-20.pngBuilt with GPT-6.1 Sol in Codex