Two tabs and a cog: settings shell, one ranking, a script per page, the phone frame

The top bar is Roles and Applications plus health's cog. Behind the cog,
/settings/{ranking,searches,companies,pulls,messages,account} share one row
of sub-tabs, an underlined row on a desktop and pills on a phone. The old
paths answer 301 with their query string.

Ranking edits the first enabled agent, or creates one, with the intent,
the weights and the gates under Advanced. The order menu on Roles reads
Newest and Best match with one enabled agent, and names them with several.
config.yaml keeps the Copenhagen starter; the other two are commented
examples in config.example.yaml.

roles.js is split into roles.js, applications.js, ranking.js and
companies.js; count, cell, debounce, the company list and the affinity
control live once in app.js. app.css gets the phone frame after health and
newsdesk: one-row bar, edge-to-edge panels, 44px targets and 16px fields on
a coarse pointer, hover only where there is one, safe areas. The app is
installable from a manifest and roledesk-coloured icons. Every lede touched
is written for the person using the app.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-25 21:29:06 +02:00
1 parent 8c4bc3112a
commit 7d31cca394
34 files changed
+848 -565

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
{# The sub-tabs under the cog: `SETTINGS` from app/web/pages.py, each active by
its own path. Links, not a script: every sub-tab is a page of its own. #}
<nav class="subtabs" aria-label="Settings">
{% for tab in SETTINGS %}
<a href="{{ tab.path }}"
{% if request.url.path == tab.path %}class="active" aria-current="page"{% endif %}>{{ tab.label }}</a>
{% endfor %}
</nav>
+21
View File
@@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}Account — roledesk{% endblock %}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<p class="lede">The one password, the devices signed in with it, and the passkeys that sign in without it.</p>
<section class="card">
{# As on the Pulls page: the element and its script belong to
the module, so this page is two lines and `auth/` owns what they draw.
It says its own failures in place, beside the button that caused them,
and raises `auth-account:error` with the server's `detail` as well. No
toast is wired to that here on purpose: one failure said twice is worse
than one failure said once, and next to the form is where it belongs. #}
<script type="module" src="/_auth/account.js"></script>
<auth-account></auth-account>
</section>
{% endblock %}
+32
View File
@@ -0,0 +1,32 @@
{% extends "base.html" %}
{% block title %}Companies — roledesk{% endblock %}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<p class="lede">Every company roledesk has seen, and how many of its roles are open. <strong>M</strong>ute keeps its roles out of the list, <strong>L</strong>ike lifts them in Best match, and <strong>F</strong>avourite puts them at the top.</p>
<form class="filters" autocomplete="off" onsubmit="return false">
<input type="search" id="c-q" placeholder="Filter by name or board" aria-label="Filter companies">
<select id="c-affinity" aria-label="Affinity">
<option value="">Any affinity</option>
<option value="2">Favourite</option>
<option value="1">Like</option>
<option value="0">Neutral</option>
<option value="-1">Mute</option>
</select>
</form>
<p id="companies-count" class="count" role="status"></p>
<table class="list">
<thead>
<tr><th>Company</th><th>Board</th><th class="num">Open roles</th><th>Affinity</th></tr>
</thead>
<tbody id="companies-list"></tbody>
</table>
{% endblock %}
{% block scripts %}
<script src="{{ asset('companies.js') }}"></script>
{% endblock %}
+21
View File
@@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}Messages — roledesk{% endblock %}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<p class="lede">What the server said that nobody has cleared yet, newest first, with the fix when there is one. A message goes when you clear it, or two weeks after it was last said.</p>
<section class="card">
<div class="row-between">
<h2>The log</h2>
<button type="button" id="clear-all" class="secondary">Clear all</button>
</div>
<div id="notices"><span class="muted">loading…</span></div>
</section>
{% endblock %}
{% block scripts %}
<script src="{{ asset('messages.js') }}"></script>
{% endblock %}
+44
View File
@@ -0,0 +1,44 @@
{% extends "base.html" %}
{% block title %}Pulls — roledesk{% endblock %}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<p class="lede">Every 6 hours roledesk reads every board and search, then fills in what each posting says, embeds and scores. Change the cadence below.</p>
<section class="card">
<h2>Start something</h2>
<div id="kinds" class="buttons">
<span class="muted">loading…</span>
</div>
</section>
<section class="card">
{# The queue's own element, served by its own router. Two lines, and the
module owns what they draw — see pipeline/web/static/jobs.js.
The heading is the app's, because the element takes up no space while
nothing is running — that is its `idle="hide"` default, and a strip that
is always there is furniture — and a card with nothing in it and nothing
above it reads as something that failed to load. #}
<h2>What is running</h2>
<p class="muted small" id="idle">Nothing at the moment.</p>
<script type="module" src="/_jobs/jobs.js"></script>
<desk-jobs></desk-jobs>
</section>
<section class="card">
{# The element and its script are the scheduler's own, served by its own
router — see pipeline/web/static/schedules.js. Two lines, as with jobs.
A cadence is typed as `every 15m`, `every 6h`, `daily at 06:00` or
`weekly mon 07:00`; its add row's placeholder shows two. #}
<h2>Schedule</h2>
<script type="module" src="/_jobs/schedules.js"></script>
<desk-schedules></desk-schedules>
</section>
{% endblock %}
{% block scripts %}
<script src="{{ asset('jobs.js') }}"></script>
{% endblock %}
+39
View File
@@ -0,0 +1,39 @@
{% extends "base.html" %}
{% block title %}Ranking — roledesk{% endblock %}
{# One ranking in the UI, whatever the `agents` table holds: `static/ranking.js`
edits the first enabled agent and makes one on the first save if there is
none. No list, no New, no Delete. #}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
<p class="lede">Describe the role you want. Best match on the Roles tab puts the postings closest to this first, and saving reorders them all.</p>
<form id="ranking-form" class="agent-form" autocomplete="off">
<p id="ranking-others" class="count" hidden></p>
<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>
<span class="hint">A paragraph of your CV, or the role in your own words: the work, the stack, the level.</span></label>
<fieldset class="weights">
<legend>How much each counts</legend>
<label>Fit to the text <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
<label>Newness <input type="number" id="a-recency" min="0" step="0.05" value="0.2"></label>
<label>Companies you like <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
</fieldset>
<details class="advanced">
<summary>Advanced</summary>
<label>Gates
<textarea id="a-gates" class="code" rows="6" spellcheck="false">[]</textarea>
<span class="hint">Rules a role must meet (require) or that lift it (prefer), as JSON: <code>[{"field": "country", "values": ["DK"], "mode": "require"}, {"field": "remote", "values": ["remote"], "mode": "prefer", "weight": 0.05}]</code>. Fields: place, country, remote, seniority, function, salary_min, currency, permit, languages, company. EU is a role open anywhere in Europe.</span></label>
</details>
<div class="agent-actions">
<button type="submit">Save and score</button>
</div>
<p id="ranking-status" class="count" role="status"></p>
</form>
{% endblock %}
{% block scripts %}
<script src="{{ asset('ranking.js') }}"></script>
{% endblock %}
+111
View File
@@ -0,0 +1,111 @@
{% extends "base.html" %}
{% block title %}Searches — roledesk{% endblock %}
{% block content %}
<h1>Settings</h1>
{% include "settings/_tabs.html" %}
{# Still the old Sources page whole, company boards and prune included, until
the Companies page takes those over. #}
<div class="row-between">
<p class="lede">Where roles come from: saved searches find them at any company, and a followed company's board lists every role it has. Switching one off closes its roles until you switch it back on.</p>
<button type="button" id="pull-now" class="secondary">Pull now</button>
</div>
<p id="pull-status" class="count" role="status"></p>
<section class="section">
<h2>Searches</h2>
<p id="searches-count" class="count" role="status"></p>
<table class="list">
<thead>
<tr><th>Search</th><th>Query</th><th class="num">Open roles</th><th>Countries</th><th>On</th><th></th></tr>
</thead>
<tbody id="searches-list"></tbody>
</table>
<form id="search-form" class="agent-form source-form" autocomplete="off">
<h2 id="search-form-title">New search</h2>
<div class="form-row">
<label>Board
<select id="s-provider">
<option value="jobindex">Jobindex (Denmark)</option>
<option value="adzuna">Adzuna (UK and EU)</option>
</select></label>
<label class="grow">Name <input type="text" id="s-name" required placeholder="Copenhagen backend"></label>
</div>
<label>Query
<span class="hint" data-provider="jobindex">Jobindex syntax: words are OR, <code>"a b"</code> is a phrase, <code>+word</code> is required.</span>
<span class="hint" data-provider="adzuna" hidden>Every word must appear.</span>
<input type="text" id="s-q" required spellcheck="false"></label>
<div class="form-row">
<label data-provider="jobindex">Area
<select id="s-area">
{% for value, label in areas %}<option value="{{ value }}"{% if value == 1 %} selected{% endif %}>{{ label }}</option>{% endfor %}
</select></label>
<label data-provider="adzuna" hidden>Country
<select id="s-country">
{% for value, label in countries %}<option value="{{ value }}">{{ label }}</option>{% endfor %}
</select></label>
<label data-provider="adzuna" hidden class="grow">Place <input type="text" id="s-where" placeholder="Berlin"></label>
<label>Pages <span class="hint">per pull, up to 10</span>
<input type="number" id="s-pages" min="1" max="10" value="10"></label>
</div>
<p id="adzuna-key" class="note" hidden>No Adzuna key is set. Get a free one at developer.adzuna.com and set <code>ADZUNA_APP_ID</code> and <code>ADZUNA_APP_KEY</code> before starting the app.</p>
<div class="agent-actions">
<button type="button" id="s-try" class="secondary">Try it</button>
<button type="submit">Save</button>
<button type="button" id="s-new" class="secondary">New</button>
</div>
<p id="search-status" class="count" role="status"></p>
<ol id="search-sample" class="sample"></ol>
</form>
</section>
<section class="section">
<h2>Company boards</h2>
<form class="filters" autocomplete="off" onsubmit="return false">
<input type="search" id="b-q" placeholder="Filter by company or board" aria-label="Filter boards">
<select id="b-on" aria-label="On or off">
<option value="">On and off</option>
<option value="on">On</option>
<option value="off">Off</option>
</select>
</form>
<p id="boards-count" class="count" role="status"></p>
<table class="list">
<thead>
<tr><th>Company</th><th>Board</th><th class="num">Open roles</th><th>Countries</th><th>On</th></tr>
</thead>
<tbody id="boards-list"></tbody>
</table>
<form id="board-form" class="agent-form source-form" autocomplete="off">
<h2>Follow a company</h2>
<div class="form-row">
<label class="grow">Board <span class="hint">host:slug, from its careers page URL: greenhouse, lever, ashby, workable, smartrecruiters, recruitee, personio</span>
<input type="text" id="b-board" required placeholder="ashby:acme" spellcheck="false"></label>
<label class="grow">Company <input type="text" id="b-name" required placeholder="Acme"></label>
</div>
<div class="agent-actions"><button type="submit">Follow</button></div>
<p id="board-status" class="count" role="status"></p>
</form>
</section>
<section class="section">
<h2>Prune boards by region</h2>
<form id="prune-form" class="agent-form source-form" autocomplete="off">
<label>Region <span class="hint"><code>europe</code>, or country codes such as <code>DK,SE,NO,EU</code>. EU is a role open anywhere in Europe.</span>
<input type="text" id="p-region" value="europe" spellcheck="false"></label>
<div class="agent-actions">
<button type="submit" class="secondary">Preview</button>
<button type="button" id="p-apply" disabled>Switch them off</button>
</div>
<p id="prune-status" class="count" role="status"></p>
<ul id="prune-list" class="sample"></ul>
</form>
</section>
{% endblock %}
{% block scripts %}
<script src="{{ asset('sources.js') }}"></script>
{% endblock %}