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

+190 -60
View File
@@ -1,6 +1,6 @@
/* The whole stylesheet: the boilerplate's, with roledesk's palette in the
* custom properties (a quiet UI face and newsdesk's teal signal colour), the
* frame (a top bar of two tabs and a cog, the settings sub-tabs), roledesk's
* frame (a top bar of two tabs and a cog, the settings rail), roledesk's
* own pages, and at the bottom the phone: a width query for the layout and a
* pointer query for the sizes, after newsdesk and health. No build step.
*
@@ -122,35 +122,91 @@ a { color: var(--accent); }
}
.top nav a.active { background: var(--accent); color: var(--accent-fg); }
/* The settings sub-tabs, health's: an underlined row here, pills on a phone. */
.subtabs {
display: flex; gap: 4px; margin: 4px 0 14px;
border-bottom: 1px solid var(--line);
}
.subtabs a {
padding: 7px 12px;
color: var(--dim);
font-weight: 500;
text-decoration: none;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
@media (hover: hover) {
.subtabs a:hover { color: var(--fg); }
}
.subtabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
/* == settings shell ======================================================= */
/* The rail beside every page under the cog (settings/_rail.html), in the
Roles rail's look: a small-caps heading, quiet rows, the current one tinted
with a bar down its edge. Rules of its own rather than `#rail`'s, because
that rail turns into an overlay when narrow and this one into a strip.
Sticky under the header, with its own scroll if it outgrows the screen, so
it stays beside a Company boards list sixty companies long. */
/* The jump row under the sub-tabs on Sources: one link per section, since
the page is three sections long. Each section clears the sticky bar when
the anchor lands. */
.jump { display: flex; gap: .25rem .75rem; flex-wrap: wrap; margin: -6px 0 10px; font-size: .9rem; }
.jump a { color: var(--dim); text-decoration: none; }
@media (hover: hover) {
.jump a:hover { color: var(--fg); text-decoration: underline; }
.settings-shell {
display: grid;
grid-template-columns: 13rem minmax(0, 1fr);
gap: 1.6rem;
max-width: 76rem; margin: 0 auto; padding: 0 1.1rem;
}
section[id] { scroll-margin-top: calc(var(--header-h, 3.5rem) + .5rem); }
.settings-shell > main {
max-width: none; min-width: 0; margin: 0;
padding: 1.5rem 0 calc(4rem + env(safe-area-inset-bottom));
}
.settings-rail {
position: sticky; top: var(--chrome); align-self: start;
max-height: calc(100vh - var(--chrome)); overflow-y: auto;
padding: 1.75rem 0 2rem;
}
.settings-rail h3 {
margin: 0 0 .45rem; padding: 0 .5rem;
font-size: .76rem; font-weight: 650; letter-spacing: .06em;
text-transform: uppercase; color: var(--faint);
}
.settings-rail nav, .rail-group { display: flex; flex-direction: column; gap: .1rem; }
.rail-link {
display: block; padding: .3rem .5rem; border-radius: 3px;
font-size: .9rem; color: var(--dim); text-decoration: none;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A page's sections, indented under it. */
.rail-link.sub { padding-left: 1.5rem; font-size: .86rem; }
@media (hover: hover) {
.rail-link:hover { color: var(--fg); background: var(--panel); }
}
/* The current page, or on Sources the current section. The page a section
is on is only named in the accent, so one row at a time has the bar. */
.rail-link[aria-current] {
background: color-mix(in srgb, var(--accent) 14%, transparent);
color: var(--accent); font-weight: 600;
box-shadow: inset 3px 0 0 var(--accent);
}
.rail-link.parent[aria-current] { background: none; box-shadow: none; }
/* A section landed on by its fragment clears the header. */
section[id] { scroll-margin-top: calc(var(--chrome) + .5rem); }
.card h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
/* Narrow: one column, and the rail is a strip of chips across the top of the
content, pinned under the header and scrolled sideways, so a phone jumps
between sections without scrolling back up. Only the current page's
sections are in it, after a › on their page. */
@media (max-width: 60rem) {
.settings-shell { display: block; padding: 0; }
.settings-shell > main { padding-inline: 1.1rem; }
.settings-rail {
top: var(--chrome); z-index: 4;
max-height: none; overflow: auto hidden;
padding: .4rem .6rem;
background: var(--panel); border-bottom: 1px solid var(--line);
scrollbar-width: none;
}
.settings-rail::-webkit-scrollbar { display: none; }
.settings-rail h3 { display: none; }
.settings-rail nav { flex-direction: row; gap: .25rem; width: max-content; }
.rail-group { display: contents; }
.rail-group:not([data-current]) .sub { display: none; }
.rail-link, .rail-link.sub { padding: .3rem .75rem; border-radius: 999px; overflow: visible; }
.rail-link[aria-current] { box-shadow: none; }
.rail-link.parent[aria-current]::after { content: " ›"; color: var(--faint); }
section[id] { scroll-margin-top: calc(var(--chrome) + 3.25rem); }
}
@media (max-width: 640px) {
.settings-shell > main { padding: 10px 10px calc(3rem + env(safe-area-inset-bottom)); }
}
@media (pointer: coarse) {
.rail-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
}
/* == end of settings shell ================================================ */
main {
max-width: 62rem;
margin: 0 auto;
@@ -515,9 +571,9 @@ kbd {
border-radius: 3px; padding: 0 .3em; margin-right: .1em; color: var(--dim);
}
/* Order and period. `.seg` is a block on its own here and the two halves
split the width, so the choice is one target each rather than two words
pushed against the edge. */
/* Order, and the period under it. `.seg` is a block on its own here and the
two halves split the width, so the choice is one target each rather than
two words pushed against the edge. */
.seg { display: flex; }
#sort { padding: 0 .3rem; }
#rail .seg button {
@@ -541,13 +597,42 @@ kbd {
display: block; margin: .7rem .3rem .25rem;
font-size: .78rem; color: var(--faint);
}
/* Sized by `min-height`, never by padding around one line. Chrome draws a
select's text at `line-height: normal` whatever the stylesheet says and
clips it to the content box, so a select that was padding around one line
box cut off the "g" wherever the face's glyphs reach below its own line
metrics, as Segoe UI Variable's do on Windows. A box taller than the line,
with the text centred in it, has room under the baseline in any face and
at any zoom. The text fields are set the same way so the column lines up. */
.rail-select, .rail-fields input[type="text"], .rail-fields select {
width: calc(100% - .6rem); margin: 0 .3rem;
padding: .25rem .4rem; font-size: .84rem;
min-height: 2rem; padding: .15rem .45rem;
font-size: .84rem; line-height: normal;
border: 1px solid var(--line); border-radius: 3px;
background: var(--panel); color: var(--fg);
}
#agent { margin-bottom: .1rem; }
/* Viewing as: the first thing in the rail, since it decides whose answer
every other control gets. The agent's name in the bold face, larger than
the filters, the full width, and ruled off from them. */
#rail .rail-viewing { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
#rail .agent-pick {
display: block; width: calc(100% - .6rem); margin: 0 .3rem;
font-size: 1rem; font-weight: 650; color: var(--fg);
}
#rail select.agent-pick {
min-height: 2.6rem; padding: .2rem .5rem;
border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}
/* One agent is not a choice, so it is its name, not a select of one. */
#rail p.agent-pick {
padding: .45rem .6rem; line-height: 1.35; overflow-wrap: anywhere;
background: color-mix(in srgb, var(--accent) 10%, transparent);
box-shadow: inset 3px 0 0 var(--accent); border-radius: 3px;
}
.rail-viewing .rail-note { margin-top: 0; }
/* A link in a heading ("agents", "clear") is a word, not a second heading. */
#rail h3 .linky { text-transform: none; letter-spacing: 0; font-weight: 400; }
/* The filters that are not the everyday ones: folded, with a count on the
summary so a closed fold still says the list is narrowed. */
@@ -932,7 +1017,8 @@ table.applications td[data-label="Saved"] { white-space: nowrap; color: var(--di
#rail .rail-row { align-items: center; min-height: 2.75rem; }
#rail .tag { padding: .45rem .8rem; }
#rail .seg button { min-height: 2.75rem; }
.rail-select, .rail-fields input[type="text"], .rail-fields select { min-height: 2.75rem; }
.rail-select, .rail-fields input[type="text"], .rail-fields select,
#rail select.agent-pick { min-height: 2.75rem; }
.rail-more > summary { padding-block: .7rem; }
.reader-bar { padding: .3rem .5rem; }
.reader-bar .judge button, .reader-bar .close, .reader-external { min-height: 2.75rem; min-width: 2.75rem; }
@@ -974,14 +1060,75 @@ table.applications td[data-label="Saved"] { white-space: nowrap; color: var(--di
/* agents */
.agents { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.agent {
display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
/* The Search agents page: a card per agent (static/agents.js). What it looks
for is the card's body, in the reading face, since it is what fit is
measured against; the weights are a small line under it. */
.agents-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }
.agent-cards { display: flex; flex-direction: column; gap: .9rem; margin: .5rem 0 2rem; }
.agent-card {
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
padding: .5rem .75rem;
padding: 1rem 1.25rem;
}
.agent a { font-weight: 600; text-decoration: none; }
.agent-meta { color: var(--dim); font-size: .85rem; flex: 1 1 12rem; }
.agent-card.editing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* One line however long the name: the name wraps inside its own box, and the
badge and the switch keep their width, level with its first line. */
.agent-card-head { display: flex; align-items: baseline; gap: .6rem; }
.agent-name { flex: 0 1 auto; min-width: 0; font-size: 1.2rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.agent-card-head .badge { flex: none; }
/* The switch keeps to the right, by an auto margin rather than a spacer. */
.agent-card-head .switch { flex: none; margin-left: auto; }
.agent-intent {
margin: .6rem 0 .4rem; max-width: 44rem;
font-family: var(--read); font-size: 1.02rem; line-height: 1.55;
white-space: pre-line; overflow-wrap: anywhere;
}
.agent-intent.empty { font-family: inherit; font-size: .9rem; color: var(--dim); font-style: italic; }
.agent-weights { margin: 0; font-size: .8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.agent-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .8rem; }
.agent-card-actions a { font-size: .9rem; font-weight: 600; text-decoration: none; }
@media (hover: hover) {
.agent-card-actions a:hover { text-decoration: underline; }
}
.agent-card-actions .linky { margin-left: auto; }
.agent-card .agent-status { margin: .5rem 0 0; }
.agent-card .agent-status:empty { display: none; }
/* An agent that is off: the card stays readable, only quieter. */
.agent-card[data-off="true"] .agent-name,
.agent-card[data-off="true"] .agent-intent { color: var(--dim); }
/* In a card the form is the card's body, not a panel of its own. */
.agent-card .agent-form {
max-width: none; margin: 0; padding: 0;
background: none; border: 0; border-radius: 0;
}
.agent-card .agent-form h2 { font-size: 1.2rem; }
/* On and Off, said in words beside a track: a bare checkbox did not say what
it switched. The checkbox is still the control, only drawn over. */
.switch {
position: relative; display: inline-flex; align-items: center; gap: .45rem;
cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--dim);
user-select: none;
}
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track {
position: relative; flex: none; width: 2.2rem; height: 1.25rem;
border-radius: 999px; background: var(--line); transition: background 120ms;
}
.switch-track::after {
content: ""; position: absolute; top: .15rem; left: .15rem;
width: .95rem; height: .95rem; border-radius: 50%;
background: var(--panel); box-shadow: 0 1px 2px rgb(0 0 0 / .25);
transition: transform 120ms;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(.95rem); }
.switch input:checked ~ .switch-label { color: var(--accent); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .55; }
@media (pointer: coarse) {
.switch { min-height: 2.75rem; padding-left: .5rem; }
}
.agent-form {
display: flex; flex-direction: column; gap: .6rem; max-width: 44rem;
background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
@@ -1057,8 +1204,6 @@ table.applications td[data-label="Saved"] { white-space: nowrap; color: var(--di
gap: .4rem; font-size: .8rem; color: var(--dim);
}
.srow[data-muted="true"], .crow[data-hidden="true"] { opacity: .6; }
/* The agent the form is editing, on the Search agents list. */
.crow[data-current="true"] .name { color: var(--accent); }
.linky {
padding: 0; border: 0; background: none; font-size: .8rem;
@@ -1114,29 +1259,14 @@ table.list select { padding: .25rem .4rem; }
.top nav a { flex: 1 1 auto; text-align: center; padding: .6rem .4rem; white-space: nowrap; }
.top nav a.icon { flex: 0 0 auto; justify-content: center; padding-inline: .7rem; }
/* Three sub-tabs, one row of pills rather than the desktop's underlined
row; they wrap if a label needs it, since a scrolling strip does not
show that more are off the edge. */
.subtabs { flex-wrap: wrap; border-bottom: none; gap: 6px; }
.subtabs a {
flex: 1 1 30%;
padding: 7px 4px;
border-radius: 999px;
border-bottom: none;
margin-bottom: 0;
background: var(--panel);
text-align: center;
font-size: .85rem;
}
.subtabs a.active { background: var(--accent); color: var(--accent-fg); }
/* A panel runs to both edges of the screen: no side margin, border or
rounded corner, so the content keeps all but its own 10 pixels of the
width. The page background between two panels reads as a band. */
.card, .filters, .agent-form, .note {
.card, .filters, .agent-form, .agent-card, .note {
margin-inline: -10px; border-radius: 0; border-inline: 0;
}
.card { padding: .8rem 10px; }
.card, .agent-card { padding: .8rem 10px; }
.agent-card.editing { box-shadow: none; }
.row-between { flex-wrap: wrap; }
}
@@ -1153,8 +1283,8 @@ table.list select { padding: .25rem .4rem; }
not zoom back out when it loses it. */
input, select, textarea { font-size: 16px; }
button, .top nav a, .subtabs a { min-height: 2.75rem; }
.top nav a, .subtabs a { display: inline-flex; align-items: center; justify-content: center; }
button, .top nav a { min-height: 2.75rem; }
.top nav a { display: inline-flex; align-items: center; justify-content: center; }
.filters input[type="search"], .filters input[type="text"], .filters select,
.agent-form input, .source-form select { min-height: 2.75rem; }
.affinity button { min-width: 2.75rem; }