diff --git a/.data.json b/.data.json index 5842d63..f031e1e 100644 --- a/.data.json +++ b/.data.json @@ -172,5 +172,29 @@ ] } } + }, + "ai_job_portal_applications": { + "items": [ + { + "company": "STATLINX", + "role": "Patient Care Specialist", + "platform": "Direct", + "location": "USA", + "salaryRange": "$36k", + "status": "Applied", + "matchScore": 92, + "appliedAt": "2026-07-22T23:36:27.475Z", + "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_1784763387476_88alp" + } + ] } } \ No newline at end of file diff --git a/src/components/AutonomousEngine.tsx b/src/components/AutonomousEngine.tsx index 713cf0d..80e6f12 100644 --- a/src/components/AutonomousEngine.tsx +++ b/src/components/AutonomousEngine.tsx @@ -80,14 +80,43 @@ export const AutonomousEngine: React.FC = ({ handleUpdateCriteria('excludedCompanies', updated); }; + const [activeInterventionModal, setActiveInterventionModal] = useState<{ + company: string; + role: string; + jobUrl?: string; + type: 'CAPTCHA' | 'HUMAN_VERIFICATION' | '2FA_OTP'; + } | null>(null); + const handleTriggerRun = async () => { - const newLog = { id: `${Date.now()}`, time: new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }), msg: 'Triggering real-time autonomous evaluation on active feeds...', type: 'info' as const }; - setLogs(prev => [newLog, ...prev]); + const timeStr = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); + + setLogs(prev => [ + { id: `${Date.now()}`, time: timeStr, msg: 'Initializing browser agent automation stream...', type: 'info' }, + { id: `${Date.now()+1}`, time: timeStr, msg: 'Evaluating active posting forms against candidate master profile...', type: 'info' } + ]); await onRunAutoApplyBatch(); - const successLog = { id: `${Date.now() + 1}`, time: new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }), msg: 'Batch evaluation complete. New qualified applications submitted & logged.', type: 'success' as const }; - setLogs(prev => [successLog, ...prev]); + // Check if any job requires human captcha verification (simulated safety alert trigger) + if (jobFeeds.length > 0) { + const sampleJob = jobFeeds[0]; + setLogs(prev => [ + { id: `${Date.now()+2}`, time: timeStr, msg: `🛡️ Captcha Challenge Detected at ${sampleJob.company}! Pausing automation stream for Human Intervention.`, type: 'warning' }, + ...prev + ]); + + setActiveInterventionModal({ + company: sampleJob.company, + role: sampleJob.title, + jobUrl: sampleJob.url, + type: 'CAPTCHA' + }); + } else { + setLogs(prev => [ + { id: `${Date.now()+3}`, time: timeStr, msg: 'Batch evaluation complete. All form steps verified & submitted.', type: 'success' }, + ...prev + ]); + } }; return ( @@ -249,25 +278,47 @@ export const AutonomousEngine: React.FC = ({ - {/* Real-time AI Execution Console / Logs */} -
+ {/* Real-time AI Execution Console & Live Intervention Tracker */} +

- Real-Time Decision Console + Real-Time Decision & Submission Monitor

- Live Agent Feed + Live Submission Stream
-
+ {/* Live Active Submission Progress Monitor */} + {isAutoApplying && ( +
+
+ + + Submitting Application to Active Posting... + + Form Step 3/4 +
+ +
+
+
+ +

+ Filling credentials & tailored resume bullet points... + Captcha Shield: Active +

+
+ )} + +
{logs.map((log) => (
[{log.time}] {log.msg} @@ -320,6 +371,86 @@ export const AutonomousEngine: React.FC = ({
+ {/* Captcha & Human Intervention Modal */} + {activeInterventionModal && ( +
+
+ +
+
+ + Human Intervention Needed — Captcha Verification +
+ +
+ +

+ The AI automation engine completed form data entry for {activeInterventionModal.role} at {activeInterventionModal.company}, but detected a security captcha verification (hCaptcha / Cloudflare Turnstile). +

+ +
+
+ Target Posting: + {activeInterventionModal.company} +
+
+ Verification Type: + + {activeInterventionModal.type} + +
+
+ +
+ + + {activeInterventionModal.jobUrl ? ( + { + setLogs(prev => [ + { id: `${Date.now()}`, time: new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }), msg: `✓ Human intervention completed for ${activeInterventionModal.company}. Application logged.`, type: 'success' }, + ...prev + ]); + setActiveInterventionModal(null); + }} + className="px-4 py-2 rounded-xl bg-amber-500 hover:bg-amber-400 text-slate-950 text-xs font-bold shadow-lg shadow-amber-500/20 flex items-center gap-1.5" + > + + Open Page & Complete Captcha + + ) : ( + + )} +
+ +
+
+ )} +
); }; diff --git a/src/types.ts b/src/types.ts index 3f8dde3..ae74741 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2,6 +2,8 @@ export type ApplicationStatus = | 'Saved' | 'Applying' | 'Applied' + | 'Captcha Required' + | 'Intervention Needed' | 'Screening' | 'Interviewing' | 'Offer'