Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
fix: Resume import issues
Khuram Niaz818943cb27a8
diff --git a/src/components/profile/ResumeContainer.tsx b/src/components/profile/ResumeContainer.tsxindex 29f0735..ccc3275 100644--- a/src/components/profile/ResumeContainer.tsx+++ b/src/components/profile/ResumeContainer.tsx@@ -195,9 +195,7 @@ function PendingCardDetail({ card }: { card: ImportCardPayload }) {if (card.type === "experience") {const d = card.data;- const dates = [d.startDate, d.endDate ? d.endDate : "Present"]- .filter(Boolean)- .join(" – ");+ const dates = [d.startDate, d.endDate].filter(Boolean).join(" – ");return (<div className="space-y-1 mt-1"><DetailRow label="Title" value={d.jobTitle} />diff --git a/src/lib/ai/prompts/resume-import/system.ts b/src/lib/ai/prompts/resume-import/system.tsindex 66580e7..b6a50b2 100644--- a/src/lib/ai/prompts/resume-import/system.ts+++ b/src/lib/ai/prompts/resume-import/system.ts@@ -15,6 +15,14 @@ Parse the resume and return:- certifications: licenses and certifications with title, organization, dates, URL- unrecognizedSections: section names whose content cannot be mapped to any of the above fields (e.g. Projects, Publications, Volunteer Work, Awards). Do NOT include sections whose content was successfully parsed into contactInfo, summary, experience, education, certifications, or skills — even if the heading combines multiple categories (e.g. "Education & Certifications" or "Experience & Projects").+FIELD PRIORITY — for every experience and education entry, in this order:+1. company/institution and title/degree+2. startDate and endDate+3. description+Never drop or blank out dates to make room for a longer description. A short+or empty description with correct dates beats a full description with missing+dates.+SKILLS RULES:- skills is an object with a "categories" array.- Each category has an optional "label" (the sub-heading, e.g. "Languages",@@ -38,16 +46,19 @@ SUMMARY RULES:- Capture the FULL summary — all sentences, not just the first.- Return as a single plain text string. No HTML or markdown.+DATE RULES (applies to both experience and education, every entry):+- startDate and endDate are REQUIRED fields on every entry — never omit them.+ If a date is genuinely not stated in the document, use an empty string "".+- Return the exact string from the document (e.g. "Jan 2020", "2019", "Present").+- If an entry is ongoing (no end date given, or words like "Present"/"Current"),+ set endDate to "Present".+DESCRIPTION FIELD RULES (applies to both experience and education):-- The description field is REQUIRED. Always populate it.-- Copy EVERY bullet point VERBATIM. Do NOT summarize, paraphrase, shorten,- rewrite, merge, or drop any bullet.-- Reproduce each bullet's full original wording — not a condensed version.-- If a position lists 6 bullets, the description MUST contain all 6, in order.- Never stop after the first one or two.+- The description field is REQUIRED. Populate it whenever the entry has bullet+ points or details; use "" only if none exist.+- Copy bullet points VERBATIM, in order, without summarizing or dropping any.- Preserve bullet symbols (•) at the start of each line. Join lines with newlines.- Do not use HTML or markdown.-- If no details are listed under an entry, set description to an empty string "".Example — given this resume text:Software Engineer | Acme Corp | Jan 2020 - Present@@ -58,5 +69,10 @@ Example — given this resume text:The experience entry must be:{ "company": "Acme Corp", "jobTitle": "Software Engineer", "startDate": "Jan 2020", "endDate": "Present", "description": "• Led API redesign serving 1M users\\n• Reduced latency by 40%\\n• Managed a team of 5 engineers" }-For dates, return the exact string from the document (e.g. "Jan 2020", "2019", "Present").-Never fabricate information.`;+Education follows the identical rules. Given: "B.S. Computer Science | State University | 2016 - 2020"+The education entry must be:+ { "institution": "State University", "degree": "B.S.", "fieldOfStudy": "Computer Science", "startDate": "2016", "endDate": "2020" }++Before finalizing, check every experience and education entry has startDate,+endDate, and description populated (using "" only when truly absent from the+document). Never fabricate information.`;diff --git a/src/lib/constants.ts b/src/lib/constants.tsindex 4844bb5..3fbdbd2 100644--- a/src/lib/constants.ts+++ b/src/lib/constants.ts@@ -40,7 +40,7 @@ export const APP_CONSTANTS = {// Resume import generation timeout. Generous because a full resume streams a// few thousand tokens of verbatim JSON, which a local model can take minutes// to produce; too low and the stream is cut mid-entry.- AI_RESUME_IMPORT_TIMEOUT_MS: 180_000,+ AI_RESUME_IMPORT_TIMEOUT_MS: 240_000,// Resume review generation timeout. The review is a full markdown analysis// (scores line plus several sections), so a local model can take minutes;diff --git a/src/models/resumeImport.schema.ts b/src/models/resumeImport.schema.tsindex 669e81d..0a86031 100644--- a/src/models/resumeImport.schema.ts+++ b/src/models/resumeImport.schema.ts@@ -18,8 +18,10 @@ export const ImportExperienceSchema = z.object({company: z.string(),jobTitle: z.string(),location: z.string().optional(),- startDate: z.string().optional(),- endDate: z.string().optional(), // null / "Present" / "Current" = current job+ // Required (with a "" fallback) rather than .optional() so the model's+ // JSON-schema grammar can't omit the key outright — only leave it empty.+ startDate: z.string().catch(""),+ endDate: z.string().catch(""), // "" / "Present" / "Current" = current jobdescription: z.string().catch(""),confidence,});@@ -29,8 +31,8 @@ export const ImportEducationSchema = z.object({degree: z.string().optional(),fieldOfStudy: z.string().optional(),location: z.string().optional(),- startDate: z.string().optional(),- endDate: z.string().optional(),+ startDate: z.string().catch(""),+ endDate: z.string().catch(""), // "" / "Present" / "Current" = still enrolleddescription: z.string().catch(""),confidence,});