[Bug]: Custom sections parsed from an uploaded resume are silently missing from the editor and PDF

Author: memyselfandmCreated Sep 30, 2026Updated Sep 30, 2026

Describe the bug

When I upload a resume that contains non-standard sections (for example Publications or Volunteer Work), the parser correctly puts them into customSections, but no sectionMeta entries are created for them. The builder form and every resume template iterate sectionMeta, so these sections never appear in the editor, the preview, or the exported PDF. The data is still stored, so nothing tells the user that content was dropped.

A related problem affects API clients: SectionMeta.isDefault defaults to true, and the templates only render custom sections when isDefault is false. If I add a custom section's meta via PATCH /api/v1/resumes/{id} without explicitly sending "isDefault": false, it is stored as isDefault: true and still does not render.

Root cause (commit 9c05e42):

  1. The parse prompt asks for customSections but never for their metadata. RESUME_SCHEMA_EXAMPLE (apps/backend/app/prompts/templates.py:21) includes customSections (e.g. publications, volunteer_work) and no sectionMeta, and PARSE_RESUME_PROMPT (templates.py:162-164) instructs the model to put non-standard sections into customSections.

  2. parse_resume_to_json (apps/backend/app/services/parser.py:814-849) validates through ResumeData, where sectionMeta defaults to [] (apps/backend/app/schemas/models.py:421). The upload route stores that result as-is (apps/backend/app/routers/resumes.py:1041, 1057-1062); the retry-processing route does the same (resumes.py:2190).

  3. On read, normalize_resume_data (models.py:394-406) sees an empty sectionMeta and fills it with DEFAULT_SECTION_META (models.py:336-390), which only contains the six built-in sections. Nothing derives entries for existing customSections keys. GET /api/v1/resumes applies this at resumes.py:1122-1123.

  4. The frontend does the same fallback: getSectionMeta / getSortedSections (apps/frontend/lib/utils/section-helpers.ts:130-139) return DEFAULT_SECTION_META when sectionMeta is empty, and nothing reconciles customSections keys that have no meta.

  5. The builder form renders only sections present in sectionMeta (apps/frontend/components/builder/resume-form.tsx:400-407). A meta entry with isDefault: true and an unknown key falls through to default: return null (resume-form.tsx:272-273), so the editor shows no content for it.

  6. All seven templates iterate getSortedSections(data) and gate custom sections on !isDefault:

    • resume-single-column.tsx:37, :254
    • resume-modern.tsx:37, :254
    • resume-clean.tsx:39, :262
    • resume-latex.tsx:39, :258
    • resume-two-column.tsx:55, :85
    • resume-modern-two-column.tsx:61, :93
    • resume-vivid.tsx:49, :76

    (all under apps/frontend/components/resume/). The print route used for PDF export (apps/frontend/app/print/resumes/[id]/page.tsx:180) passes data through withLocalizedDefaultSections, which applies the same built-ins-only fallback.

  7. SectionMeta.isDefault defaults to True (models.py:263), and PATCH /api/v1/resumes/{id} (resumes.py:1990-2010) stores ResumeData.model_dump() without checking that value. Only the UI's "Add section" flow sets isDefault: false (section-helpers.ts:178).

The recent "duplicate entries and custom sections" changes (duplicateCustomSection in section-helpers.ts) only act on sections that already have meta, so they do not cover this case.

To Reproduce

A. Upload (UI)

  1. Configure any LLM provider and start the app on main (9c05e42).
  2. Upload a PDF/DOCX resume that has, besides Experience and Education, a "Publications" section and a "Volunteer Work" section.
  3. Wait for processing to finish and open the resume in the builder.
  4. The Publications and Volunteer Work sections are not shown in the form, the preview, or the downloaded PDF.
  5. GET /api/v1/resumes?resume_id=<id> shows them in processed_resume.customSections, but processed_resume.sectionMeta only lists the six built-in sections.

I reproduced this in-process with httpx.ASGITransport against app.main:app and an isolated data directory. I mocked parse_document and the LLM call (complete_json) to return a payload shaped exactly like RESUME_SCHEMA_EXAMPLE, so the real parse_resume_to_json validation, upload route, and GET normalization all ran:

UPLOAD 200 {... 'processing_status': 'ready', 'is_master': True, ...}
GET customSections keys: ['publications', 'volunteer_work']
GET sectionMeta keys:    ['personalInfo', 'summary', 'workExperience', 'education', 'personalProjects', 'additional']
customSections keys WITHOUT sectionMeta: ['publications', 'volunteer_work']

B. PATCH without isDefault (API)

bash
RID=<resume_id>
curl -s "http://localhost:8000/api/v1/resumes?resume_id=$RID" \
  | jq '.data.processed_resume
        | .sectionMeta += [{"id":"publications","key":"publications",
                            "displayName":"Publications","sectionType":"itemList",
                            "isVisible":true,"order":6}]' \
  > body.json
curl -s -X PATCH "http://localhost:8000/api/v1/resumes/$RID" \
  -H 'Content-Type: application/json' --data @body.json \
  | jq '.data.processed_resume.sectionMeta[] | select(.key=="publications")'

Result:

{'id': 'publications', 'key': 'publications', 'displayName': 'Publications',
 'sectionType': 'itemList', 'isDefault': True, 'isVisible': True, 'order': 6}

The section is now in sectionMeta but is still not rendered by any template, and the builder shows it with an empty body.

Expected behavior

  • Every non-empty key in customSections that comes from parsing an uploaded resume shows up in the builder, the preview, and the PDF, with a sensible display name (e.g. "Publications", "Volunteer Work") and the sectionType from the parsed data.
  • A sectionMeta entry whose key is not a built-in section is treated as a custom section (isDefault: false), or the API rejects it with a clear validation error instead of storing a section that can never render.

Suggested fix:

  • In normalize_resume_data (so it covers upload, retry, GET, and existing stored resumes), append a SectionMeta for each customSections key that has none: id and key set to the key, displayName derived from the key (volunteer_work → "Volunteer Work"), sectionType taken from the custom section, isDefault: false, isVisible: true, and order after the current maximum. The same step is needed when sectionMeta is non-empty but incomplete, not only when it is empty.
  • Make isDefault depend on the key, e.g. a SectionMeta validator that sets isDefault = key in BUILTIN_SECTION_KEYS, or at least default it to False for keys that are not built-in. Otherwise, reject the inconsistent combination on PATCH.
  • Optionally, mirror the reconciliation in getSectionMeta on the frontend so data that was already stored renders without a backend round-trip.
  • Optionally, have the parse prompt also return a human-readable title for each custom section so the display name is not guessed from the key.

Environment

  • Resume Matcher main at commit 9c05e42 (after #1010)
  • Backend: Python / FastAPI (apps/backend), any LLM provider (the parse output shape is set by the prompt, not by the provider)
  • OS / Browser: macOS; affects all browsers because the section list is derived from the data

Screenshots

N/A. The API output above shows the missing metadata.