refactor: normalize apply statuses, remove dead code, fix signal handler

- lib/apply/index.mjs: add STATUS_MAP to normalize platform-specific statuses
  to generic ones (no_button/no_submit/no_modal → skipped_no_apply).
  Documented all generic statuses for AI/developer reference.
- job_applier.mjs: handleResult now handles skipped_no_apply, default case
  logs + saves instead of silently dropping
- lib/linkedin.mjs: remove dead applyLinkedIn() and detectAts(), clean imports
  (~110 lines removed). Search-only module now.
- lib/wellfound.mjs: remove dead applyWellfound(), clean imports.
  Search-only module now.
- lib/lock.mjs: fix async signal handler — shutdown handlers now actually
  complete before process.exit()
- test_linkedin_login.mjs: add try/catch/finally with proper browser cleanup
- README: update status table with all current statuses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 17:39:48 -08:00
parent 1bf676bb80
commit 8212f97aba
7 changed files with 70 additions and 182 deletions

View File

@@ -199,11 +199,11 @@ async function handleResult(job, result, results, settings) {
break;
}
case 'skipped_no_apply':
case 'skipped_easy_apply_unsupported':
case 'skipped_honeypot':
case 'stuck':
case 'incomplete':
case 'no_modal':
console.log(` ⏭️ Skipped — ${status}`);
updateJobStatus(job.id, status, { title, company });
appendLog({ ...job, title, company, status });
@@ -211,7 +211,9 @@ async function handleResult(job, result, results, settings) {
break;
default:
console.log(` ⚠️ Unknown status: ${status}`);
console.warn(` ⚠️ Unhandled status: ${status}`);
updateJobStatus(job.id, status, { title, company });
appendLog({ ...job, title, company, status });
}
}