feat: granular skip statuses — recruiter_only, external_unsupported, easy_apply_unsupported
Queue preserves all jobs for future reprocessing as capabilities expand. Applier summary breaks down skips by type.
This commit is contained in:
@@ -93,9 +93,14 @@ export async function applyLinkedIn(page, job, formFiller) {
|
||||
company: document.querySelector('.job-details-jobs-unified-top-card__company-name a, .jobs-unified-top-card__company-name a')?.textContent?.trim(),
|
||||
}));
|
||||
|
||||
// Find Easy Apply button
|
||||
// Detect apply type
|
||||
const eaBtn = await page.$('button.jobs-apply-button[aria-label*="Easy Apply"]');
|
||||
if (!eaBtn) return { status: 'no_easy_apply', meta };
|
||||
const externalBtn = await page.$('button.jobs-apply-button:not([aria-label*="Easy Apply"])');
|
||||
const interestedBtn = await page.$('button[aria-label*="interested"], button:has-text("I\'m interested")');
|
||||
|
||||
if (!eaBtn && interestedBtn) return { status: 'skipped_recruiter_only', meta };
|
||||
if (!eaBtn && externalBtn) return { status: 'skipped_external_unsupported', meta };
|
||||
if (!eaBtn) return { status: 'skipped_easy_apply_unsupported', meta };
|
||||
|
||||
// Click Easy Apply
|
||||
await page.click('button.jobs-apply-button', { timeout: 5000 }).catch(() => {});
|
||||
|
||||
@@ -34,13 +34,16 @@ export function formatSearchSummary(added, skipped, platforms) {
|
||||
}
|
||||
|
||||
export function formatApplySummary(results) {
|
||||
const { submitted, skipped, failed, needs_answer, total } = results;
|
||||
const { submitted, failed, needs_answer, total,
|
||||
skipped_recruiter, skipped_external, skipped_no_easy_apply } = results;
|
||||
const lines = [
|
||||
`✅ *Apply Run Complete*`,
|
||||
`Applied: ${submitted} | Skipped: ${skipped} | Failed: ${failed} | Needs answer: ${needs_answer}`,
|
||||
`Applied: ${submitted} | Failed: ${failed} | Needs answer: ${needs_answer}`,
|
||||
`Skipped: ${skipped_recruiter} recruiter-only | ${skipped_external} external ATS | ${skipped_no_easy_apply} no Easy Apply`,
|
||||
`Total processed: ${total}`,
|
||||
];
|
||||
if (needs_answer > 0) lines.push(`\n💬 Check messages — I sent questions that need your answers`);
|
||||
if (skipped_external > 0) lines.push(`\n🔜 ${skipped_external} external ATS jobs saved for when Greenhouse/Lever support lands`);
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user