fix: keep exported PDF links clickable - #84
Merged
Merged
Conversation
The print view rendered the resume with interactive={false}, which flattens
every contact and inline link to a <span>. That view is what the PDF pipeline
prints, so exported PDFs carried no link annotations at all — the links were
only clickable in the live editor preview.
Render the print view with real anchors instead. Verified against the print
route: the generated PDF now carries link annotations for the contact row and
inline links (mailto, x, linkedin, github, and inline URLs) where it previously
had none.
The interactive flag still gates link rendering everywhere else, so the resume
thumbnails on /templates and the landing page stay inert — those previews sit
inside card links, and real anchors there would nest <a> inside <a>.
Fixes the bug reported in #67.
Co-authored-by: 0xf3dz <124228674+0xf3dz@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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. |
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.
Bug found and reported by @0xf3dz in #67 — this is the narrower version of that fix. Credit for the diagnosis goes to them; the commit carries their co-author trailer.
The bug
ResumePrintViewrendered the sheet withinteractive={false}, which flattens every contact and inline link to a<span class="cv-link">. That view is what the PDF pipeline prints, so exported PDFs carried no link annotations at all — links were only clickable in the live editor preview.The fix
Render the print view with real anchors (one line). Measured against the print route with a published resume:
/URIannotations in the generated PDFmailto:, x.com, linkedin, github, and inline URLs)Why not drop the
interactivegate entirely#67 removes the gate in
resume-content.tsxinstead, which also lights up the resume thumbnails rendered byResumePaperPreview. Those previews sit inside<Link>cards on/templatesand the landing page, so real anchors there nest<a>inside<a>. With that version applied I measured 28 nested anchors inside 20 card links on/templates(11 on the landing page), React loggingIn HTML, <a> cannot be a descendant of <a>followed byHydration failed because the server rendered HTML didn't match the client, and template thumbnails whose contact links navigate to LinkedIn instead of opening the template.Keeping the gate leaves those previews inert and keeps
interactivea meaningful prop rather than dead code.Verification
/templatesand the landing page: 0 nested anchors, no hydration errors (only the pre-existing favicon manifest warning)pnpm test(108 tests),pnpm lint,pnpm buildPossible follow-up:
interactivenow reads as a misnomer — it really means "render links as links". Renaming it touches every call site, so it seemed out of scope here.Closes #67
🤖 Generated with Claude Code
https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN
Generated by Claude Code