fix(automations): support uploaded resumes for matching - #110
Open
frank-mendez wants to merge 1 commit into
Open
fix(automations): support uploaded resumes for matching#110frank-mendez wants to merge 1 commit into
frank-mendez wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
getResumeListto 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the automation resume picker showing no resumes when a profile contains an uploaded PDF/DOCX without imported structured sections.
Changes
Related Issues
Closes #109
Related to #76 and #91
Testing
npm run lintnpx tsc --noEmitnpm 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.tscould not initialize Prisma because of a schema engine error in the test setup)