Repository navigation
Conversation
A private repository's `github.com/user-attachments/assets/<id>` URL is a 404 to any token, so the media fetch came back empty and clients drew blank tiles. When that URL is a 404, ask GitHub to render it in the change request's repository, which yields a short-lived signed link, and fetch that instead. Mobile and web now send the repository with the media resource. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Image attachments in a private repository's pull request showed up as blank tiles on Android, and as broken images on web. The URL in the description,
github.com/user-attachments/assets/<id>, answers 404 to any token, so the server's media fetch had nothing to return.The fix
When that URL answers 404, the GitHub driver calls
POST /markdownwithmode: gfmandcontext: <owner/name>. GitHub's HTML then holds a signedprivate-user-images.githubusercontent.comlink, which the server fetches with no credential. The server caches the link for a minute because GitHub signs it for five, so a video's range requests don't each spend quota. Clients never see it./markdownand notbody_html: it needs no issue or comment id, so descriptions, comments and guide text all work through one path.repository, because the project atcwdmay not be the pull request's repository. Mobile and web both send it.The
kind: "video"ingitHubMediaUrlwas not the cause. It only applies to a URL alone on a line, andstays an image.Surfaces
Not covered or not tested
pingdotgg/t3codeandcli/clido not. T3's GitHub App sign-in and a read-only collaborator are untested. If GitHub gives no signed link, the tile stays blank as it does today./<owner>/<repo>/assets/<n>/<id>URLs. They are unchanged, as no private sample turned up to test against.<img>tags.<img>tags in the mobile Attachments row. GitHub's web composer can write attachments as<img>HTML, and that row skips HTML nodes. This is from reading the code, it applies to public repositories too, and this PR leaves it alone.Verification
The private repository's details stay out of this public PR, so the screenshot is behind Access.
Before the fix, on the box against a private repository's pull request:
After the fix, on a dev server at 05fa731 with the web client open on that pull request, all 17 attachments came through the asset route:
Screenshot: https://artifacts.ghostsignal.nexus/k/t3code-private-pr-attachments-web
APK at 05fa731 for the phone check, which also needs a server with this change: https://artifacts.ghostsignal.nexus/k/t3code-private-pr-attachments
gitHubMediaFetch,definition,AssetAccess,pullRequestMediaSource,useMediaVideoPlayback,assetImageSourceand thePullRequestMarkdownbrowser test all pass.vp run check:changeddid not complete:git diffhit SIGSEGV in the boat sandbox on both tries, before any check ran. I ran its parts separately instead, and the fork has no pull request CI to back this up.Done with Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code