Skip to content

fix: keep exported PDF links clickable - #84

Merged
andrewjiang merged 1 commit into
mainfrom
claude/cv-viewport-scaling-k8hfzz
Jul 27, 2026
Merged

andrewjiang merged 1 commit into
mainfrom
claude/cv-viewport-scaling-k8hfzz

Conversation

@andrewjiang

Copy link
Copy Markdown
Owner

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

ResumePrintView rendered the sheet with interactive={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:

  • before: 0 /URI annotations in the generated PDF
  • after: 8 (mailto:, x.com, linkedin, github, and inline URLs)

Why not drop the interactive gate entirely

#67 removes the gate in resume-content.tsx instead, which also lights up the resume thumbnails rendered by ResumePaperPreview. Those previews sit inside <Link> cards on /templates and 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 logging In HTML, <a> cannot be a descendant of <a> followed by Hydration 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 interactive a meaningful prop rather than dead code.

Verification

  • /templates and the landing page: 0 nested anchors, no hydration errors (only the pre-existing favicon manifest warning)
  • print route: 12 anchors, 0 flattened spans, no console errors
  • pnpm test (108 tests), pnpm lint, pnpm build

Possible follow-up: interactive now 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

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
@vercel

vercel Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cvstudio Ready Ready Preview, Comment Jul 27, 2026 8:26pm

Request Review

@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

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.

@andrewjiang
andrewjiang merged commit acd8ab1 into main Jul 27, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3e446074 Deployed Jul 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants