Preview requested pull request diffs on mobile #123

Closed
opened 2026-08-06 17:26:42 +00:00 by timmy · 0 comments
Owner

User problem

The mobile review sheet lists changed filenames but forces reviewers into Gitea before they can see what changed. The Gitea pull-files response has no patch field, while the verified /api/v1/repos/{owner}/{repo}/pulls/{number}.diff endpoint returns unified diff text.

Scope

  • Fetch and parse a bounded unified diff for review-requested pull requests.
  • Attach escaped, per-file previews to the existing changed-file rows.
  • Make rows 44px expandable controls with aria-expanded.
  • Show explicit unavailable/binary/truncated states and preserve the read-only Open in Gitea handoff.
  • Contain horizontal overflow at 320px.

Acceptance

  • Per-file diff previews toggle accessibly on mobile.
  • Added/removed/context lines are distinguishable and HTML-escaped.
  • Backend caps diff bytes/lines and marks truncation.
  • No mutation endpoint is added; review payload remains no-store.
  • Focused and full suites pass; rendered 320x568 route is validated.

Historical issue-title and recent-commit search found no prior diff/hunk/patch preview work; #121/#122 shipped metadata-only changed-file summaries.

## User problem The mobile review sheet lists changed filenames but forces reviewers into Gitea before they can see what changed. The Gitea pull-files response has no patch field, while the verified `/api/v1/repos/{owner}/{repo}/pulls/{number}.diff` endpoint returns unified diff text. ## Scope - Fetch and parse a bounded unified diff for review-requested pull requests. - Attach escaped, per-file previews to the existing changed-file rows. - Make rows 44px expandable controls with `aria-expanded`. - Show explicit unavailable/binary/truncated states and preserve the read-only Open in Gitea handoff. - Contain horizontal overflow at 320px. ## Acceptance - Per-file diff previews toggle accessibly on mobile. - Added/removed/context lines are distinguishable and HTML-escaped. - Backend caps diff bytes/lines and marks truncation. - No mutation endpoint is added; review payload remains `no-store`. - Focused and full suites pass; rendered 320x568 route is validated. Historical issue-title and recent-commit search found no prior diff/hunk/patch preview work; #121/#122 shipped metadata-only changed-file summaries.
timmy self-assigned this 2026-08-06 17:26:42 +00:00
timmy closed this issue 2026-08-06 17:32:27 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#123
No description provided.