Serve one alpha page: filters, roles, the tracker, and Jobs

/, GET /api/roles|companies|applications, POST /api/companies/{key}/affinity
and /api/applications[/{id}/status]. The Jinja2 template renders an empty
shell; static/app.js fills it and drives Save, affinity and status changes.
<desk-jobs> from pipeline.web mounts at the bottom so Pull can be started
from the page.

Store.roles gains q, function, remote, days and hide_muted, and company/
place move from a key match to a substring on the text a board wrote.
hide_muted filters in SQL before LIMIT: filtering after it shipped first and
broke immediately on real data, since Databricks' freshly pulled 884 roles
were the newest 200-plus rows in the table and muting it left nothing to
show.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Sonnet 5 committed 2026-09-23 11:56:10 +02:00
1 parent 867ebe6405
commit b44f78ca7e
13 files changed
+1143 -22

No files matched your search

+92
View File
@@ -0,0 +1,92 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>roledesk</title>
<link rel="stylesheet" href="/static/app.css">
</head>
<body>
<header>
<span class="wordmark">role<span>desk</span></span>
<nav class="tabs" id="tabs">
<button type="button" class="tab" data-tab="roles" aria-pressed="true">Roles</button>
<button type="button" class="tab" data-tab="applications" aria-pressed="false">Applications</button>
</nav>
</header>
<section id="roles-view" class="view">
<form id="filters" class="filters" autocomplete="off">
<input type="search" id="f-q" placeholder="Search titles" aria-label="Search titles">
<input type="text" id="f-company" placeholder="Company" aria-label="Company">
<input type="text" id="f-place" placeholder="Place" aria-label="Place">
<select id="f-function" aria-label="Function">
<option value="">Any function</option>
{% for value, label in functions %}
<option value="{{ value }}">{{ label }}</option>
{% endfor %}
</select>
<select id="f-remote" aria-label="Remote">
<option value="">Any remote</option>
{% for value, label in remote_options %}
<option value="{{ value }}">{{ label }}</option>
{% endfor %}
</select>
<select id="f-days" aria-label="New in">
<option value="">Any time</option>
<option value="1">New in 1 day</option>
<option value="3">New in 3 days</option>
<option value="7">New in 7 days</option>
<option value="30">New in 30 days</option>
</select>
<label class="show-muted">
<input type="checkbox" id="f-show-muted"> Show muted
</label>
</form>
<p id="roles-count" class="count" role="status"></p>
<ul id="roles-list" class="roles"></ul>
</section>
<section id="applications-view" class="view" hidden>
<p id="applications-count" class="count" role="status"></p>
<table class="applications">
<thead>
<tr><th>Role</th><th>Company</th><th>Status</th><th>Next</th></tr>
</thead>
<tbody id="applications-list"></tbody>
</table>
</section>
<section id="jobs">
<h2>Jobs</h2>
<script type="module" src="/_jobs/jobs.js"></script>
<desk-jobs></desk-jobs>
</section>
<template id="role-row">
<li class="role">
<div class="role-main">
<a class="role-title" target="_blank" rel="noopener"></a>
<span class="role-company"></span>
<span class="affinity" role="group"></span>
</div>
<div class="role-meta">
<span class="role-place"></span>
<span class="role-remote badge"></span>
<span class="role-function badge"></span>
<span class="role-age"></span>
</div>
<button type="button" class="save"></button>
</li>
</template>
<script>
// The tracker's status vocabulary, from the same `STATUSES` tuple the
// store validates a status change against — see roledesk/web/pages.py.
window.ROLEDESK_STATUSES = {{ status_options | map(attribute=0) | list | tojson }};
</script>
<script src="/static/app.js" defer></script>
</body>
</html>