Add a way to score every unscored lead without polling
Test and deploy / test (push) Successful in 2m1s
Test and deploy / deploy (push) Successful in 1m21s

A run caps its scoring at forty leads, so a first poll of several boards
left a backlog that could only be cleared by pressing "Check now"
repeatedly, re-fetching every source each time.

scoreJobLeads (JobLeadService.ScoreAll, "Score unscored" on /cv/leads)
re-applies the keyword filter and then scores every matched, unscored
lead, with no cap on the count and a one-hour limit on the time. A lead
Claude fails on is tried once per press rather than three times, so a
passing failure does not write it off. It shares the run lock and the
polled status with runJobLeadSync, and the page now reloads the leads
while either job is in flight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-12 15:36:32 +01:00
co-authored by Claude Opus 5.5
parent af50e6c8ab
commit 299b5f5224
8 changed files with 216 additions and 41 deletions
+4 -3
View File
@@ -239,9 +239,10 @@ until **Track** is pressed on a lead, which adds it to `/cv/jobs` as Saved.
Same conventions as the tracker: the children emit `fail` / `ok` for the
parent's banner, and a lead's `description` is fetched per row. Two things
differ. "Check now" does not wait for the run — the mutation returns at once
and the page polls `jobLeadSyncStatus` every three seconds, then reloads the
leads and sources. And the box styles the children share (`.jl-box`,
differ. "Check now" (poll the sources, score up to forty) and "Score
unscored" (poll nothing, score the whole backlog) do not wait for the job —
the mutation returns at once and the page polls `jobLeadSyncStatus` every
three seconds, reloading the leads as it goes and the sources at the end. And the box styles the children share (`.jl-box`,
`.jl-hint`, `.jl-warn`) are in an unscoped `<style>` block in `JobLeads.vue`,
under `.jl-root`, for the reason `jobs-shared.css` exists.