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:
1 parent
8c4bc3112a
commit
7d31cca394
34 files changed
+848
-565
No files matched your search
@@ -1,37 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Agents — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Search agents</h1>
|
||||
<p class="lede">A search agent is a named search: an intent that <code>fit</code> is measured against, gates that require or prefer a column value, and the weights of each term. Saving one rescores it; the Roles tab orders by it when it is picked there.</p>
|
||||
|
||||
<p id="agents-count" class="count" role="status"></p>
|
||||
<ul id="agents-list" class="agents"></ul>
|
||||
|
||||
<form id="agent-form" class="agent-form" autocomplete="off">
|
||||
<h2 id="agent-form-title">New agent</h2>
|
||||
<input type="hidden" id="a-id">
|
||||
<label>Name <input type="text" id="a-name" required></label>
|
||||
<label>Intent <span class="hint">a CV paragraph, or what this search is for</span>
|
||||
<textarea id="a-intent" rows="5"></textarea></label>
|
||||
<label>Gates <span class="hint">JSON: [{"field": "place", "values": ["Berlin"], "mode": "require"}, {"field": "remote", "values": ["remote"], "mode": "prefer", "weight": 0.05}]</span>
|
||||
<textarea id="a-gates" rows="5" spellcheck="false">[]</textarea></label>
|
||||
<fieldset class="weights">
|
||||
<legend>Weights</legend>
|
||||
<label>Fit <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
|
||||
<label>Recency <input type="number" id="a-recency" min="0" step="0.05" value="0.2"></label>
|
||||
<label>Affinity <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
|
||||
</fieldset>
|
||||
<label class="inline"><input type="checkbox" id="a-enabled" checked> Enabled</label>
|
||||
<div class="agent-actions">
|
||||
<button type="submit">Save and score</button>
|
||||
<button type="button" id="a-new" class="secondary">New</button>
|
||||
<button type="button" id="a-delete" class="secondary" hidden>Delete</button>
|
||||
</div>
|
||||
<p id="agent-status" class="count" role="status"></p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ asset('roles.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>Applications</h1>
|
||||
<p class="lede">Every role saved from the Roles tab, and where it stands. A status change is recorded as an event, which is what days to first screen and conversion are computed from.</p>
|
||||
<p class="lede">Every role you saved on the Roles tab, and where it stands. Change the status as it moves.</p>
|
||||
|
||||
<p id="applications-count" class="count" role="status"></p>
|
||||
<table class="list">
|
||||
@@ -20,5 +20,5 @@
|
||||
// store validates a status change against; see app/web/pages.py.
|
||||
window.ROLEDESK_STATUSES = {{ status_options | map(attribute=0) | list | tojson }};
|
||||
</script>
|
||||
<script src="{{ asset('roles.js') }}"></script>
|
||||
<script src="{{ asset('applications.js') }}"></script>
|
||||
{% endblock %}
|
||||
+31
-4
@@ -1,12 +1,32 @@
|
||||
{# The frame every page is in. The nav is `TABS` from app/web/pages.py and
|
||||
nothing else: adding a tab is one entry in that list, never a link here. #}
|
||||
{# The frame every page is in. The top bar is `TABS` from app/web/pages.py
|
||||
plus the cog, and the cog's sub-tabs are `SETTINGS` there: adding a page is
|
||||
one entry in one of those lists, never a link here. #}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>{% block title %}roledesk{% endblock %}</title>
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='2' width='12' height='12' rx='3' fill='none' stroke='%2314655b' stroke-width='1.8'/%3E%3C/svg%3E">
|
||||
{# Kept on the home screen rather than in a tab, as newsdesk is: `display:
|
||||
standalone` in the manifest drops the browser's chrome, which is worth a
|
||||
row of roles on a phone. `manifest.json` and not `.webmanifest`, because
|
||||
StaticFiles guesses the content type from the extension and not every
|
||||
machine knows the second one. Two `theme-color`s so the status bar is the
|
||||
colour of the header right under it. No service worker: the app is no use
|
||||
without the server. #}
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="/static/icon-192.png" type="image/png" sizes="192x192">
|
||||
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
||||
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#1b2126" media="(prefers-color-scheme: dark)">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
{# iOS reads neither the manifest nor the line above: standalone mode, the
|
||||
home screen label and the status bar are still set from its own
|
||||
`apple-` metas. #}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-title" content="roledesk">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<link rel="stylesheet" href="{{ asset('app.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
@@ -17,6 +37,12 @@
|
||||
<a href="{{ tab.path }}"
|
||||
{% if request.url.path == tab.path %}class="active" aria-current="page"{% endif %}>{{ tab.label }}</a>
|
||||
{% endfor %}
|
||||
{# health's cog: an icon because it is not a place you go to often, and a
|
||||
word would take a third of the bar on a phone. #}
|
||||
<a href="/settings" class="icon{% if request.url.path.startswith('/settings') %} active{% endif %}"
|
||||
title="Settings" aria-label="Settings"><svg viewBox="0 0 24 24" width="17" height="17"
|
||||
aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||
stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@@ -26,7 +52,8 @@
|
||||
|
||||
{# toasts first, and the order is load-bearing: it owns `window.toast`, which
|
||||
app.js calls on a failed fetch and live.js feeds server notices into, and
|
||||
`window.esc`, which every page script below builds its HTML with. #}
|
||||
`window.esc`, which every page script below builds its HTML with. app.js
|
||||
next, since every page script takes `api` and the shared helpers from it. #}
|
||||
<script src="{{ asset('toasts.js') }}"></script>
|
||||
<script src="{{ asset('app.js') }}"></script>
|
||||
<script src="{{ asset('live.js') }}"></script>
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
the API does not. #}
|
||||
<p class="lede">{{ detail }}</p>
|
||||
|
||||
<p><a href="/">Back to the roles</a>, or <a href="/messages">see what the server has been saying</a>.</p>
|
||||
<p><a href="/">Back to the roles</a>, or <a href="/settings/messages">see what the server has been saying</a>.</p>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Schedules — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Schedules</h1>
|
||||
|
||||
<p class="lede">A schedule enqueues a job kind on a cadence: <code>every 15m</code>, <code>every 6h</code>, <code>every 2d</code>, <code>daily at 06:00</code> or <code>weekly mon 07:00</code>, the clock ones read in <code>timezone</code> from <code>config.yaml</code>. The default, <code>pull</code> every 6h, is declared next to the <code>pull</code> job in <code>app/jobs/cascade.py</code>. It is a starting point: a cadence edited here, or a schedule switched off, survives restarts and deploys.</p>
|
||||
|
||||
<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. #}
|
||||
<script type="module" src="/_jobs/schedules.js"></script>
|
||||
<desk-schedules></desk-schedules>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -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>
|
||||
@@ -2,12 +2,13 @@
|
||||
{% block title %}Account — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Account</h1>
|
||||
<h1>Settings</h1>
|
||||
{% include "settings/_tabs.html" %}
|
||||
|
||||
<p class="lede">One password, the sessions it has opened, and the passkeys registered beside it. There is no user to create and none to delete, because there is one. <code>docs/password-protection.md</code> is the reasoning behind every choice on this page; <code>auth/README.md</code> is how to take the folder into another project.</p>
|
||||
<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 Jobs and Schedules tabs: the element and its script belong to
|
||||
{# 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,
|
||||
@@ -2,8 +2,10 @@
|
||||
{% block title %}Companies — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Companies</h1>
|
||||
<p class="lede">Every company whose board is read, with how many of its roles are open. Affinity: <strong>M</strong>ute hides its roles and leaves them unscored, <strong>N</strong>eutral is the default, <strong>L</strong>ike raises the affinity term, <strong>F</strong>avourite skips the gates and floors the score at 0.9.</p>
|
||||
<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">
|
||||
@@ -26,5 +28,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ asset('roles.js') }}"></script>
|
||||
<script src="{{ asset('companies.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -2,9 +2,10 @@
|
||||
{% block title %}Messages — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Messages</h1>
|
||||
<h1>Settings</h1>
|
||||
{% include "settings/_tabs.html" %}
|
||||
|
||||
<p class="lede">Everything the server has said that nobody has cleared, newest first. A toast fades and is raised as often as not while no tab is open; this is where it is found again, with its fix, its raw error, and how many times it has been said. A row goes when you clear it, or a fortnight after it was last said.</p>
|
||||
<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">
|
||||
@@ -1,15 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Jobs — roledesk{% endblock %}
|
||||
{% block title %}Pulls — roledesk{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Jobs</h1>
|
||||
<h1>Settings</h1>
|
||||
{% include "settings/_tabs.html" %}
|
||||
|
||||
<p class="lede"><strong>pull</strong> runs the whole chain: every board, then extract, embed and score. <strong>extract</strong>, <strong>embed</strong> and <strong>score</strong> run one stage on their own. The buttons come from <code>/api/jobs/kinds</code>, so a new <code>@job</code> under <code>app/jobs/</code> appears here without an edit.</p>
|
||||
<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 the job kinds…</span>
|
||||
<span class="muted">loading…</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -22,10 +23,20 @@
|
||||
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. Press one of the buttons above.</p>
|
||||
<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 %}
|
||||
@@ -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 %}
|
||||
@@ -1,12 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Sources — roledesk{% endblock %}
|
||||
{% 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">
|
||||
<h1>Sources</h1>
|
||||
<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 class="lede">What a pull reads: saved searches, which find roles at any company, and company boards, which read every role one company lists. A pull runs on the Schedules tab's cadence. Switching one off closes its open roles at once; switched back on, the next pull reopens the ones it still finds.</p>
|
||||
<p id="pull-status" class="count" role="status"></p>
|
||||
|
||||
<section class="section">
|
||||
Reference in new issue
Block a user