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 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 15:05:55 +02:00
1 parent 063771d617
commit c4f2bcc0c9
20 files changed
+836 -326

No files matched your search

+18 -16
View File
@@ -1,23 +1,24 @@
{% extends "base.html" %}
{% extends "settings/_layout.html" %}
{% block title %}Search agents — roledesk{% endblock %}
{# A list and a form: `static/agents.js` fills the list from `/api/agents`,
the form edits the picked agent, New clears it, Delete removes it with its
votes, liked companies and scores. #}
{# A card per agent: `static/agents.js` fills the list from `/api/agents`,
newest first. A card shows what the agent looks for, its switch and its
weights; Edit turns that card into the form below, in place, and New puts
a blank one on top. The form is a `<template>` because only one card edits
at a time, so its ids stay unique. #}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<h1>Search agents</h1>
<p class="lede">A search agent is what the Roles tab ranks by: describe the role, weigh the terms, and it scores every open role. Several agents rank the same roles differently, each with its own votes and liked companies; Viewing as on Roles picks one, and its votes are that agent's.</p>
<p class="lede">A search agent is what the Roles tab ranks by: describe the role, weigh the terms, and it scores every open role. Several agents rank the same roles differently, each with its own votes and liked companies; the order menu on Roles picks one.</p>
<p id="agents-count" class="count" role="status"></p>
<div id="agents-list" class="crows"></div>
<div class="agents-head">
<p id="agents-count" class="count" role="status"></p>
<button type="button" id="a-new">New agent</button>
</div>
<div id="agents-list" class="agent-cards"></div>
<template id="agent-form-template">
<form id="agent-form" class="agent-form" autocomplete="off">
<div class="row-between">
<h2 id="agent-form-title">New agent</h2>
<button type="button" id="a-new" class="secondary">New agent</button>
</div>
<h2 id="agent-form-title">New agent</h2>
<label>Name <input type="text" id="a-name" required placeholder="My search"></label>
<label>What you are looking for
<textarea id="a-intent" rows="7" placeholder="Senior backend engineer. Python and Go services, PostgreSQL, APIs on Kubernetes. Wants ownership of production systems in a product company."></textarea>
@@ -37,10 +38,11 @@
</details>
<div class="agent-actions">
<button type="submit">Save and score</button>
<button type="button" id="a-delete" class="secondary" hidden>Delete</button>
<button type="button" id="a-cancel" class="secondary">Cancel</button>
<button type="button" id="a-delete" class="secondary">Delete</button>
</div>
<p id="agent-status" class="count" role="status"></p>
</form>
</template>
{% endblock %}
{% block scripts %}