Every way a company gets a board is set_board, and an unreadable host keeps its slug

`app.jobs.sources.set_board` attaches a board to an existing company,
replaces the one it has (closing the old board's open roles) or creates
the company, with row and subscription changed in one transaction by
`Store.set_company_board`. A board that lists zero roles is kept. `add`,
`discover --add`, the seed importer (moved out of app/cli.py) and the new
`POST|DELETE /api/companies/{key}/board` all go through it; a seed re-run
attaches a board to a row that never had one. A company's subscription is
rewritten in place, and detaching hides it.

`companies.ats_slug` (migration 9) keeps the slug of a host the app
cannot read yet, and discovery returns such a host before probing slugs.
The Companies rows get Set board / Change, the host select is rendered
from `plugins.ats.HOSTS`, and a row with nothing found reads "board not
found" and is in the "Not readable yet" filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-29 14:04:52 +02:00
1 parent 0558ef19ed
commit 3b209d628a
18 files changed
+1038 -178

No files matched your search

+8 -5
View File
@@ -30,9 +30,10 @@ kept, so a bookmark still lands. A merged page's old path lands on its
section's anchor; the old Messages paths land on `#messages`, the log's
block at the end of Runs.
`FUNCTIONS` is `plugins.ats`'s, not `app`'s: the nine job functions are the
classifier's vocabulary, and this reaches `plugins/` the same way `app.cli`
does, since a plugin is app-agnostic and never reaches back into `app`. The
`FUNCTIONS` and `HOSTS` are `plugins.ats`'s, not `app`'s: the nine job
functions are the classifier's vocabulary and the hosts are what it parses,
and this reaches `plugins/` the same way `app.cli` does, since a plugin is
app-agnostic and never reaches back into `app`. The
Jobindex areas and Adzuna countries on the Sources page come from
`plugins.search` for the same reason.
"""
@@ -55,7 +56,7 @@ _ROOT = Path(__file__).resolve().parents[2]
if str(_ROOT) not in sys.path:
sys.path.insert(0, str(_ROOT))
from plugins.ats import FUNCTIONS # noqa: E402
from plugins.ats import FUNCTIONS, HOSTS # noqa: E402
from plugins.search import ADZUNA_COUNTRIES, JOBINDEX_AREAS # noqa: E402
TEMPLATE_DIR = Path(__file__).resolve().parent.parent / "templates"
@@ -118,6 +119,8 @@ REMOTE_OPTIONS = [(r, r.capitalize()) for r in REMOTE if r]
STATUS_OPTIONS = [(s, s.capitalize()) for s in STATUSES]
AREA_OPTIONS = list(JOBINDEX_AREAS.items())
COUNTRY_OPTIONS = [(c, c.upper()) for c in sorted(ADZUNA_COUNTRIES)]
#: The ATS hosts `plugins.ats` reads, for the Follow and Set board selects.
HOST_OPTIONS = list(HOSTS.items())
def asset(path: str) -> str:
@@ -183,7 +186,7 @@ def agents(request: Request) -> HTMLResponse:
@router.get("/settings/sources", response_class=HTMLResponse)
def sources(request: Request) -> HTMLResponse:
return page(request, "settings/sources.html", areas=AREA_OPTIONS,
countries=COUNTRY_OPTIONS)
countries=COUNTRY_OPTIONS, hosts=HOST_OPTIONS)
@router.get("/settings/account", response_class=HTMLResponse)