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
feat(jobs): hide match score for unanalyzed jobs and update related components
Khuram Niaz11e72f362c6d
diff --git a/__tests__/JobDetails.spec.tsx b/__tests__/JobDetails.spec.tsxindex b58087e..2768937 100644--- a/__tests__/JobDetails.spec.tsx+++ b/__tests__/JobDetails.spec.tsx@@ -238,6 +238,25 @@ describe("JobDetails – match data display", () => {expect(screen.getByTestId("circular-score")).toHaveTextContent("72%");expect(screen.getByTestId("match-details")).toBeInTheDocument();});++ // Automation saves outside the LLM top-K hold only a keyword pre-rank.+ it("treats an un-analyzed automation job as not matched", () => {+ onTab("match");+ render(+ <JobDetails+ {...baseProps}+ job={makeJob({+ matchScore: 28,+ matchData: JSON.stringify({ prerankScore: 0.29, analyzed: false }),+ })}+ />,+ );++ expect(screen.queryByTestId("circular-score")).not.toBeInTheDocument();+ expect(screen.getByText("Not matched")).toBeInTheDocument();+ expect(screen.getByText(/no match analysis yet/i)).toBeInTheDocument();+ expect(screen.queryByTestId("match-details")).not.toBeInTheDocument();+ });});describe("JobDetails – tabs", () => {diff --git a/__tests__/job.actions.spec.ts b/__tests__/job.actions.spec.tsindex 12f28c3..4346f16 100644--- a/__tests__/job.actions.spec.ts+++ b/__tests__/job.actions.spec.ts@@ -157,6 +157,31 @@ describe("jobActions", () => {expect(prisma.job.findMany).toHaveBeenCalledTimes(1);expect(prisma.job.count).toHaveBeenCalledTimes(1);});+ it("should hide the pre-rank score of un-analyzed jobs and drop matchData", async () => {+ (getCurrentUser as any).mockResolvedValue(mockUser);+ (prisma.job.findMany as any).mockResolvedValue([+ {+ id: "unanalyzed",+ matchScore: 28,+ matchData: JSON.stringify({ prerankScore: 0.29, analyzed: false }),+ },+ {+ id: "analyzed",+ matchScore: 71,+ matchData: JSON.stringify({ matchScore: 71, body: "## Summary" }),+ },+ { id: "unmatched", matchScore: null, matchData: null },+ ]);+ (prisma.job.count as any).mockResolvedValue(3);++ const result = await getJobsList();++ expect(result.data).toStrictEqual([+ { id: "unanalyzed", matchScore: null },+ { id: "analyzed", matchScore: 71 },+ { id: "unmatched", matchScore: null },+ ]);+ });it("should return error when fetching data fails", async () => {(getCurrentUser as any).mockResolvedValue(mockUser);diff --git a/src/actions/job/queries.ts b/src/actions/job/queries.tsindex bd11dd7..004b69b 100644--- a/src/actions/job/queries.ts+++ b/src/actions/job/queries.ts@@ -20,10 +20,24 @@ const JOB_LIST_SELECT = {Resume: true,CoverLetter: true,matchScore: true,+ matchData: true,discoveryStatus: true,_count: { select: { Notes: true } },};+// An automation job saved without LLM analysis carries only its keyword+// pre-rank in matchScore, which the list must not show as an AI match. The+// matchData body is dropped so the list payload stays small.+function hideUnanalyzedScore<+ T extends { matchScore: number | null; matchData: string | null },+>({ matchData, ...job }: T) {+ let analyzed = true;+ try {+ analyzed = JSON.parse(matchData ?? "{}").analyzed !== false;+ } catch {}+ return analyzed ? job : { ...job, matchScore: null };+}+const JOB_EXPORT_SELECT = {id: true,createdAt: true,@@ -208,7 +222,7 @@ export const getJobsList = async (where: whereClause,}),]);- return { success: true, data, total };+ return { success: true, data: data.map(hideUnanalyzedScore), total };} catch (error) {const msg = "Failed to fetch jobs list. ";return handleError(error, msg);diff --git a/src/components/myjobs/JobDetails.tsx b/src/components/myjobs/JobDetails.tsxindex 75c89b6..c839a61 100644--- a/src/components/myjobs/JobDetails.tsx+++ b/src/components/myjobs/JobDetails.tsx@@ -227,7 +227,7 @@ function JobDetails({</TabsContent><TabsContent value="match" className="mt-4"><Card className="p-6">- {parsedMatchData ? (+ {parsedMatchData && parsedMatchData.analyzed !== false ? (<MatchDetails matchData={parsedMatchData} />) : (<JobTabEmptyStatediff --git a/src/components/myjobs/job-details/JobSummaryCard.tsx b/src/components/myjobs/job-details/JobSummaryCard.tsxindex 6cc928c..cd86c36 100644--- a/src/components/myjobs/job-details/JobSummaryCard.tsx+++ b/src/components/myjobs/job-details/JobSummaryCard.tsx@@ -76,7 +76,7 @@ export function JobSummaryCard({</div><div><p className="text-sm text-muted-foreground">AI Match</p>- {job.matchScore != null ? (+ {job.matchScore != null && matchData?.analyzed !== false ? (<div className="mt-1 flex flex-wrap items-center gap-2"><CircularScore score={job.matchScore} size="sm" />{matchData?.recommendation && (diff --git a/wiki/jobs.md b/wiki/jobs.mdindex 5e9cc68..8f57b19 100644--- a/wiki/jobs.md+++ b/wiki/jobs.md@@ -55,7 +55,7 @@ The list also has a view toggle for table or card layout, and a reload button th## How do I run an AI match from the jobs list?-A job that has no AI match score shows a **Match** button where its score would be — in the Match column in table view, and in the top-right corner of the card in card view. Clicking it opens that job's details page on the **AI Match** tab and starts the match straight away, so you do not have to open the job and click again. The match itself runs in the assistant panel exactly as it does from the job's own **Match with AI** button; when it finishes, the analysis is already on the tab in front of you.+A job that has no AI match score shows a **Match** button where its score would be — in the Match column in table view, and in the top-right corner of the card in card view. That includes a listing an [automation](./automations.md) saved without AI-scoring it: its relevance percentage stays on the automation page and is never shown here as a match score. Clicking it opens that job's details page on the **AI Match** tab and starts the match straight away, so you do not have to open the job and click again. The match itself runs in the assistant panel exactly as it does from the job's own **Match with AI** button; when it finishes, the analysis is already on the tab in front of you.Jobs that already have a score show the score instead. To re-run a match on one of those, open the job and use **Match with AI** in its header.