fix: PDF preview viewer broken on sign page - #10
Conversation
…r pool Buffer.buffer on pooled small buffers returns the whole 8KB pool with a non-zero offset, so preview PDFs started with garbage instead of %PDF- and the iframe viewer on the sign page failed to render. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review: PDF preview buffer fixReviewed the diff (2 files, 4 lines changed) plus the surrounding notice-generation and dispatch code. What it does: Replaces Why this matters beyond a cosmetic fix: Verified no regressions:
No issues found. This is a minimal, correct, and worthwhile fix. |
Summary
Buffer.buffer, which for small (<8KB) buffers is Node's shared 8KB pool with a non-zero byte offset — so the response contained garbage bytes around the PDF and the iframe viewer on the sign page failed to render.preview-noticeandpreview-hash-advisoryto copy into an exact-sizedUint8Array.Testing
npm run type-checkand fullnpm run test(293 passed) via pre-push hook.🤖 Generated with Claude Code