Files
WolfandClaude Fable 5.1 c4f2bcc0c9 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>
2026-09-28 15:05:55 +02:00

44 lines
2.1 KiB
HTML

{# The rail beside every settings page: `SETTINGS` from app/web/pages.py, each
page current by its own path, and under a page in `SECTIONS` its sections,
indented. Links, not buttons: a page is a page of its own and a section is
a fragment on it, so `/settings/sources#runs` opens Runs from anywhere.
Which section is current is the page script's to mark (sources.js), since
the server never sees the fragment.
The Roles rail's look without its overlay or its toggle: it is five links,
not a panel of filters. Below 60rem the same links are a strip across the
top of the content, pinned under the header, so a phone can still jump
between sections without scrolling back up. #}
<aside class="settings-rail" aria-label="Settings">
<h3>Settings</h3>
<nav>
{% for tab in SETTINGS %}
{% set current = request.url.path == tab.path %}
{% set sections = SECTIONS.get(tab.path, ()) %}
<div class="rail-group"{% if current %} data-current="true"{% endif %}>
<a class="rail-link{% if sections %} parent{% endif %}" href="{{ tab.path }}"
{% if current %}aria-current="page"{% endif %}>{{ tab.label }}</a>
{% for anchor, label in sections %}
<a class="rail-link sub" href="{{ tab.path }}#{{ anchor }}" data-section="{{ anchor }}">{{ label }}</a>
{% endfor %}
</div>
{% endfor %}
</nav>
</aside>
{# The header's height, for the rail pinned under it: 44px touch targets make
the header taller, and a rail pinned to a stale number slides under it.
roles.js measures the same on the Roles page. On a phone the current page
is scrolled into the strip, which a long label can push off its edge. #}
<script>
(function () {
"use strict";
const header = document.querySelector("header.top");
const measure = () =>
document.documentElement.style.setProperty("--chrome", `${header.offsetHeight}px`);
measure();
window.addEventListener("resize", measure);
const here = document.querySelector(".settings-rail a[aria-current=page]");
if (here) here.scrollIntoView({ block: "nearest", inline: "nearest" });
})();
</script>