Commit Graph

9 Commits

Author SHA1 Message Date
a498f49b95 Fix critical import bugs in linkedin.mjs and wellfound.mjs, clean up status/setup
- linkedin.mjs: LINKEDIN_LINKEDIN_MAX_SEARCH_PAGES → LINKEDIN_MAX_SEARCH_PAGES
  (typo would crash searcher at module load — constant doesn't exist)
- wellfound.mjs: WELLFOUND_WELLFOUND_MAX_INFINITE_SCROLL → WELLFOUND_MAX_INFINITE_SCROLL
  (same — doubled prefix crashes at import)
- status.mjs: remove double-counting ATS from both queue and log
- setup.mjs: replace PM2 instructions with OpenClaw crons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:15:52 -08:00
b1528ac0ad refactor: extract magic numbers to constants, fix audit issues
- Centralize all magic numbers/strings in lib/constants.mjs
- Fix double-replaced import names in filter.mjs
- Consolidate duplicate fs imports in job_applier/job_searcher
- Remove empty JSDoc block in job_searcher
- Update keywords.mjs model from claude-3-haiku to claude-haiku-4-5
- Extract Anthropic API URLs to constants
- Convert :has-text() selectors to page.locator() API
- Fix SIGTERM handler conflict — move partial-run notification into lock.onShutdown
- Remove unused exports (LOCAL_USER_AGENT, DEFAULT_REVIEW_WINDOW_MINUTES)
- Fix variable shadowing (b -> v) in job_filter reduce callback
- Replace SKILL.md PM2 references with system cron

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 08:45:17 -08:00
8212f97aba 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>
2026-03-05 17:39:48 -08:00
ed908c91af fix: audit bugs + better error logging for searcher debugging
Bugs fixed:
- form_filler.mjs: add missing await on el.evaluate() in getLabel()
- analyze_ats.mjs: check job.apply_type instead of non-existent job.easy_apply
- status.mjs: fix typo "that run" → "in that run"
- README: add missing lock.mjs to project structure

Logging improvements:
- job_searcher.mjs: log browser creation, login steps, stack traces on error
- linkedin.mjs/wellfound.mjs: catch and log navigation failures per keyword
- browser.mjs: descriptive errors for Kernel and CDP connection failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:28:23 -08:00
f9fa36b47c feat: flush jobs to queue per-page — no data loss on crash; live progress output 2026-03-06 00:17:33 +00:00
47513e8cec fix: security/bug fixes, extract constants, remove magic values
- Remove random suffix from Wellfound job IDs (broke dedup)
- Add null coalescing to all profile field returns in form_filler
- Fix honeypot case referencing nonexistent results.skipped counter
- Remove unused makeJobId import from linkedin.mjs
- Navigate directly to job URL instead of search+click in linkedin apply
- Add Telegram notification rate limiting (1.5s between sends)
- Replace Mode B blocking sleep with --preview flag
- Add max_applications_per_run enforcement
- Remove tracked search_config.json (keep .example.json only)
- Add search_config.json to .gitignore, fix duplicate node_modules entry
- Extract all magic numbers/strings to lib/constants.mjs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:01:42 -08:00
8bc9af14c4 fix: paginate LinkedIn results (click next page), scroll Wellfound infinite scroll 2026-03-05 23:49:40 +00:00
cb7a401aff feat: first_run_days config — defaults to 90 days on first run, then posted_within_days after 2026-03-05 23:38:21 +00:00
52a56f59f6 feat: claw-apply v0.1 — full implementation
- job_searcher.mjs: LinkedIn + Wellfound search, queue population
- job_applier.mjs: Easy Apply + Wellfound apply, Mode A/B
- lib/form_filler.mjs: config-driven form filling, custom answers.json
- lib/linkedin.mjs: two-panel Easy Apply flow
- lib/wellfound.mjs: Wellfound search + apply
- lib/browser.mjs: Kernel stealth browser factory with local fallback
- lib/queue.mjs: jobs_queue.json management
- lib/notify.mjs: Telegram notifications
- setup.mjs: setup wizard with login verification
- Config templates: profile, search_config, answers, settings
- SKILL.md: OpenClaw skill definition
2026-03-05 23:24:09 +00:00