From c91bbea60d588b51fdc1c5151044e03a45c5aa3d Mon Sep 17 00:00:00 2001 From: David Kifer Date: Wed, 22 Jul 2026 19:53:46 -0400 Subject: [PATCH] Generate tailored resume artifacts and redirect to Shoulder-Surfing Mode when AI Auto-Apply is clicked --- .app.pid | 2 +- .data.json | 20 +++++++++++++++++ src/App.tsx | 65 +++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 72 insertions(+), 15 deletions(-) diff --git a/.app.pid b/.app.pid index 3b81341..b68d266 100644 --- a/.app.pid +++ b/.app.pid @@ -1 +1 @@ -128554 +129611 diff --git a/.data.json b/.data.json index 5f88ebb..fb228b4 100644 --- a/.data.json +++ b/.data.json @@ -175,6 +175,26 @@ }, "ai_job_portal_applications": { "items": [ + { + "company": "STATLINX", + "role": "Patient Care Specialist", + "platform": "Direct", + "location": "USA", + "salaryRange": "$36k", + "status": "Applied", + "matchScore": 96, + "appliedAt": "2026-07-22T23:53:08.792Z", + "jobUrl": "https://remotive.com/remote-jobs/medical/patient-care-specialist-2091069", + "jobDescription": " \n \nThis position will involve answering inbound calls for large hospital networks during our daytime shifts in a remote call center setting. Our company provides telephone answering, messaging, and alert services to physicians and medical facilities across the United States.\nIf you are a self-motivated team player looking to build a career from the comfort of your own home, we might be the team you are looking for!\nYou must live within the continental United States (+ Hawaii) to apply.\nWe curre...", + "autoApplied": true, + "timeline": [ + { + "date": "7/22/2026", + "action": "Quick AI Auto-Applied from feed" + } + ], + "id": "app_1784764388792_4wbzr" + }, { "company": "Twilio: Principal Engineer", "role": "Twilio: Principal Engineer", diff --git a/src/App.tsx b/src/App.tsx index 65d9cf1..56b1cca 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -316,20 +316,57 @@ export default function App() { jobFeeds={jobFeeds} onTailorJobFeed={(item) => handleNavigateToWalkthrough(item.url)} onQuickApplyFeed={async (item) => { - await handleSaveApplicationRecord({ - company: item.company, - role: item.title, - platform: item.platform, - location: item.location, - salaryRange: item.salary, - status: 'Applied', - matchScore: item.estimatedMatch, - appliedAt: new Date().toISOString(), - jobUrl: item.url, - jobDescription: item.description, - autoApplied: true, - timeline: [{ date: new Date().toLocaleDateString(), action: 'Quick AI Auto-Applied from feed' }] - }); + // Auto-generate tailored bullet points & cover letter before logging + try { + const res = await fetch('/api/gemini/tailor-resume', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + resumeText: userProfile.resumeText, + jobDescription: item.description, + companyName: item.company, + jobTitle: item.title + }) + }); + const data = await res.json(); + const tailoredData = data.success ? data.tailored : {}; + + await handleSaveApplicationRecord({ + company: item.company, + role: item.title, + platform: item.platform, + location: item.location, + salaryRange: item.salary, + status: 'Applied', + matchScore: item.estimatedMatch || tailoredData.matchScore || 88, + appliedAt: new Date().toISOString(), + jobUrl: item.url, + jobDescription: item.description, + tailoredResume: tailoredData.tailoredResumeText || `• Tailored for ${item.title} at ${item.company}`, + coverLetter: tailoredData.coverLetter || `Dear Hiring Team at ${item.company},\n\nI am writing to express my strong interest in the ${item.title} role...`, + autoApplied: true, + timeline: [{ date: new Date().toLocaleDateString(), action: 'AI Tailored & Form Filled' }] + }); + + // Navigate to Walkthrough Tailor tab to inspect in Shoulder Surfing Mode + setSelectedJobUrl(item.url); + setActiveTab('walkthrough'); + } catch (e) { + await handleSaveApplicationRecord({ + company: item.company, + role: item.title, + platform: item.platform, + location: item.location, + salaryRange: item.salary, + status: 'Applied', + matchScore: item.estimatedMatch || 85, + appliedAt: new Date().toISOString(), + jobUrl: item.url, + jobDescription: item.description, + autoApplied: true, + timeline: [{ date: new Date().toLocaleDateString(), action: 'Quick AI Auto-Applied' }] + }); + } }} /> )}