PR diffs 3: generalize diff source discovery for PR and compare surfaces #26

Closed
opened 2026-05-09 03:28:02 +00:00 by barrettruth · 0 comments
Owner

Generalize the current commit-only diff source discovery without enabling risky PR rendering yet.

Scope:

  • Extend URL detection beyond /commit/<sha>.diff to understand PR files pages, PR commit pages, PR commit ranges, compare pages, and raw compare .diff endpoints.
  • Decide when raw /pulls/<index>.diff is acceptable and when server-rendered PR rows must remain the source of truth.
  • Preserve query semantics for style, whitespace, show-outdated, skip-to, and file-only.
  • Keep native fallback when a raw diff does not correspond exactly to the currently displayed PR subset.

Acceptance:

  • A helper can classify the current page as commit diff, compare diff, PR all-files, PR single-commit, PR commit-range, or unsupported.
  • No PR review DOM is replaced by this task.
  • Preload only runs where the source URL is known to match the page.

Depends on: PR diffs 1.

Generalize the current commit-only diff source discovery without enabling risky PR rendering yet. Scope: - Extend URL detection beyond `/commit/<sha>.diff` to understand PR files pages, PR commit pages, PR commit ranges, compare pages, and raw compare `.diff` endpoints. - Decide when raw `/pulls/<index>.diff` is acceptable and when server-rendered PR rows must remain the source of truth. - Preserve query semantics for `style`, `whitespace`, `show-outdated`, `skip-to`, and `file-only`. - Keep native fallback when a raw diff does not correspond exactly to the currently displayed PR subset. Acceptance: - A helper can classify the current page as commit diff, compare diff, PR all-files, PR single-commit, PR commit-range, or unsupported. - No PR review DOM is replaced by this task. - Preload only runs where the source URL is known to match the page. Depends on: PR diffs 1.
Sign in to join this conversation.
No description provided.