Skip to content

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.

Fix resumeToText issue and minor layout

Khuram Niaz744509af014e
diff --git a/src/components/RadialChart.tsx b/src/components/RadialChart.tsx
index 2d158f0..46d5729 100644
--- a/src/components/RadialChart.tsx
+++ b/src/components/RadialChart.tsx
@@ -25,7 +25,7 @@ export function RadialChartComponent({ score }: { score: number }) {
return (
<ChartContainer
config={chartConfig}
- className="mx-auto aspect-square w-full max-w-[180px] max-h-[180px]"
+ className="mx-auto aspect-square w-full max-w-[180px] mb-[-40px]"
>
<RadialBarChart
data={chartData}
diff --git a/src/components/profile/AiJobMatchResponseContent.tsx b/src/components/profile/AiJobMatchResponseContent.tsx
index 1949524..ec20909 100644
--- a/src/components/profile/AiJobMatchResponseContent.tsx
+++ b/src/components/profile/AiJobMatchResponseContent.tsx
@@ -58,7 +58,7 @@ export const AiJobMatchResponseContent = ({
)}
{summary && (
- <div className={matchScore !== undefined ? "mt-[-30px]" : ""}>
+ <div>
<SectionHeader title="Summary" />
<SheetDescription>{summary}</SheetDescription>
</div>
@@ -76,7 +76,7 @@ export const AiJobMatchResponseContent = ({
<ListItem key={i}>
<strong>{req.requirement}</strong>: {req.evidence}
</ListItem>
- )
+ ),
)}
</ul>
</>
@@ -90,11 +90,9 @@ export const AiJobMatchResponseContent = ({
req && (
<ListItem key={i}>
<strong>{req.requirement}</strong>: {req.evidence}{" "}
- <span className="text-amber-600">
- (Gap: {req.gap})
- </span>
+ <span className="text-amber-600">(Gap: {req.gap})</span>
</ListItem>
- )
+ ),
)}
</ul>
</>
@@ -123,7 +121,7 @@ export const AiJobMatchResponseContent = ({
Suggestion: {req.suggestion}
</span>
</ListItem>
- )
+ ),
)}
</ul>
</>
@@ -226,7 +224,7 @@ export const AiJobMatchResponseContent = ({
<SectionHeader title="Deal Breakers" />
<ul className="text-sm text-red-600">
{dealBreakers.map(
- (item, i) => item && <ListItem key={i}>{item}</ListItem>
+ (item, i) => item && <ListItem key={i}>{item}</ListItem>,
)}
</ul>
</>
@@ -242,7 +240,7 @@ export const AiJobMatchResponseContent = ({
<ListItem key={i}>
<strong>{tip.section}:</strong> {tip.action}
</ListItem>
- )
+ ),
)}
</ul>
</>
diff --git a/src/components/profile/AiJobMatchSection.tsx b/src/components/profile/AiJobMatchSection.tsx
index a752fc6..8d2fba3 100644
--- a/src/components/profile/AiJobMatchSection.tsx
+++ b/src/components/profile/AiJobMatchSection.tsx
@@ -51,7 +51,8 @@ export const AiJobMatchSection = ({
const selectedModel: AiModel = getFromLocalStorage(
"aiSettings",
- defaultModel
+
+ defaultModel,
);
const resumesRef = useRef<Resume[]>([]);
@@ -98,7 +99,7 @@ export const AiJobMatchSection = ({
setRunningModelError("");
const result = await checkIfModelIsRunning(
selectedModel.model,
- selectedModel.provider
+ selectedModel.provider,
);
if (result.isRunning && result.runningModelName) {
setRunningModelName(result.runningModelName);
@@ -213,9 +214,6 @@ export const AiJobMatchSection = ({
<div className="flex items-center flex-col mt-4">
<Loading />
<div className="mt-2">Analyzing job match...</div>
- <div className="text-xs text-muted-foreground mt-1">
- Agent is comparing qualifications
- </div>
</div>
) : (
<AiJobMatchResponseContent
diff --git a/src/components/profile/AiResumeReviewResponseContent.tsx b/src/components/profile/AiResumeReviewResponseContent.tsx
index 2e02f5c..7b21602 100644
--- a/src/components/profile/AiResumeReviewResponseContent.tsx
+++ b/src/components/profile/AiResumeReviewResponseContent.tsx
@@ -30,7 +30,7 @@ const ScoresSection = ({
return (
<div className="pt-4">
{scores.overall !== undefined && (
- <div className="flex justify-center mb-4">
+ <div className="flex justify-center">
<RadialChartComponent score={scores.overall} />
</div>
)}
@@ -39,10 +39,12 @@ const ScoresSection = ({
(item) =>
item.value !== undefined && (
<div key={item.label} className="text-center">
- <div className="text-xs text-muted-foreground">{item.label}</div>
+ <div className="text-xs text-muted-foreground">
+ {item.label}
+ </div>
<div className="font-semibold">{item.value}</div>
</div>
- )
+ ),
)}
</div>
</div>
@@ -108,7 +110,9 @@ const AchievementsSection = ({
Suggested Metrics to Add
</div>
<ul className="text-sm text-muted-foreground space-y-1">
- {missingMetrics.map((item, i) => item && <li key={i}>- {item}</li>)}
+ {missingMetrics.map(
+ (item, i) => item && <li key={i}>- {item}</li>,
+ )}
</ul>
</div>
)}
@@ -148,7 +152,7 @@ const KeywordsSection = ({
<Badge key={i} variant="secondary" className="text-xs">
{kw}
</Badge>
- )
+ ),
)}
</div>
</div>
@@ -165,14 +169,16 @@ const KeywordsSection = ({
<Badge key={i} variant="outline" className="text-xs">
{kw}
</Badge>
- )
+ ),
)}
</div>
</div>
)}
{overused && overused.length > 0 && (
<div>
- <div className="text-xs font-medium text-red-600 mb-1">Overused</div>
+ <div className="text-xs font-medium text-red-600 mb-1">
+ Overused
+ </div>
<div className="flex flex-wrap gap-1">
{overused.map(
(kw, i) =>
@@ -180,7 +186,7 @@ const KeywordsSection = ({
<Badge key={i} variant="destructive" className="text-xs">
{kw}
</Badge>
- )
+ ),
)}
</div>
</div>
@@ -223,7 +229,7 @@ const ActionVerbsSection = ({
<Badge key={i} variant="secondary" className="text-xs">
{v}
</Badge>
- )
+ ),
)}
</div>
</div>
@@ -240,7 +246,7 @@ const ActionVerbsSection = ({
<Badge key={i} variant="outline" className="text-xs">
{v}
</Badge>
- )
+ ),
)}
</div>
</div>
@@ -256,11 +262,13 @@ const ActionVerbsSection = ({
s?.replace &&
s?.with && (
<li key={i} className="flex items-center gap-1">
- <span className="line-through text-red-500">{s.replace}</span>
+ <span className="line-through text-red-500">
+ {s.replace}
+ </span>
<ArrowRight className="h-3 w-3" />
<span className="text-green-600">{s.with}</span>
</li>
- )
+ ),
)}
</ul>
</div>
@@ -275,7 +283,8 @@ const SectionFeedbackSection = ({
}: {
sectionFeedback?: DeepPartial<ResumeReviewResponse["sectionFeedback"]>;
}) => {
- if (!sectionFeedback || Object.keys(sectionFeedback).length === 0) return null;
+ if (!sectionFeedback || Object.keys(sectionFeedback).length === 0)
+ return null;
const getStatusIcon = (status?: string) => {
switch (status) {
@@ -311,7 +320,7 @@ const SectionFeedbackSection = ({
</p>
)}
</div>
- )
+ ),
)}
</div>
</AccordionContent>
@@ -319,7 +328,11 @@ const SectionFeedbackSection = ({
);
};
-const ATSIssuesSection = ({ atsIssues }: { atsIssues?: (string | undefined)[] }) => {
+const ATSIssuesSection = ({
+ atsIssues,
+}: {
+ atsIssues?: (string | undefined)[];
+}) => {
if (!atsIssues || atsIssues.length === 0) return null;
return (
@@ -336,7 +349,7 @@ const ATSIssuesSection = ({ atsIssues }: { atsIssues?: (string | undefined)[] })
<XCircle className="h-3 w-3 text-red-600 mt-0.5 flex-shrink-0" />
{issue}
</li>
- )
+ ),
)}
</ul>
</AccordionContent>
@@ -374,7 +387,7 @@ const TopImprovementsSection = ({
</p>
)}
</div>
- )
+ ),
)}
</div>
</AccordionContent>
@@ -411,18 +424,24 @@ const GrammarSection = ({
(err, i) =>
err && (
<div key={i} className="text-sm">
- <span className="line-through text-red-500">{err.text}</span>
+ <span className="line-through text-red-500">
+ {err.text}
+ </span>
{err.correction && (
<>
<ArrowRight className="h-3 w-3 inline mx-1" />
- <span className="text-green-600">{err.correction}</span>
+ <span className="text-green-600">
+ {err.correction}
+ </span>
</>
)}
{err.issue && (
- <p className="text-xs text-muted-foreground">{err.issue}</p>
+ <p className="text-xs text-muted-foreground">
+ {err.issue}
+ </p>
)}
</div>
- )
+ ),
)}
</div>
</div>
@@ -480,7 +499,19 @@ export const AiResumeReviewResponseContent = ({
<ScoresSection scores={scores} />
<SummarySection summary={summary} />
- <Accordion type="multiple" className="w-full" defaultValue={["improvements", "achievements", "keywords", "verbs", "sections", "ats", "grammar"]}>
+ <Accordion
+ type="multiple"
+ className="w-full"
+ defaultValue={[
+ "improvements",
+ "achievements",
+ "keywords",
+ "verbs",
+ "sections",
+ "ats",
+ "grammar",
+ ]}
+ >
<TopImprovementsSection topImprovements={topImprovements} />
<AchievementsSection achievements={achievements} />
<KeywordsSection keywords={keywords} />
diff --git a/src/lib/ai/prompts/resume-review/user.ts b/src/lib/ai/prompts/resume-review/user.ts
index b363445..8e8fee9 100644
--- a/src/lib/ai/prompts/resume-review/user.ts
+++ b/src/lib/ai/prompts/resume-review/user.ts
@@ -40,10 +40,11 @@ ${resumeText}
- Key by section name (Summary, Experience, Skills, Education, etc.)
- Provide status (good/needsWork/missing) and specific feedback
-6. **ATS Issues** - List formatting/content issues:
- - Tables, graphics, unusual fonts
- - Missing standard sections
- - Parsing problems
+6. **ATS Issues** - Only list issues that ACTUALLY EXIST in this resume:
+ - Check for: tables, graphics, unusual fonts (only report if found)
+ - Check for: missing standard sections like Education, Skills (only report if truly missing)
+ - Check for: parsing problems (only report if present)
+ - If no ATS issues exist, return an empty array
7. **Top Improvements** - Prioritize 3-5 changes:
- Rank by impact (priority 1 = highest)
diff --git a/src/lib/ai/tools/preprocessing.ts b/src/lib/ai/tools/preprocessing.ts
index a2106f6..21009b9 100644
--- a/src/lib/ai/tools/preprocessing.ts
+++ b/src/lib/ai/tools/preprocessing.ts
@@ -107,15 +107,25 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
return parts.join("\n");
};
+ const formatDate = (date: Date) => {
+ const d = new Date(date);
+ return d.toLocaleDateString("en-US", { month: "short", year: "numeric" });
+ };
+
const formatWorkExperiences = (workExperiences?: WorkExperience[]) => {
if (!workExperiences || workExperiences.length === 0) return "";
return workExperiences
.map((experience) => {
const desc = removeHtmlTags(experience.description);
+ const startDate = formatDate(experience.startDate);
+ const endDate = experience.currentJob
+ ? "Present"
+ : formatDate(experience.endDate);
const parts = [
`Company: ${experience.Company.label}`,
`Job Title: ${experience.jobTitle.label}`,
`Location: ${experience.location.label}`,
+ `Dates: ${startDate} - ${endDate}`,
desc ? `Description: ${desc}` : "",
].filter(Boolean);
return parts.join("\n");
@@ -128,11 +138,16 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
return educations
.map((education) => {
const desc = removeHtmlTags(education.description);
+ const startDate = formatDate(education.startDate);
+ const endDate = education.endDate
+ ? formatDate(education.endDate)
+ : "Present";
const parts = [
`Institution: ${education.institution}`,
`Degree: ${education.degree}`,
`Field of Study: ${education.fieldOfStudy}`,
`Location: ${education.location.label}`,
+ `Dates: ${startDate} - ${endDate}`,
desc ? `Description: ${desc}` : "",
].filter(Boolean);
return parts.join("\n");
@@ -145,25 +160,36 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
return sections
.map((section) => {
switch (section.sectionType) {
- case SectionType.SUMMARY:
- return `Summary: ${removeHtmlTags(section.summary?.content)}`;
- case SectionType.EXPERIENCE:
- return formatWorkExperiences(section.workExperiences);
- case SectionType.EDUCATION:
- return formatEducation(section.educations);
+ case SectionType.SUMMARY: {
+ const content = removeHtmlTags(section.summary?.content);
+ return content ? `## SUMMARY\n${content}` : "";
+ }
+ case SectionType.EXPERIENCE: {
+ const content = formatWorkExperiences(section.workExperiences);
+ return content ? `## EXPERIENCE\n${content}` : "";
+ }
+ case SectionType.EDUCATION: {
+ const content = formatEducation(section.educations);
+ return content ? `## EDUCATION\n${content}` : "";
+ }
default:
return "";
}
})
- .join("\n");
+ .filter(Boolean)
+ .join("\n\n");
};
- const inputMessage = `
-Title: ${resume.title}
-${formatContactInfo(resume.ContactInfo)}
-${formatResumeSections(resume.ResumeSections)}
-`;
- return resolve(inputMessage);
+ const contactInfo = formatContactInfo(resume.ContactInfo);
+ const sections = formatResumeSections(resume.ResumeSections);
+
+ const parts = [
+ `# ${resume.title}`,
+ contactInfo ? `## CONTACT\n${contactInfo}` : "",
+ sections,
+ ].filter(Boolean);
+
+ return resolve(parts.join("\n\n"));
});
};
@@ -175,7 +201,6 @@ export const preprocessResume = async (
try {
// Convert resume object to raw text
const rawText = await convertResumeToText(resume);
-
// Quick validation - fail fast if obviously invalid
if (!rawText || rawText.trim().length < MIN_CHAR_COUNT) {
const charCount = rawText?.trim().length || 0;