Skip to content

AI: no-unnecessary-split-diff-view - Fix detection on new diff view - #10416

Open
t-ukisu wants to merge 3 commits into
refined-github:mainfrom
t-ukisu:fix-no-unnecessary-split-diff-view
Open

t-ukisu wants to merge 3 commits into
refined-github:mainfrom
t-ukisu:fix-no-unnecessary-split-diff-view

Conversation

@t-ukisu

@t-ukisu t-ukisu commented Nov 28, 2026 •

Copy link
Copy Markdown

Fixes #10411

GitHub's new diff view no longer uses the .deletion/.addition classes (it now uses data-diff-type) or .diff-line-row/.diff-line-number (hashed CSS-module classes). As a result:

  • every split table was detected as "only additions" and got table-layout: auto, so the center border moved per file
  • the hiding of the empty side didn't apply

The single commit page still uses the previous DOM (.deletion/.addition, .diff-line-row), so the detection and the CSS now support both.

  • one-sided tables could grow wider than their container because of long unbreakable strings (e.g. paths/URLs)

Before / after: a file with changes only on one side

advancements.md has only additions. Before, the table was 2124px wide in an 867px container, so the added lines were pushed out of view (blank green area). After, the empty left side is hidden and the added lines use the full width and wrap.

Before

before2

After

after2

Before / after: files with changes on both sides

The center border differed per file and the right side was clipped. After, it's the same in every file.

Before

before

After

after

Verified

🤖 Generated with Claude Code

@github-actions github-actions Bot closed this Nov 28, 2026
@github-actions

Copy link
Copy Markdown

All PRs must include screenshots showing the changes or fixes. This looks like an AI-generated PR, "tests pass" is not an excuse.

Next steps:

  1. Update the PR body with a screenshot/video/gif of the working PR.
  2. Wait for a human to review the PR and reopen it.

Tips:

  • Do not open more PRs until this one is reopened and merged.
  • Don't waste your tokens on junk PRs that won't be accepted.
  • Don't waste your tokens on junk comments that nobody reads.

@fregante

Copy link
Copy Markdown
Member

The screenshots don't show the feature working

@t-ukisu

t-ukisu commented Nov 28, 2026

Copy link
Copy Markdown
Author

Thanks, I replaced the screenshots: the first pair now shows a one-sided file (advancements.md) where the table was 2124px wide and the added lines were pushed out of view before, and the empty side is hidden and the lines wrap after. The second pair shows files with changes on both sides.

@fregante fregante reopened this Nov 28, 2026
@github-actions github-actions Bot added the bug label Nov 28, 2026
@t-ukisu
t-ukisu marked this pull request as ready for review November 28, 2026 07:28
@t-ukisu
t-ukisu force-pushed the fix-no-unnecessary-split-diff-view branch from 12eb64d to 37f8382 Compare November 28, 2026 13:23
@github-actions

Copy link
Copy Markdown

Please don't force-push to this PR, it makes it harder to see what changed since the last review.

We merge commits rather than squash, so we care more about reviewability than a clean history. Feel free to push dirty commits.

This branch has not been deployed

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

Labels

Development

Successfully merging this pull request may close these issues.

no-unnecessary-split-diff-view is broken

2 participants