feat: wire resume upload and preferences to backend API#107
Open
Copilot wants to merge 2 commits into
Open
Conversation
- Add frontend/src/lib/api.ts: typed API client with Clerk auth token support - ResumePage: upload file to POST /resume after local text extraction - ProfilePage: load preferences+resume on mount, replace setTimeout mocks with real POST /preferences and POST /resume API calls Agent-Logs-Url: https://github.com/yb175/CVPilot/sessions/72185afe-2230-45fe-8d4b-6692803d3faf Co-authored-by: yb175 <181614786+yb175@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create 5-8 well-defined sub-issues for MVP
feat: wire resume upload and preferences to backend API
Apr 11, 2026
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.
Frontend pages were entirely disconnected from the backend — resume upload only did client-side text extraction, and preferences were saved with
setTimeoutmocks. This wires the full end-to-end flows.New:
frontend/src/lib/api.tsMinimal typed API client shared across pages:
useAuth().getToken()VITE_BACKEND_URL(falls back tohttp://localhost:3000)fetchResume,uploadResume,fetchPreferences,savePreferences,patchPreferencesResumePageAfter client-side text extraction, the file is now POSTed to
POST /resume:Status badge reflects upload state:
PROCESSING→PARSED/FAILED.ProfilePageGET /preferencesandGET /resumefetched in parallel; form hydrated from server state instead of hardcoded defaultsPOST /preferenceswith{ seniority, locationPreferences }; state updated from responsePOST /resume; returnedfileUrlstored so the "View ↗" link inResumeUpdateSectionworksnew URL(fileUrl).pathnameto handle query strings correctly