Per-agent ranking: votes, affinity and a taste term; settings are three sub-tabs

Votes on roles and company affinity move to role_votes and agent_companies,
one row per search agent, so two agents rank the same roles differently. The
score gains taste, the cosine to mean(liked) - mean(passed) of the agent's
votes, as newsdesk ranks articles. The API takes agent on roles, votes and
companies and falls back to the default agent, the enabled one with the
lowest id.

Settings become Search agents (a list again, with New and Delete), Sources
(job boards, company boards and runs with the message log, one section per
plugin) and Account. Old paths answer 301 to their section.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 12:53:41 +02:00
1 parent 515d2250fc
commit a0772519b3
28 files changed
+1461 -668

No files matched your search

+9 -7
View File
@@ -1,9 +1,11 @@
/* The Searches page under Settings: saved searches only. Company boards and
* the prune by region moved to Companies, since a board is a company's own,
* not a search's.
/* The Job boards section of Sources: one query on one board per row, on
* Jobindex or Adzuna. The UI says "job board" for what the API and the CLI
* call a search (`/api/searches`, `app searches`); company boards and the
* prune by region are companies.js's section, since a board is a company's
* own, not a query's.
*
* The list comes from `/api/sources`, and every action is a fetch through
* `api()` from app.js, so a refusal (a search that finds nothing) is one
* `api()` from app.js, so a refusal (a query that finds nothing) is one
* toast with the server's own sentence. The catch blocks here only put a
* control back.
*/
@@ -95,8 +97,8 @@
}
const open = data.searches.reduce((sum, s) => sum + s.open_roles, 0);
$("#searches-count").textContent = data.searches.length
? `${count(data.searches.length, "search", "searches")}, ${count(open, "open role")}`
: "No searches yet. Add one below; the starter searches in config.yaml import on the first pull.";
? `${count(data.searches.length, "job board")}, ${count(open, "open role")}`
: "No job boards yet. Add one above; the starter ones in config.yaml import on the first pull.";
}
function showProvider() {
@@ -109,7 +111,7 @@
function fillSearchForm(source) {
const p = (source && source.params) || {};
$("#search-form-title").textContent = source ? `Edit ${source.label}` : "New search";
$("#search-form-title").textContent = source ? `Edit ${source.label}` : "New job board";
$("#s-provider").value = source ? source.provider : "jobindex";
$("#s-name").value = source ? source.label : "";
$("#s-name").readOnly = Boolean(source);