Show and set each board's reach on the Companies list, list the readers' declarations on Sources, and document filtering at the source

A company row says what a pull asks its board for; its editor sets the board's own reach (the agents', all roles, or countries and remote) through /api/sources/{id}/reach. /api/readers lists each reader's listing, text, filters, places and robots decision, folded under the Follow form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 10:03:41 +02:00
1 parent 3462a4abe7
commit dafca5435e
8 files changed
+333 -8

No files matched your search

+44
View File
@@ -15,6 +15,11 @@
*
* It is also the page's first script, so it shows the one section of the
* four the URL fragment names and marks it in the settings rail.
*
* Under the Follow form of Company boards, a fold lists what each reader
* declares (`/api/readers`): how its list arrives, where the text is, what
* it filters at the source, how it states places, and the robots.txt
* decision taken when it was built.
*/
(function () {
"use strict";
@@ -277,6 +282,44 @@
}
}
// ----------------------------------------------------------------- readers
/** "country one, remote ids", or "none". */
function filters(reader) {
const shown = Object.entries(reader.filters).map(([name, how]) => `${name} ${how}`);
return shown.length ? shown.join(", ") : "none";
}
function renderReaders(readers) {
const fold = document.createElement("details");
fold.className = "prune";
fold.id = "readers";
const summary = document.createElement("summary");
summary.textContent = `What each reader does (${readers.length})`;
const list = document.createElement("div");
list.className = "srows";
for (const reader of readers) {
const row = document.createElement("div");
row.className = "srow";
const name = document.createElement("span");
name.className = "name";
const label = document.createElement("span");
label.textContent = reader.label;
const scope = document.createElement("span");
scope.className = "badge";
scope.textContent = reader.scope === "search" ? "job board" : "company board";
name.append(label, scope);
const sub = document.createElement("span");
sub.className = "sub";
sub.textContent = [`list ${reader.listing}`, `text ${reader.text}`,
`filters ${filters(reader)}`, `places ${reader.places}`, reader.robots].join(" · ");
row.append(name, sub);
list.appendChild(row);
}
fold.append(summary, list);
$("#board-form").after(fold);
}
// ------------------------------------------------------ one section shown
// Sources shows one section: the one the fragment names or contains, or the
@@ -317,6 +360,7 @@
document.addEventListener("DOMContentLoaded", async () => {
if (!$("#searches-list")) return;
if ($("#board-form")) api("/api/readers").then(renderReaders, () => {});
try {
await load();
} catch (err) {