Repository navigation
Show plugin screenshots and icons in marketplace link previews - #4786
Conversation
Load screenshots, icons, and avatars for plugin share images from the marketplace R2 bucket instead of fetching getbb.app from inside the Worker, which failed and left every card on the text fallback. Redesign the card around the plugin screenshot with the plugin icon, category, and author avatar, and share the plugin icon map with the site. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0127db35c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const titleSize = screenshot | ||
| ? Math.min(44, Math.floor(384 / (name.length * 0.48))) | ||
| : 64; |
There was a problem hiding this comment.
Scale titles on no-screenshot cards
When a plugin has no screenshot and a moderately long display name, this branch fixes the title at 64px even though its text column is now only 760px wide and the name may retain up to 40 characters. Names that fit the previous 1000px/52px layout can therefore overflow into the large icon or be clipped off-card; apply the same width-based scaling used for screenshot cards to this layout.
Useful? React with 👍 / 👎.
| for (const url of declared) { | ||
| const image = await loadImage(url, loadAsset); | ||
| if (image) return image; | ||
| } |
There was a problem hiding this comment.
Bound retries across all screenshot candidates
When a valid manifest lists several unreachable external screenshots, this serial loop gives every candidate its own five-second fetch timeout, so the OG response can now stall for roughly 30 seconds before rendering the fallback. The schema permits up to six screenshot URLs, while the previous implementation made only one timed request; use a request-wide deadline or parallel/bounded loading so social crawlers do not time out before receiving the card.
Useful? React with 👍 / 👎.
Reject screenshots and icons whose decoded size would exceed a pixel budget, unsupported image types, and oversized bodies before inlining them, so resvg never decodes multi-megapixel images inside the Worker. Scale long titles on cards without a screenshot so they no longer run under the icon tile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Detect PNG and JPEG from their signatures before applying the pixel budget so a mislabeled image cannot bypass it, and reject SVG icons that embed raster images, which resvg would otherwise decode at full size. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cap SVG icons at 64 KB and reject any SVG that declares a DOCTYPE or entities or contains image or feImage elements under any namespace prefix, so embedded rasters cannot bypass the pixel budget. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves the conflicts with #4786 (icons moved to marketplace-icons.ts) and #4791 (shared install badge). Only plugins installed by default now show "Built in"; opt-in official plugins like Tasks show their install counts, matching the in-app plugin store. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Human comments
What was wrong
Plugin share images were text-only in production. The image route fetched screenshots from getbb.app inside the Worker serving getbb.app, and that request failed.
What changed
No route,
og:image, or response-code changes.How you verified
/marketplace/og/<id>against the live catalog seeded into local R2. The table below shows the results.bb-sidebar(4500×3156 screenshots) renders the icon card instead of decoding them.Before: merge base
621b52e· After:7714ec1· 1200×630, the route's exact output. In the dev app the base code can reach getbb.app, so its cards show a small screenshot; production shows text only.BB-Thread-ID: thr_ag5nqdcxtg
🤖 Generated with Claude Code