Skip to content

internal/rocketclaw/web: load PR files without a button - #1546

Merged
ucirello merged 1 commit into
mainfrom
pr-preview-code-autoload
Nov 20, 2026
Merged

ucirello merged 1 commit into
mainfrom
pr-preview-code-autoload

Conversation

@ucirello

Copy link
Copy Markdown
Collaborator

Summary

Opening Code in the pull request preview now shows the files with no extra click. The Load files / Load more files button is gone, and so are two notes that didn't help anyone: "Patches may be incomplete. Open GitHub for the full diff." and "Read with this OpenCode server's GitHub login."

What changes

  • Code loads the first 100 files as soon as it opens, and scrolling to the end loads the rest. This already worked; the button was left over.
  • The button was the only way to try again after a cancel or a failed read. Now going to Summary and back to Code tries again. Refresh still starts over.

Testing

  • The PR preview and OpenCode pane browser tests pass in Chromium (10 tests). The preview test now retries by switching tabs and scrolling, and checks that the button is gone.
  • Web lint (oxlint, tsc, react-doctor) and the TypeScript line budget pass.

Demo

Desktop, tablet and mobile, in that order. These use a made-up 130-file pull request, and each file read is slowed to 1.2 seconds so the loading line is visible. The captions and red pointer dot were added for the recording.

desktop.mp4
tablet.mp4
mobile.mp4

@ucirello
ucirello added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 20, 2026
The pull request preview showed a Load files or Load more files button
below its tabs, and two notes that told the reader nothing useful:
"Patches may be incomplete. Open GitHub for the full diff." and, in
the OpenCode pane, "Read with this OpenCode server's GitHub login."

Opening Code already loads the first page of files, and scrolling to
the end loads the next, so the button only mattered after a cancel or
a failed read. Remove it and both notes. Opening Code now clears a
cancelled or failed load, so going back to Code tries again. Refresh
still starts over.

The preview browser test retries by switching tabs and scrolling
instead of clicking the button, and checks that the button is gone.
@ucirello
ucirello force-pushed the pr-preview-code-autoload branch from 8fade42 to 6848ae3 Compare November 20, 2026 20:10
@ucirello
ucirello enabled auto-merge November 20, 2026 20:10
@ucirello
ucirello added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 2206235 Nov 20, 2026
14 checks passed
@ucirello
ucirello deleted the pr-preview-code-autoload branch November 20, 2026 20:21
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