feat(desktop): PR-style file diffs in chat - #50731
Merged
Merged
Conversation
The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client).
Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes.
Contributor
🔎 Lint report:
|
Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship.
Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent.
Share one SHIKI_THEME (github-dark-dimmed) across code blocks and inline diffs so they can't drift, and pull token saturation/brightness back via a `.shiki` dark-mode filter. The dimmed theme alone only changes the background — which both surfaces strip — so the bright foregrounds needed the filter to actually calm down.
OutThisLife
enabled auto-merge
June 22, 2026 10:16
OutThisLife
force-pushed
the
bb/desktop-diff-ui
branch
from
June 22, 2026 10:16
fa5e5da to
61c266b
Compare
1 task
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
* feat(desktop): add Update now button to About panel The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client). * feat(desktop): PR-style file diffs in chat Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes. * style(desktop): lead --dt-font-mono with bundled JetBrains Mono Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship. * feat(desktop): syntax-highlight inline diffs via Shiki Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent. * style(desktop): use github-dark-dimmed for inline diffs The vivid github-dark-default tokens read harsh behind the add/remove tint in dark mode; switch the diff's dark theme to GitHub's lower-contrast dimmed palette. Light mode and code blocks are unchanged. * style(desktop): dim code-block syntax theme + share with diffs Apply github-dark-dimmed to code blocks too (not just inline diffs) and export one shared SHIKI_THEME so the two highlighters can't drift. Lower contrast reads easier at our small code size in dark mode. * style(desktop): soften shiki token contrast in dark mode github-dark-dimmed only dims the background, which the diff/code surfaces strip — so the bright token foregrounds were unchanged. Pull saturation + brightness back a touch (hues preserved) on .shiki in dark mode for both code blocks and inline diffs.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
* feat(desktop): add Update now button to About panel The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client). * feat(desktop): PR-style file diffs in chat Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes. * style(desktop): lead --dt-font-mono with bundled JetBrains Mono Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship. * feat(desktop): syntax-highlight inline diffs via Shiki Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent. * style(desktop): use github-dark-dimmed for inline diffs The vivid github-dark-default tokens read harsh behind the add/remove tint in dark mode; switch the diff's dark theme to GitHub's lower-contrast dimmed palette. Light mode and code blocks are unchanged. * style(desktop): dim code-block syntax theme + share with diffs Apply github-dark-dimmed to code blocks too (not just inline diffs) and export one shared SHIKI_THEME so the two highlighters can't drift. Lower contrast reads easier at our small code size in dark mode. * style(desktop): soften shiki token contrast in dark mode github-dark-dimmed only dims the background, which the diff/code surfaces strip — so the bright token foregrounds were unchanged. Pull saturation + brightness back a touch (hues preserved) on .shiki in dark mode for both code blocks and inline diffs.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
* feat(desktop): add Update now button to About panel The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client). * feat(desktop): PR-style file diffs in chat Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes. * style(desktop): lead --dt-font-mono with bundled JetBrains Mono Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship. * feat(desktop): syntax-highlight inline diffs via Shiki Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent. * style(desktop): use github-dark-dimmed for inline diffs The vivid github-dark-default tokens read harsh behind the add/remove tint in dark mode; switch the diff's dark theme to GitHub's lower-contrast dimmed palette. Light mode and code blocks are unchanged. * style(desktop): dim code-block syntax theme + share with diffs Apply github-dark-dimmed to code blocks too (not just inline diffs) and export one shared SHIKI_THEME so the two highlighters can't drift. Lower contrast reads easier at our small code size in dark mode. * style(desktop): soften shiki token contrast in dark mode github-dark-dimmed only dims the background, which the diff/code surfaces strip — so the bright token foregrounds were unchanged. Pull saturation + brightness back a touch (hues preserved) on .shiki in dark mode for both code blocks and inline diffs.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
* feat(desktop): add Update now button to About panel The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client). * feat(desktop): PR-style file diffs in chat Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes. * style(desktop): lead --dt-font-mono with bundled JetBrains Mono Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship. * feat(desktop): syntax-highlight inline diffs via Shiki Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent. * style(desktop): use github-dark-dimmed for inline diffs The vivid github-dark-default tokens read harsh behind the add/remove tint in dark mode; switch the diff's dark theme to GitHub's lower-contrast dimmed palette. Light mode and code blocks are unchanged. * style(desktop): dim code-block syntax theme + share with diffs Apply github-dark-dimmed to code blocks too (not just inline diffs) and export one shared SHIKI_THEME so the two highlighters can't drift. Lower contrast reads easier at our small code size in dark mode. * style(desktop): soften shiki token contrast in dark mode github-dark-dimmed only dims the background, which the diff/code surfaces strip — so the bright token foregrounds were unchanged. Pull saturation + brightness back a touch (hues preserved) on .shiki in dark mode for both code blocks and inline diffs.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
* feat(desktop): add Update now button to About panel The About > Updates panel only surfaced "See what's new" when an update was available, which just opens the changelog overlay — there was no way to start the install directly from About. Add an "Update now" primary button that opens the updates overlay (for apply progress) and kicks off the install for the active target (backend in remote mode, else client). * feat(desktop): PR-style file diffs in chat Render write_file/edit_file/patch as a reviewable diff instead of raw result JSON, closer to a Cursor/T3 per-edit review. - Unified diff via FileDiffPanel: strip git file-header + @@ hunk noise, drop the +/- gutter, color by line with a 2px gutter accent, full-bleed to the card, transparent context lines, compact scroll height. - Header shows filename + language icon + +N/-N stats; full path moves to a hover tooltip (no Edited verb, no ms). - Treat the three file-edit tools uniformly (isFileEditTool); read diff from inline_diff or patch's diff field; suppress raw-arg detail. - Reusable FileTypeIcon primitive sharing the code-block icon mapping (codiconForFilename), codicon fallback. - Per-row scaffolding fade (not the group wrapper, which trapped child opacity); expanded edits stay full, collapsed fade; keyboard-only focus lift. Hide diff-less rehydrated creates that read as dupes. * style(desktop): lead --dt-font-mono with bundled JetBrains Mono Code/diff blocks preferred a system Cascadia Code before the bundled JetBrains Mono, so they drifted from the terminal (which leads with JetBrains Mono) on machines where Cascadia is installed. Reorder so every mono surface uses the face we actually ship. * feat(desktop): syntax-highlight inline diffs via Shiki Unify the diff renderer onto the same Shiki path as code blocks: highlight the marker-stripped change content in the file's language, then a per-line transformer layers the add/remove tint + gutter accent on top. Falls back to the plain color-only renderer when the language is unknown, over budget, or while Shiki loads. - shikiLanguageForFilename(): extension → bundled-language id (shared filename-token helper with codiconForFilename). - code display:grid so full-width line tints don't double with newline nodes; theme surface stripped so context lines stay transparent. * style(desktop): use github-dark-dimmed for inline diffs The vivid github-dark-default tokens read harsh behind the add/remove tint in dark mode; switch the diff's dark theme to GitHub's lower-contrast dimmed palette. Light mode and code blocks are unchanged. * style(desktop): dim code-block syntax theme + share with diffs Apply github-dark-dimmed to code blocks too (not just inline diffs) and export one shared SHIKI_THEME so the two highlighters can't drift. Lower contrast reads easier at our small code size in dark mode. * style(desktop): soften shiki token contrast in dark mode github-dark-dimmed only dims the background, which the diff/code surfaces strip — so the bright token foregrounds were unchanged. Pull saturation + brightness back a touch (hues preserved) on .shiki in dark mode for both code blocks and inline diffs.
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
The desktop app rendered
write_file/edit_file/patchas raw result JSON ({"context":…,"mode":"replace","new_string":…}), which felt like blind vibe-coding. This reworks file edits into a reviewable diff per turn — closer to handing the user a PR to review (Cursor / T3-style).Diff rendering (
FileDiffPanel/DiffLines)diff --git,---/+++, thea/… → b/…arrow) and@@hunk headers — pure GUI noise.+/-gutter; changes read by color with a 2px left gutter accent (green add / red remove).Row header
+N/-Nstats; full path in a hover tooltip.mstiming.isFileEditTool); reads the diff frominline_difforpatch'sdifffield; raw-arg detail suppressed when a diff exists.Reuse
FileTypeIconprimitive sharing the code-block icon map (codiconForFilename), codicon fallback — no call-site churn.Scaffolding fade fix
write_filecreates that read as dead duplicates after reload (cosmetic;patchpersists its diff,write_filedoes not).Test plan
vitest—tool-fallback-model.test.ts(+ new file-edit/diff-stats cases) andchat-messages.test.tspass (40).tsc --noEmitclean; eslint clean on changed files (pre-existingtool-fallback-model.tslint left untouched).🤖 Generated with Cursor