Repository navigation
feat: social cards that show the resume they link to - #85
Open
andrewjiang wants to merge 1 commit into
Open
andrewjiang wants to merge 1 commit into
andrewjiang wants to merge 1 commit into
Conversation
Every published resume shared the same generic Tiny CV card, so a link to someone's CV previewed as marketing art rather than their resume. Render a per-resume card instead, using the browser renderer that already backs PDF export: an internal 1200x630 surface lays out the real sheet on the app's paper background, and the card route screenshots it at 2x. Because the card is the same ResumeDesktopSheet the published page and the PDF use, a card can never drift from the resume it links to. The page is scaled to 1.2 and anchored to the top, so the card shows the head of the resume — name, headline, contact, summary, and the first role — at a readable size instead of a shrunken full page. The card URL carries a version derived from the resume's publish time, so a republished resume gets a fresh card while unchanged ones stay cached at the edge. Anything that stops us rendering the resume itself — no browser, no store, rate limited, unknown slug — falls back to the generic card rather than breaking the preview. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
Every published resume shared the same generic Tiny CV card, so sharing a link to someone's CV previewed as marketing art rather than their resume.
How it works
The card is rendered with the browser renderer that already backs PDF export, not a second renderer:
internal/social-card/[slug]is a 1200×630 surface that lays out the realResumeDesktopSheeton the app's paper background. Because it is the same sheet the published page and the PDF use, a card can never drift from the resume it links to.[slug]/social-cardscreenshots that surface throughwithBrowserPageat 2x and returns the PNG.--cv-stage-scalemechanism added for viewport scaling, so no new scaling machinery.Caching and failure behavior
s-maxage=604800, stale-while-revalidate=604800).social:cardaction (120/min), consistent with the other browser-backed routes.Verification
GET /<slug>/social-cardreturns a 2400×1260 PNG with the expected cache headers; an unknown slug returns a 307 to/og-image.png.og:image,og:image:width/height/type/altand the matchingtwitter:imagetags pointing at the versioned card URL.fitScale: 1, centered sans atfitScale: 0.9) to confirm the framing holds across templates.pnpm test(112 tests, 4 new),pnpm lint, the design-readiness check, andpnpm buildall pass.Note for deploys: cards need the same Chromium access as PDF jobs (
TINYCV_BROWSER_WS_ENDPOINTorTINYCV_CHROME_EXECUTABLE_PATH). Without it published pages keep the generic card. README and the launch checklist are updated to say so.🤖 Generated with Claude Code
https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN
Generated by Claude Code