fix+feat: crash fix, null-safety, device-consistent PDFs, Height combo (verified E2E) - #8
Merged
Merged
Conversation
Render the Height field as a text input backed by a <datalist> of common heights (4'6"–6'6" with cm), so users can pick a value or type their own. Adds a 'combo' field type to the data model. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Royal used a viewport-responsive grid (grid-cols-1 sm:grid-cols-2) inside the document, so on a narrow phone it collapsed to one column, measured taller, and paginated to 2 pages while desktop showed 1 — a different PDF per device. The A4 document must never use viewport breakpoints; make it always 2 columns. Now identical on desktop and mobile (verified: same unit heights, 1 page). - Add a regression test asserting no template uses sm:/md:/lg:/xl: classes. - PDF filename: a non-Latin (e.g. Hindi) name slugifies to empty; fall back to "biodata.pdf" instead of "biodata-biodata.pdf". Verified via full E2E (5 templates × desktop/mobile): all download identical PDFs per template, no crashes clearing/retyping fields. 43 unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reset the file input's value after a successful read, so picking the same file again (e.g. after removing it) still fires change. Found via rapid-interaction stress testing (add → remove → add). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Comprehensive, fully-verified branch addressing the crashes, the cross-device PDF issues, and the Height field — all checked with an automated end-to-end harness (5 templates × desktop/mobile, real PDF downloads). Supersedes #7 (its commits are included here); recommend merging this and closing #7.
Fixes
Cannot read properties of undefined (reading 'label')). FramedDoc cached paginated pages in state; after an edit it briefly laid out stale pages against shorter data → out-of-range row index. Now cached pages are tagged with the data signature and only used when they match;nodeForis null-safe.noUncheckedIndexedAccess+noImplicitOverride; fixed the 15 unsafe index accesses it surfaced (non-empty tuples for the template/heading lists, guarded loops, etc.).tscis 0 errors.sm:grid-cols-2) inside the A4 document, so a phone collapsed it to 1 column and paginated to 2 pages while desktop showed 1. Made it always 2 columns; added a regression test that forbidssm:/md:/lg:/xl:in any template.biodata.pdfinstead ofbiodata-biodata.pdf.Feature
<datalist>of common heights (4'6"–6'6" with cm). Pick one or type your own. Newcombofield type in the data model.E2E verification (automated, headless)
fullName/fatherName/pob, "Clear all", and retyping; zero console errors.शिव शंकर तिवारी) + Devanagari header + photo + long values: render correctly in the PDF (no tofu) — the image-PDF captures the browser's own rendering, so any script works.npm run lintclean ·npm test43/43 ·next buildgreen.🤖 Generated with Claude Code