Skip to content

feat(diff): add an ignore-whitespace control (#38) - #48

Merged
cheat2001 merged 4 commits into
cheat2001:mainfrom
noyobo:feat/ignore-whitespace
Sep 30, 2026
Merged

cheat2001 merged 4 commits into
cheat2001:mainfrom
noyobo:feat/ignore-whitespace

Conversation

@noyobo

@noyobo noyobo commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

What & why

View options gains an Ignore whitespace checkbox mapped to git diff -w. Indent-only changes drop out of the working copy, commit, and file history diffs. While it is on, hunk and line staging (including discard line) stay off, because those hunks are not the patch git would apply. Stage file stays. Closes #38.

Screenshots

image image

Checklist

  • pnpm typecheck && pnpm test pass
  • cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test pass (if Rust changed)
  • New engine functions have integration tests in tests/git_engine.rs
  • Mutating operations go through the undo tracked() wrapper where undoable
  • Colors use design tokens only (no hex in components)
  • CLAUDE.md updated if conventions/architecture changed
  • Commits carry no trailers from coding tools (Co-authored-by: <tool>, Generated with …)

Indent-only changes paint as a full add/del pair. One View options checkbox maps to git diff -w across the working copy, commits, and file history, and turns hunk and line staging off while those filtered hunks are on screen.
The menu glyphs were the default 24px and sat against the label. Size them like the header buttons and leave a gap before the text.
Commands and tests call commit_diff_with directly, and clippy -D warnings rejects the leftover wrapper.

@cheat2001 cheat2001 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One flag on the shared diff options, defaults off everywhere else, staging correctly steps aside while it's on, and the AI path still gets the real patch. Tests on both sides, CI green. Merging. I'll tidy the empty state for a whitespace-only file on main afterwards.

@cheat2001
cheat2001 merged commit 84abcb5 into cheat2001:main Sep 30, 2026
6 checks passed
@noyobo
noyobo deleted the feat/ignore-whitespace branch September 30, 2026 05:56
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.

Should the diff view grow a git-style ignore-whitespace control?

2 participants