feat(differ): improve diff color contrast with per-side tinting#500
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82da98451b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
apps/differ/src-tauri/src/lib.rs
Outdated
| let output = Command::new("gt") | ||
| .args(["state"]) | ||
| .current_dir(repo) |
There was a problem hiding this comment.
Use a supported Graphite command for stack metadata
get_stack_info shells out to gt state and then parses stdout as JSON, but the current Graphite command reference’s full command list does not include a state subcommand (it exposes gt info, gt log, gt parent, etc.). In environments with the published CLI, this call exits non-zero and the function returns None, so stack mode is never detected/shown even when users are on a Graphite-managed branch.
Useful? React with 👍 / 👎.
82da984 to
0c49fbc
Compare
Add stack-aware diff mode that shows only the current branch's changes instead of the entire branch diff from trunk. Detects Graphite stacks via `gt state` and auto-selects stack mode when available. - Add `get_stack_info` Tauri command that parses `gt state` JSON - Add `StackInfo`/`StackBranchInfo` types and spec builders - Add Stack dropdown with upstack/downstack branch navigation - Navigate other stack branches without checkout (read-only refs) - Show needs-restack warning indicator - Graceful fallback: Stack button hidden when gt not installed Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d28f5-71eb-7256-af52-1b4c406e53a7
Diff backgrounds were nearly invisible at 4-8% alpha. Wire up the existing but unused --diff-added-bg and --diff-removed-bg variables to differentiate additions (green tint) from deletions (red tint). - Wire per-pane CSS: before-pane uses --diff-removed-bg, after-pane uses --diff-added-bg instead of both using neutral --diff-changed-bg - Bump alpha values: added/removed 0.08→0.15, changed 0.04→0.08 - Update adaptive theme generator with matching alpha multipliers
0c49fbc to
eb80430
Compare
Stack
This is PR 2/4 in a stack of Differ improvements:
Background
Diff line backgrounds in both Differ and Staged were using very low alpha values (4-8%), making added/removed lines nearly indistinguishable from unchanged context lines.
Overview of Changes
--diff-removed-bg(red tint), after-pane uses--diff-added-bg(green tint) instead of both using neutral--diff-changed-bg0.08→0.15, changed0.04→0.08in Differ's static CSSTesting Performed
Video testing (with all 4 from stack)
gtinstalledgtinstalledScreen.Recording.2026-03-26.at.10.38.26.AM_compressed.mp4
Screen.Recording.2026-03-26.at.10.41.16.AM_compressed.mp4
Fixed the text overflow artifacts that you can see in the video
I just didn't want to rerecord



✨🤖 heavily assisted by AmpCode