feat(capture): og:image hero images for readable boards + modal star fix - #8
Merged
Conversation
Image descriptor fields had no fill path: the AI skips image fields by design (it can't emit a screenshot), and url-readable capture produced no image — so a board with an image field (e.g. a 'Wish List' with featured_image) silently showed nothing, status 'done', no error. Now url-readable also extracts the page's og:image (secure first, then twitter:image, JSON-LD product image, link[rel=image_src]) from the HTML captureLibrary already fetched — zero extra network — and downloads it as the item's image asset: - extractOgImage(html, url) — pure, resolves relative URLs (processor-library). - url-readable adapter downloads it: SSRF-guarded (assertCapturableUrl), capped (12MB, 8s, image content-types only), stored as a kind:'image' asset. Any failure leaves the capture successful with no asset (best-effort). - hydrate surfaces a kind:'image' asset as the card/modal image when there's no screenshot. - honest fallback: empty placeholder reads 'No image' (was 'No screenshot'). Verified live: refetching the Edifier product item produced its real product photo. tsc clean; +8 tests (5 extractOgImage, 3 download-path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In the item-detail modal the favorite star sits at the end of the title row. With a screenshot the close button (absolute, top-right) floats over the image and the row clears it; with NO screenshot the row is at the very top, so the star collided with the close button. Reserve right padding on the title row in the no-screenshot case (a .no-shot modifier) so the star clears it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Two commits.
1.
feat(capture):pull og:image so readable/product cards get a hero imageA "Wish List" board (url-readable + a
featured_imagefield) captured fine but never got a product image, silently — because image descriptor fields had no fill path: the AI skips image fields by design (can't emit a screenshot) andurl-readableproduced no image.Now
url-readablealso extracts the page'sog:image(secure first →twitter:image→ JSON-LD product image →link[rel=image_src]) from the HTMLcaptureLibraryalready fetched (zero extra network) and downloads it as the item's image asset:extractOgImage(html, url)— pure, resolves relative URLs.assertCapturableUrl) and capped (12MB, 8s, image content-types only); stored as akind: 'image'asset. Any failure leaves the capture successful with no asset (best-effort).hydratesurfaces akind: 'image'asset as the card/modal image when there's no screenshot.Verified live: refetching the Edifier product item produced its real product photo on the card.
2.
fix(ui):keep the modal favorite star clear of the close buttonWith no screenshot, the modal title row sits at the top and the favorite star collided with the absolute close button. Reserve right padding on the title row in the no-screenshot case (
.no-shotmodifier). With a screenshot the layout is unchanged.Verified:
tscclean; 532 tests pass (+8: 5extractOgImage, 3 download-path). Browser-confirmed both the og:image render and the modal spacing.Independent of the still-open #7 (empty-state copy ordering).
🤖 Generated with Claude Code