Add dedicated 'closed' status for listings no longer accepting applications
Distinguishes closed listings from missing apply buttons. Shows in summary as a separate line item. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -304,6 +304,13 @@ async function handleResult(job, result, results, settings, profile, apiKey) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'closed':
|
||||||
|
console.log(` 🚫 Closed — no longer accepting applications`);
|
||||||
|
updateJobStatus(job.id, 'closed', { title, company });
|
||||||
|
appendLog({ ...job, title, company, status: 'closed' });
|
||||||
|
results.closed = (results.closed || 0) + 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'no_modal':
|
case 'no_modal':
|
||||||
case 'skipped_no_apply':
|
case 'skipped_no_apply':
|
||||||
case 'skipped_easy_apply_unsupported':
|
case 'skipped_easy_apply_unsupported':
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export async function apply(page, job, formFiller) {
|
|||||||
}).catch(() => false);
|
}).catch(() => false);
|
||||||
if (closed) {
|
if (closed) {
|
||||||
console.log(` ℹ️ Job closed — no longer accepting applications`);
|
console.log(` ℹ️ Job closed — no longer accepting applications`);
|
||||||
return { status: 'skipped_no_apply', meta };
|
return { status: 'closed', meta };
|
||||||
}
|
}
|
||||||
console.log(` ❌ Modal did not open. Page URL: ${page.url()}`);
|
console.log(` ❌ Modal did not open. Page URL: ${page.url()}`);
|
||||||
return { status: 'no_modal', meta };
|
return { status: 'no_modal', meta };
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export async function apply(page, job, formFiller) {
|
|||||||
}).catch(() => false);
|
}).catch(() => false);
|
||||||
if (closed) {
|
if (closed) {
|
||||||
console.log(` ℹ️ Job closed — no longer available`);
|
console.log(` ℹ️ Job closed — no longer available`);
|
||||||
return { status: 'skipped_no_apply', meta };
|
return { status: 'closed', meta };
|
||||||
}
|
}
|
||||||
|
|
||||||
const applyBtn = page.locator('a:has-text("Apply"), button:has-text("Apply Now"), a:has-text("Apply Now")').first();
|
const applyBtn = page.locator('a:has-text("Apply"), button:has-text("Apply Now"), a:has-text("Apply Now")').first();
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function formatSearchSummary(added, skipped, platforms) {
|
|||||||
export function formatApplySummary(results) {
|
export function formatApplySummary(results) {
|
||||||
const { submitted, failed, needs_answer, total,
|
const { submitted, failed, needs_answer, total,
|
||||||
skipped_recruiter, skipped_external, skipped_no_apply,
|
skipped_recruiter, skipped_external, skipped_no_apply,
|
||||||
skipped_other, already_applied, atsCounts } = results;
|
skipped_other, already_applied, closed, atsCounts } = results;
|
||||||
|
|
||||||
const lines = [
|
const lines = [
|
||||||
`✅ *Apply Run Complete* — ${total} jobs processed`,
|
`✅ *Apply Run Complete* — ${total} jobs processed`,
|
||||||
@@ -106,6 +106,7 @@ export function formatApplySummary(results) {
|
|||||||
// Only show non-zero categories to keep the summary clean
|
// Only show non-zero categories to keep the summary clean
|
||||||
if (needs_answer) lines.push(`💬 Needs your answer: ${needs_answer}`);
|
if (needs_answer) lines.push(`💬 Needs your answer: ${needs_answer}`);
|
||||||
if (failed) lines.push(`❌ Failed: ${failed}`);
|
if (failed) lines.push(`❌ Failed: ${failed}`);
|
||||||
|
if (closed) lines.push(`🚫 Closed: ${closed}`);
|
||||||
if (skipped_no_apply) lines.push(`⏭️ No apply button: ${skipped_no_apply}`);
|
if (skipped_no_apply) lines.push(`⏭️ No apply button: ${skipped_no_apply}`);
|
||||||
if (skipped_recruiter) lines.push(`🚫 Recruiter-only: ${skipped_recruiter}`);
|
if (skipped_recruiter) lines.push(`🚫 Recruiter-only: ${skipped_recruiter}`);
|
||||||
if (already_applied) lines.push(`🔁 Already applied: ${already_applied}`);
|
if (already_applied) lines.push(`🔁 Already applied: ${already_applied}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user