Skip to content

Connect Plus: show visual previews inline without a GitHub upload token (serve inline derivative from Connect) #3945

Done

Description

@integry

Problem

With ProPR Connect Plus, a visual preview should show inline in the PR comment without any GitHub token. Today it doesn't. In the 0.9.4 release-candidate test (Fly instance, Plus active on the installation, no upload token configured), propr-fly-fixture#154 got four screenshots, and each section said:

Inline preview unavailable: GitHub size limits or upload failure. No preview files were committed.
Full-size original
The GitHub inline attachment could not be published; the authenticated original remains available above.

So Plus stored the originals in Connect, but the inline image still depends on a GitHub attachment upload. That upload needs a gho_/ghp_/github_pat_ credential (visualPreviewOAuthCredentialService.ts). On Fly and other Connect-based instances, the dashboard login is a GitHub App user token (ghu_), which GitHub's uploader rejects. The result: Plus users see bare links, and the message blames "size limits or upload failure" and tells them to add a token.

Wanted

  • Inline images from Connect for Plus installations. When managed storage stored an original and no GitHub upload credential exists, (or the upload failed), embed the image inline from Connect:
    • Serve a capability URL to an image derivative, for example a size-capped WebP/PNG, from Connect.
    • The URL is unguessable and scoped to the asset. GitHub's camo proxy fetches it, so viewers need no Connect login.
    • Keep the authenticated full-size original link as it is today.
  • Private repositories. Make the derivative URL an explicit setting: public capability links (on by default for public repos), or "originals only" for private ones. Document the trade-off: anyone with the comment's image URL can load it.
  • Fallback order:
    1. GitHub attachment, when an upload credential exists.
    2. The Connect inline derivative, on Plus.
    3. A link only.
  • Accurate messages: "Shown from ProPR Connect", or say what is missing ("Add an upload token or enable ProPR Connect Plus"), instead of "GitHub size limits or upload failure".
  • Settings → Visual preview uploads: show Plus as a configured upload path, with no token needed.

Cross-repo

This needs a Connect endpoint (integry/propr-routing) for the inline derivative: signed or capability URL, caching headers, size cap, quota accounting, and revocation when the preview or installation is deleted.

Tests: each step of the fallback order; private-repo setting; message copy; camo-compatible headers (Content-Type, no auth redirect).

Activity

  1. propr-dev commented on Dec 1, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6.2-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6.2-sol
    • Branch: 3945/gpt-6.2-sol-connect-plus-show-visual--20261201-0018-cz9
    • Base Branch: 3758-epic-runtime-abstraction-sc0
    • Worktree: issue-3945-20261201-0018-gpt-6.2-sol-cz9

    🔍 Track Task Execution

  2. integry commented on Dec 1, 2026

    @integry
    OwnerAuthor

    Connect side: integry/propr-routing#344. It returns an optional inlineUrl from preview finalize. Use it when present. Keep today's link-only fallback when it's absent, so this works before and after the Connect deploy.

  3. integry commented on Dec 1, 2026

    @integry
    OwnerAuthor

    Done in #3949, which merged into the runtime epic; the epic merged into main with #3774 and ships in 0.9.4.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions