From c4f2bcc0c9fb04878fe938f86c27541ec3cdbf4e Mon Sep 17 00:00:00 2001 From: Wolf Date: Mon, 28 Sep 2026 15:05:55 +0200 Subject: [PATCH] Viewing as leads the Roles rail; settings get a rail, agent cards, one Sources section at a time A search agent is a persona, and every like or pass belongs to the one being viewed. The rail now opens on Viewing as: a full-width chooser, the name alone with one agent, a note with none, remembered in the URL and localStorage. The vote buttons, the reader's affinity control, the feed, the tag counts and the reader fetch all carry that agent; before, votes sent none and every one landed on the default agent. Best first and Newest first are back as the segmented control under Order, independent of the agent. The rail selects no longer clip descenders: Chrome ignores line-height on a select, so the fixed box is gone in favour of padding and a min-height. Settings render inside a sticky rail (Search agents; Sources with Job boards, Company boards, Runs, Messages; Account), a strip under the header on a phone, so Runs is one click away however long the company list gets. Sources shows one section at a time, chosen by the fragment, so the old redirects still land. Search agents are cards, newest first: name, an On/Off switch with its word, the intent in full, the weights, Edit in place, New agent on top, and a link to Roles as that agent. Switching one on rescores it. replace_scores writes nothing for an agent deleted while score was running, instead of failing the run on the foreign key. Co-Authored-By: Claude Fable 5.1 --- README.md | 6 +- app/static/agents.js | 306 ++++++++++++++++++---------- app/static/app.css | 250 +++++++++++++++++------ app/static/judge.js | 36 ++-- app/static/roles.js | 234 ++++++++++++++------- app/static/sources.js | 34 ++++ app/storage/store.py | 6 +- app/templates/base.html | 15 +- app/templates/roles.html | 21 +- app/templates/settings/_layout.html | 13 ++ app/templates/settings/_rail.html | 43 ++++ app/templates/settings/_tabs.html | 8 - app/templates/settings/account.html | 6 +- app/templates/settings/agents.html | 34 ++-- app/templates/settings/sources.html | 38 ++-- app/web/pages.py | 36 +++- docs/decisions.md | 4 + tests/test_pages.py | 12 ++ tests/test_storage.py | 9 + tests/test_web.py | 51 ++++- 20 files changed, 836 insertions(+), 326 deletions(-) create mode 100644 app/templates/settings/_layout.html create mode 100644 app/templates/settings/_rail.html delete mode 100644 app/templates/settings/_tabs.html diff --git a/README.md b/README.md index baa11a4..446630b 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,12 @@ Two tabs, and a cog for settings. | **Roles** | newsdesk's feed: a filter rail (Show read, Best first or Newest first, first seen, tags, more filters), the open roles with company, place, age, tags and a summary, votes (▲ like ● neither way ▼ pass) and a Save button. A title opens the reader beside the list; on a phone it takes the screen. `j`/`k` move, `Enter` opens, `/` searches | | **Applications** | the saved roles and their status, each change recorded as an event | -The cog opens `/settings`, one shell with three sub-tabs: +The cog opens `/settings`: a rail of pages on the left, the page beside it, sticky so Runs is one click away however long the company list gets. On a phone the rail is a strip under the header. | | | |---|---| -| **Search agents** | the list of agents the Roles tab ranks by, and the form for one: name, intent, weights, and require/prefer gates behind an Advanced disclosure. Saving rescores; deleting one takes its votes, liked companies and scores with it | -| **Sources** | one page, one section per plugin: job boards (queries on Jobindex or Adzuna: try, save, edit, remove), company boards (every company whose board is read, its open roles and its affinity for the picked agent, following a company, pruning boards by region) and runs (Pull now, what is running, the schedule, one stage at a time, and the message log) | +| **Search agents** | a card per agent, newest first: name, an On/Off switch, what it looks for, and its weights. Edit turns the card into the form in place (name, intent, weights, require/prefer gates behind an Advanced disclosure); New agent puts a blank card on top. Saving or switching on rescores; deleting one takes its votes, liked companies and scores with it | +| **Sources** | one page showing one section at a time, picked in the rail or by the URL fragment: job boards (queries on Jobindex or Adzuna: try, save, edit, remove), company boards (every company whose board is read, its open roles and its affinity for the picked agent, following a company, pruning boards by region) and runs (Pull now, what is running, the schedule, one stage at a time, and the message log) | | **Account** | the password, sessions and passkeys. Open on loopback, locked on anything else | Likes, hidden companies and votes belong to a search agent, not to the account: two agents rank the same roles differently, and one may hide a company the other favours. An agent also learns from votes: its `taste` weight scores a role by how close it is to the roles the agent liked minus the ones it passed. diff --git a/app/static/agents.js b/app/static/agents.js index 72add23..f095ffd 100644 --- a/app/static/agents.js +++ b/app/static/agents.js @@ -1,9 +1,14 @@ /* The Search agents page: what Best match on the Roles tab is measured * against, one agent at a time. * - * The list is `/api/agents`; the form edits the agent picked from it, New - * clears it, Delete removes it. Votes, liked companies and scores are the - * agent's, so a delete takes them with it, and the confirm says so. + * Every agent from `/api/agents` is a card, newest first: its name, its + * switch, what it looks for, its weights, and a link to the Roles tab in its + * order. What it looks for is the paragraph, since that is what fit is + * measured against; the weights only share out the terms. Edit turns a card + * into the form from the page's `