perf: lazy-load document pdf viewer#831
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughPDF preview components now load through client-only dynamic imports, using a shared accessible loading indicator while the PDF reader becomes available. ChangesPDF viewer loading
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
CI triageCI failed on this PR. Automated classification of the 6 failed job(s):
Compared with main CI run #3205 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
…ontend-document-viewer-lazy-831-hotfix-work
Summary
pdf-canvas-viewerloading insrc/components/DocumentViewer.tsxbehindnext/dynamic()so PDF-specific code is fetched only when a PDF is rendered.tests/document-viewer-pdf-reader-lazy.test.tsto ensure the PDF viewer imports remain outside the initial document client chunk.Verification
./node_modules/.bin/vitest run tests/document-viewer-pdf-reader-lazy.test.ts --reporter=dot(pass)npm run verify:cheap(blocked:docs/site-map.mdis stale; nositemapupdate included in this PR)npm run verify:uinot run: environment-level font/network constraint prevents stable local UI run in this task context.Clinical Governance Preflight
Not required. This change is limited to frontend bundle loading behavior in the document viewer and does not affect ingestion, answer generation, source rendering, clinical logic, or privacy-sensitive pathways.
Risk and rollout
Low-risk UI performance optimization. Behavior remains the same for PDF rendering, with a loading placeholder added for the lazy-loaded chunk; no new clinical logic or data-flow changes.