Skip to content

Add line-wrap toggle to the file diff panel#164

Open
pufit wants to merge 1 commit into
mainfrom
pufit/diff-wrap-toggle
Open

Add line-wrap toggle to the file diff panel#164
pufit wants to merge 1 commit into
mainfrom
pufit/diff-wrap-toggle

Conversation

@pufit

@pufit pufit commented Jul 3, 2026

Copy link
Copy Markdown
Member

Adds a line-wrapping toggle to the side panel's file diff inspector.

What

  • New WrapText icon button in the diff detail header — toggles long lines between horizontal scrolling (default, unchanged) and soft wrapping.
  • Preference persists across sessions via localStorage (nerve_diff_wrap).
  • Plumbing: useDiffOptions() accepts an optional { wrap } flag mapped to @pierre/diffs' overflow: 'wrap' | 'scroll' option; DiffView forwards a wrap prop. Other diff renders (e.g. Edit tool blocks) are untouched — the no-arg call keeps the library default (scroll).

Testing

  • npm run build clean, full pytest suite passes (1349 passed).
  • Verified in the browser: data-overflow flips scrollwrap in the diffs shadow root, long lines visibly wrap, preference survives reopening files, active state styled with text-accent.

Generated by Nerve

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.

1 participant