Skip to content

fix: validate AI response and guard downloadPDF against empty data - #39

Open
manya-singh7 wants to merge 2 commits into
abhi-jithb:masterfrom
manya-singh7:fix/blank-pdf-validation
Open

manya-singh7 wants to merge 2 commits into
abhi-jithb:masterfrom
manya-singh7:fix/blank-pdf-validation

Conversation

@manya-singh7

@manya-singh7 manya-singh7 commented Jun 3, 2026

Copy link
Copy Markdown

first commit belongs to PR #37

What changed

Fixes #10

Note: The first commit in this PR belongs to PR #37 (already open).
The actual fix is in the second commit.

How to test

  1. Enter a URL that blocks scrapers (e.g. a JavaScript-heavy site with no static text)
  2. Click Generate and wait through all 4 stages
  3. Observe: a clear error message appears instead of a blank PDF downloading

Visual Changes

No direct UI changes — this is a logic/validation fix.
The visible result is an inline error message now appears instead of
silently generating a blank resume.

Quality Checklist

Testing Locally

  • The app still loads and works end-to-end (paste a URL, generate, download).
  • Your change works on mobile (Chrome DevTools → responsive mode).
  • [] Your change works in Chrome, Firefox, and Safari (if relevant).
  • No new console errors or warnings are generated.
  • [] If you changed PDF output, the generated PDF looks correct.
  • [] If you changed the UI, it still matches the overall dark aesthetic.

Code Quality

  • My branch is completely up to date with main.
  • No commented-out debug code has been left in.
  • CSS variables are used for all colors (no hardcoded hex values that break theming).
  • All changes remain within index.html (unless strong architectural reasons were approved).

GSSoC '26 Compliance

  • This issue was officially assigned to me before opening this PR.
  • I have labeled this PR with gssoc26 in the description.
  • This communication and my code adjustments are completely my own work.

…bhi-jithb#10)

- Added validation after JSON parse to check name + at least one section
- Block PDF download if resume data is empty with clear error message
- Added console logging throughout AI pipeline for easier debugging
- Show helpful error messages guiding users to better URLs
@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

@manya-singh7 is attempting to deploy a commit to the Abhijith's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

bug: resume generates blank PDF — AI returns empty or unparseable data

1 participant