Skip to content

feat: add word wrapping setting and in-panel button#1326

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
raphaelluethy:feat/word-wrapping
Mar 24, 2026
Merged

feat: add word wrapping setting and in-panel button#1326
juliusmarminge merged 1 commit intopingdotgg:mainfrom
raphaelluethy:feat/word-wrapping

Conversation

@raphaelluethy
Copy link
Contributor

@raphaelluethy raphaelluethy commented Mar 23, 2026

Complementary to #1250, this PR also introduces a settings option and decouples the setting from the in-panel toggle logic.

What Changed

Added a word wrapping setting and in-diff-panel button.

The in-diff-panel button is decoupled and resets to the settings default on re-opening the diff view, I found this better when testing the change since I sometimes would like to see the unwrapped state without it changing my global settings.

Why

When working on docs and other text files the sideways scrolling breaks reading flow.

UI Changes

Before (no button for warpping):
image

After
CleanShot 2026-03-23 at 09 42 28@2x

With settings flow:
https://cleanshot.com/share/78GQRsvg

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk: adds a new boolean setting and UI toggles affecting only diff rendering/overflow behavior, with no security- or data-critical logic changes.

Overview
Adds a new diffWordWrap app setting (default false) and exposes it in Settings as “Diff line wrapping” with reset-to-default support.

Updates DiffPanel to include an in-panel wrap toggle and to apply wrap vs horizontal scroll to both parsed diffs (FileDiff overflow) and raw patch rendering; the toggle is session-scoped and re-initializes from the saved setting each time the diff panel is opened.

Written by Cursor Bugbot for commit 7bfd460. This will update automatically on new commits. Configure here.

Note

Add word wrap toggle to the diff panel and settings

  • Adds a diffWordWrap boolean to appSettings.ts, defaulting to false, which sets the initial wrap state each time the diff panel opens.
  • Adds a toggle button in the DiffPanel header to switch word wrapping on/off for the current session; passes overflow: 'wrap' or 'scroll' to FileDiff accordingly.
  • Adds a 'Diff line wrapping' row in the settings page so users can change the default, with a note that the in-panel toggle only applies to the current session.

Macroscope summarized 7bfd460.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d5098c37-f857-4b74-9c38-aa09961708b5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@raphaelluethy
Copy link
Contributor Author

I will leave this PR here, if this is something that would be useful I am glad to follow up, otherwise this can also be closed; I added this to my fork and saw it enhanced my workflow and I thought this could be a meaningful addition.

Love your work here, thanks for creating this 😊

@juliusmarminge juliusmarminge merged commit d4a7e1a into pingdotgg:main Mar 24, 2026
11 checks passed
@raphaelluethy raphaelluethy deleted the feat/word-wrapping branch March 24, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants