Skip to content

Implemented Resume upload feature, Fixes #43#61

Merged
Kmadhav824 merged 5 commits intoshivamxverma:mainfrom
Kmadhav824:Resume-Upload-Feature
May 2, 2026
Merged

Implemented Resume upload feature, Fixes #43#61
Kmadhav824 merged 5 commits intoshivamxverma:mainfrom
Kmadhav824:Resume-Upload-Feature

Conversation

@Kmadhav824
Copy link
Copy Markdown
Collaborator

Resume upload feature was implemented

Copilot AI review requested due to automatic review settings May 1, 2026 18:28
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

@Kmadhav824 is attempting to deploy a commit to the Shivam verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an optional “resume context” flow so interview questions can be tailored to a candidate’s extracted resume text, end-to-end from UI upload/parsing through backend validation and prompt construction.

Changes:

  • Extend the interview-question generation request to include optional resumeContext and validate it server-side.
  • Add client-side resume parsing (PDF/TXT) + a resume upload UI component, and plumb the extracted text into the interview session payload.
  • Update the interview prompt to conditionally include the resume profile and tailor questions accordingly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
backend/src/api/interview/interview-types.ts Adds optional resumeContext to the request type.
backend/src/api/interview/interview-service.ts Injects the resume text into the LLM prompt with a defensive char cap and tailoring instruction.
backend/src/api/interview/interview-schema.ts Adds Yup validation for resumeContext length.
Frontend/src/views/interview/InterviewPage.jsx Wires resume state/handlers through to selection/ready steps.
Frontend/src/components/Interview/useInterviewSession.js Stores resume parsing state + includes resumeContext in the API payload when present.
Frontend/src/components/Interview/InterviewSelectionStep.jsx Adds a Resume section with upload UI; updates focus hint copy.
Frontend/src/components/Interview/InterviewReadyStep.jsx Shows a “resume loaded” indicator on the ready screen.
Frontend/src/components/Interview/ResumeUploadField.jsx New upload/drop-zone UI that parses files client-side and reports extracted text.
Frontend/src/utils/resumeParser.js New resume parsing utility using pdfjs-dist for PDFs and FileReader for TXT.
Frontend/src/views/interview/components/ResumeUploadField.jsx Adds a second ResumeUploadField implementation under views/ (appears unused/duplicative).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +24
const processFile = useCallback(
async (file) => {
if (!file) return;
setParseError('');
setIsParsing(true);
try {
const result = await parseResume(file);
setFileName(file.name);
${isParsing ? 'pointer-events-none opacity-60' : ''}
`}
onClick={() => inputRef.current?.click()}
onKeyDown={(e) => (e.key === 'Enter' || e.key === ' ') ? inputRef.current?.click() : undefined}
Comment on lines +144 to +146
<div className="text-[10px] text-gray-600 border border-white/[0.06] bg-white/[0.02] rounded-full px-3 py-1 font-medium tracking-wide">
🔒 Parsed locally — nothing uploaded to a server
</div>
icon="✨"
label="Focus Areas"
hint="e.g. System design tradeoffs, React hooks, conflict resolution."
hint="e.g. System design tradeoffs, React hooks, conflict resolution. Leave blank — the AI will draw from your resume."
Comment on lines +76 to +77
const resumeLine = resumeContext?.trim()
? `\nCANDIDATE RESUME PROFILE:\n${resumeContext.slice(0, MAX_RESUME_CHARS)}\n\nIMPORTANT: Use the resume profile above to personalise the questions. Reference specific technologies, projects, or experiences mentioned. Prioritise gaps or depth opportunities visible in the resume.`
Comment on lines +74 to +78
// Build the resume section only when provided; cap defensively to avoid runaway tokens.
const MAX_RESUME_CHARS = 3500;
const resumeLine = resumeContext?.trim()
? `\nCANDIDATE RESUME PROFILE:\n${resumeContext.slice(0, MAX_RESUME_CHARS)}\n\nIMPORTANT: Use the resume profile above to personalise the questions. Reference specific technologies, projects, or experiences mentioned. Prioritise gaps or depth opportunities visible in the resume.`
: '';
@@ -0,0 +1,194 @@
import React, { useRef, useState, useCallback } from 'react';
import { parseResume } from '../../utils/resumeParser.js';
* resumeParser.js
* Client-side resume text extraction.
* Supports PDF (via pdf.js) and plain-text (.txt) files.
* All processing is in-browser — nothing is uploaded to a server.
Comment on lines +87 to +95
export async function parseResume(file) {
if (!file) throw new Error('No file provided.');

const ext = file.name.split('.').pop()?.toLowerCase();
let raw = '';

if (ext === 'pdf') {
raw = await extractFromPdf(file);
} else if (ext === 'txt') {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

@shivamxverma
Copy link
Copy Markdown
Owner

@Kmadhav824 currently there is an issue with this branch can you check once and try to resolve it

@Kmadhav824 Kmadhav824 merged commit 98f2565 into shivamxverma:main May 2, 2026
1 of 2 checks passed
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.

3 participants