Judge an employer known only from a search; the Companies list says "from job boards"

Store.set_affinity creates a minimal company row (key, and the name its roles
give most often) for a key with roles and no row, so a Jobindex or Adzuna
employer can be hidden or liked; the reader draws the control for any role
with a company_key and reloads the company list after the first change.

/api/companies derives from_search: no ats subscription (detached included)
and no ats, careers_url or domain. companies.js labels it "from job boards"
and keeps it out of "Not readable yet".

Co-Authored-By: Claude Opus <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus committed 2026-09-29 15:19:55 +02:00
1 parent 91d15fcc7d
commit b2c8c08f7f
6 files changed
+78 -15

No files matched your search

+6 -3
View File
@@ -71,9 +71,12 @@
: "own site";
sub.appendChild(badge);
sub.append(" · not readable yet");
} else if (company.from_search) {
// Nobody followed it: its roles came from a search, and it was judged.
sub.append("from job boards");
} else {
// Every row comes from the seed, Follow or discover: none of them
// found where this company posts its roles.
// Followed by the seed, Follow or discover, and none of them found
// where this company posts its roles.
sub.append("board not found");
}
if (company.careers_url && !company.board) {
@@ -214,7 +217,7 @@
case "hidden": return company.affinity === -1;
case "on": return company.on === true;
case "off": return company.on === false;
case "unreadable": return company.subscription_id == null;
case "unreadable": return company.subscription_id == null && !company.from_search;
default: return true;
}
}
+6 -4
View File
@@ -800,12 +800,14 @@
}
/* The company's ★ ▲ ⊘, the one place a company is judged outside the
Companies page. A company seen only through a search has no row of its
own to judge. A change dims or undims its rows in the feed. */
Companies page. A company seen only through a search has no row until
its first change creates one, so the list is reloaded then. A change
dims or undims its rows in the feed. */
function renderAffinity(slot, r) {
const company = companies.get(r.company_key);
if (!company) { slot.replaceChildren(); return; }
slot.replaceChildren(affinityControl(r.company_key, company.affinity, () => {
if (!r.company_key) { slot.replaceChildren(); return; }
slot.replaceChildren(affinityControl(r.company_key, company ? company.affinity : 0, async () => {
if (!company) await loadCompanies(state.filter.agent).catch(() => {});
renderAffinity(slot, r);
renderFeed();
}, state.filter.agent));