Skip to content

fix(automations): support uploaded resumes for matching - #110

Open
frank-mendez wants to merge 1 commit into
Gsync:devfrom
frank-mendez:fix/automation-resume-picker-109
Open

fix(automations): support uploaded resumes for matching#110
frank-mendez wants to merge 1 commit into
Gsync:devfrom
frank-mendez:fix/automation-resume-picker-109

Conversation

@frank-mendez

Copy link
Copy Markdown

Summary

Fixes the automation resume picker showing no resumes when a profile contains an uploaded PDF/DOCX without imported structured sections.

Changes

  • Include file-backed resumes in the automation create and edit pickers.
  • Extract attached PDF/DOCX text as the automation matching input when structured resume sections are unavailable.
  • Keep structured resume content authoritative when it exists.
  • Add regression coverage for picker filtering, attached-file matching, and safe file extraction.

Related Issues

Closes #109
Related to #76 and #91

Testing

  • npm run lint
  • npx tsc --noEmit
  • npm test -- __tests__/defaultResume.actions.spec.ts __tests__/greenhouse-runner.spec.ts __tests__/read-resume-file.spec.ts (28 passed)
  • npm test (2,400 passed; __tests__/backupRoundTrip.spec.ts could not initialize Prisma because of a schema engine error in the test setup)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new read-resume-file test setup likely won’t mock extractText correctly due to an import-specifier mismatch, which can make the test flaky or fail.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR fixes automation resume selection and matching for “file-backed” resumes (uploaded PDF/DOCX without imported structured sections) by allowing them to appear in the automation wizard and by extracting attached-file text as a fallback match input.

Changes:

  • Extend getResumeList to optionally include file-backed resumes in eligible results for automation pickers.
  • Update the automation runner to fall back to extracted PDF/DOCX text when structured resume content is unavailable (with per-run caching).
  • Add regression tests for file extraction and runner behavior with file-backed resumes.
File summaries
File Description
src/lib/scraper/runner.ts Adds attached-file text fallback for matching and caches resume match text per run.
src/lib/ai/import/read-resume-file.ts Introduces safe attached-file text extraction constrained to UPLOADS_DIR.
src/components/automations/AutomationWizard.tsx Updates wizard copy to reflect matching against structured content or attached documents.
src/app/dashboard/automations/page.tsx Requests resume list including file-backed resumes for create flow.
src/app/dashboard/automations/[id]/page.tsx Requests resume list including file-backed resumes for edit flow.
src/actions/profile/resume.ts Adds includeFileBacked option to include file-backed resumes when filtering by min sections.
tests/read-resume-file.spec.ts Adds unit tests for safe attached-file extraction behavior.
tests/greenhouse-runner.spec.ts Adds test coverage for runner fallback to attached resume text when sections are absent.
tests/defaultResume.actions.spec.ts Adds tests validating the new includeFileBacked filtering behavior.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

import { readFile } from "fs/promises";
import path from "path";
import { APP_CONSTANTS } from "@/lib/constants";
import { extractText } from "./extract-text";
Comment on lines +395 to +396
No matchable resumes found. Add at least 2 sections or attach a
PDF/DOCX resume in your profile first.
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.

2 participants