Skip to content

feat(review): diff display options — hide whitespace + quick-settings popover#631

Merged
backnotprop merged 2 commits intomainfrom
feat/diff-options
Apr 30, 2026
Merged

feat(review): diff display options — hide whitespace + quick-settings popover#631
backnotprop merged 2 commits intomainfrom
feat/diff-options

Conversation

@backnotprop
Copy link
Copy Markdown
Owner

Summary

  • Hide whitespace setting: Adds a toggle that suppresses whitespace-only changes in diffs (matching GitHub's ?w=1 / git diff -w). Uses parseDiffFromFile with ignoreWhitespace from @pierre/diffs when full file contents are available. Default: off (show whitespace).
  • Quick-settings popover: Adds a gear icon to each file header that opens a compact Radix popover with all diff display options (style, overflow, indicators, inline diff granularity, line numbers, background, hide whitespace). Provides quick access without opening the full settings dialog.
  • Demo data: Adds a whitespace-heavy demo file (src/config/settings.ts) with re-indentation and alignment changes, plus a vite dev server plugin to serve file contents in demo mode.

Test plan

  • bun run --cwd apps/review build passes
  • Open bun run dev:review, navigate to src/config/settings.ts
  • Toggle "Hide Whitespace" in settings — re-indented function bodies disappear, alignment changes remain
  • Click gear icon on file header — popover opens with all diff display options
  • Change options via popover — diff re-renders immediately
  • Popover closes on Escape and outside click
  • Popover does not clip at various panel widths

🤖 Generated with Claude Code

backnotprop and others added 2 commits April 29, 2026 23:42
Adds a "Hide Whitespace" toggle that suppresses whitespace-only changes
in diffs, matching GitHub's ?w=1 behavior. Uses parseDiffFromFile with
ignoreWhitespace when full file contents are available. Includes demo
data with a whitespace-heavy file (settings.ts) and a vite dev server
plugin to serve file contents in demo mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a gear icon to the file header that opens a compact Radix popover
with all diff display options (style, overflow, indicators, inline diff,
line numbers, background, hide whitespace). Provides quick access to
settings without opening the full settings dialog. Exports option
constants from Settings.tsx for reuse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@backnotprop backnotprop merged commit b4b1d43 into main Apr 30, 2026
7 checks passed
@zeroZshadow
Copy link
Copy Markdown

Thanks for this! I picked up plannotator on recommendation of a friend yesterday, and literally mentioned how I'd love to use difftastic with it for the ability to hide whitespace changes. And boom! The next day you build just that! ❤️

@backnotprop
Copy link
Copy Markdown
Owner Author

backnotprop commented Apr 30, 2026 via email

@zeroZshadow
Copy link
Copy Markdown

It seems "Hide whitespace" isn't only hiding lines where whitespace has changed. It also removes all leading whitespaces. For all lines including those that have not changed.

Enabled
image

Disabled
image

@backnotprop
Copy link
Copy Markdown
Owner Author

Ahh.. patching ill release soon with the next set of code review changes. wrapping up on a single view for viewing all diffs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants