Repository navigation
Conversation
…(D565) Share sends a 1200x630 JPEG of the canvas beside the scene. The Worker keeps it as cards/<id>.jpg, outside the content hash, first card kept, and /s/<id> rewrites the /play page's og and twitter tags with the scene's title, its link and, when it has one, /api/card/<id>.jpg.
Contributor
|
Claude finished @lnorton89's task in 19s —— View job Review of #118The change is correct and well-tested for what it covers. I found no rule violations: there is no 1. First-card-wins can be squatted (
2. The "right size" check is only a magic-byte check (
Minor
Summary: the change is sound, with the two points above. I left no inline comments. |
Its Linux CUDA binary began answering 404 and failed npm ci. The site runs CLIP in the browser (D560) and never uses it; the CPU binaries are kept.
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.
Pasted into a chat or a post, every
/s/<id>link showed the sandbox's own card. Now it shows the scene.cardFromCanvas(site/src/lib/play/card.ts) copies the canvas, crops the largest centred 1200x630 part, and encodes a JPEG under 160 KB, sent ascardbeside the scene.cards/<id>.jpg(site/worker/share-card.ts). It is outside the content hash, so ids and old links are unchanged, and a scene keeps the first card it gets. Anything that is not a JPEG of the right size is dropped and the scene is still shared./s/<id>rewrites the page's social tags: the scene's title, its link, and/api/card/<id>.jpgwhen it has a card. A scene without one keeps the generic picture with its own title.Decision D565; roadmap and site README updated (the README says how to delete a card with its scene).
Checked: site unit tests (340, including
share-worker.test.ts, which drives the Worker's routes end to end against a fake bucket),tsc,eslint, and the conventions tests.Not checked: the capture in a real browser, the full site build and Playwright smoke test, the deployed Worker, and a real link preview. Not deployed.