Redesign the tracker's UI
Test and publish / test (push) Successful in 51s
Test and publish / publish (push) Successful in 54s

An app shell with a sidebar (a top bar on phones) replaces the per-page
headers and back links. A token-based design system in styles.css, with a
dark set under prefers-color-scheme, replaces the paper palette and the
cv-btn/ja-input classes ported from the main site.

- Applications: header with counts and the follow-up total, the add form
  behind a "New application" button, coloured pipeline tiles, a
  "Needs follow-up" filter, sort indicators, icon row actions, compact
  phone cards. Quick reference sits beside the table on wide screens.
- Leads: profile and sources side by side, underline tabs, score rings,
  source health dots.
- Settings: status cards for capture and email.

No API or store changes. jobs-shared.css and the unused Creato font
are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CiMoE29eGkJtia4hCzSKzT
This commit is contained in:
Adam French
2026-10-14 19:31:17 +00:00
co-authored by Claude Opus 5.5
parent ef38679a45
commit f5b722d100
12 changed files with 2281 additions and 1261 deletions
+250 -266
View File
@@ -9,8 +9,8 @@
* the profile (JobSearchProfile.vue). Nothing reaches the tracker at /jobs/
* until **Track** is pressed on a lead, which adds it there as Saved.
*
* This view owns the page frame, the single error banner, the run button and
* the list. Data access is in stores/jobLeads.js; nothing here calls gql().
* This view owns the page header, the single error banner, the run buttons
* and the list. Data access is in stores/jobLeads.js; nothing here calls gql().
*
* There are three server jobs. "Check now" polls the sources and scores up to
* forty new leads; "Score unscored" polls nothing and scores the whole
@@ -26,7 +26,7 @@ import { useJobLeadsStore } from "@/stores/jobLeads";
import { useJobSearchProfileStore } from "@/stores/jobSearchProfile";
import JobSources from "./JobSources.vue";
import JobSearchProfile from "./JobSearchProfile.vue";
import "./jobs-shared.css";
import Icon from "@/components/Icon.vue";
const TABS = [
{ value: "new", label: "Inbox" },
@@ -117,6 +117,9 @@ function scoreClass(lead) {
return "jl-score-low";
}
/** Fraction of the score ring to fill; an unscored lead gets an empty ring. */
const scoreArc = (lead) => Math.max(0, Math.min(100, lead.score ?? 0));
/** The tooltip says when, which during a rescore is how to tell new from old. */
function scoreTitle(lead) {
if (lead.score == null) return "Not scored";
@@ -247,326 +250,315 @@ onBeforeUnmount(stopPolling);
</script>
<template>
<div class="ja-root jl-root">
<div class="jl-header">
<div class="jl-header-left">
<RouterLink to="/" class="jl-back">← Tracker</RouterLink>
<h2 class="jl-heading">Job Leads</h2>
<div class="page">
<header class="page-header">
<div>
<h1 class="page-title">Leads</h1>
<p class="page-sub jl-sub">
<span v-if="running" class="spinner" aria-hidden="true"></span>
{{ lastRun || "Postings found on the sources below, scored against your profile." }}
</p>
</div>
<div class="jl-header-right">
<span class="jl-hint">{{ lastRun }}</span>
<div class="page-actions">
<button
v-if="scoredCount"
class="cv-btn"
class="btn"
:disabled="running"
title="Score every inbox lead again, including ones already scored. Use after changing the profile or the model. Old scores stay until replaced."
@click="rescore"
>
<Icon name="refresh" />
Rescore all
</button>
<button
v-if="unscoredCount"
class="cv-btn"
class="btn"
:disabled="running"
title="Score every unscored lead in the inbox against the profile, without polling the sources. One Claude call per lead."
@click="start('scoreAll')"
>
Score unscored ({{ unscoredCount }})
<Icon name="sparkles" />
Score unscored
<span class="count">{{ unscoredCount }}</span>
</button>
<button
class="cv-btn cv-btn-primary"
class="btn btn-primary"
:disabled="running"
title="Poll every source now, then score up to 40 new leads. Profile and keyword changes take effect on a run."
@click="start('runSync')"
>
<span v-if="running" class="spinner" aria-hidden="true"></span>
<Icon v-else name="search" />
{{ running ? "Working…" : "Check now" }}
</button>
</div>
</div>
</header>
<div v-if="error" class="jl-error" role="alert">
<div v-if="error" class="alert" role="alert">
<span>{{ error }}</span>
<button class="cv-btn cv-btn-sm" @click="error = ''">Dismiss</button>
<button
class="btn btn-ghost btn-sm btn-icon"
title="Dismiss"
aria-label="Dismiss"
@click="error = ''"
>
<Icon name="x" />
</button>
</div>
<JobSearchProfile @fail="fail" @ok="clearError" />
<JobSources ref="sourcesBox" @fail="fail" @ok="clearError" />
<div class="jl-setup">
<JobSearchProfile @fail="fail" @ok="clearError" />
<JobSources ref="sourcesBox" @fail="fail" @ok="clearError" />
</div>
<div class="jl-tabs">
<div class="jl-tabs" role="tablist">
<button
v-for="t in TABS"
:key="t.value"
class="jl-tab"
role="tab"
:aria-selected="tab === t.value"
:class="{ 'jl-tab-active': tab === t.value }"
@click="tab = t.value"
>
<span class="jl-tab-count">{{ counts[t.value] }}</span>
<span class="jl-tab-label">{{ t.label }}</span>
{{ t.label }}
<span class="count">{{ counts[t.value] }}</span>
</button>
</div>
<div class="jl-filterbar">
<input v-model="search" class="ja-input" type="search" placeholder="Search title, company, location, reasons…" />
<select v-model="sortBy" class="ja-input ja-select jl-sort" title="Order of the list">
<div class="jl-toolbar">
<label class="search">
<Icon name="search" />
<input
v-model="search"
class="input"
type="search"
placeholder="Search title, company, location, reasons…"
aria-label="Search leads"
/>
</label>
<select v-model="sortBy" class="input jl-sort" title="Order of the list" aria-label="Sort">
<option value="score">Best score first</option>
<option value="posted">Newest posting first</option>
</select>
<label v-if="tab === 'new'" class="jl-check">
<label v-if="tab === 'new'" class="check">
<input v-model="showLowScores" type="checkbox" />
Below {{ minScore }}<template v-if="hiddenLow"> ({{ hiddenLow }} hidden)</template>
</label>
<label v-if="tab === 'new'" class="jl-check" title="Postings the keyword filter rejected. They are never scored.">
<label v-if="tab === 'new'" class="check" title="Postings the keyword filter rejected. They are never scored.">
<input :checked="showUnmatched" type="checkbox" @change="toggleUnmatched" />
Filtered out
</label>
</div>
<article
v-for="lead in visibleLeads"
:key="lead.id"
class="jl-lead"
:class="{ 'jl-lead-unmatched': !lead.matched && lead.state === 'new' }"
>
<div class="jl-score" :class="scoreClass(lead)" :title="scoreTitle(lead)">
{{ lead.score ?? "–" }}
</div>
<div class="jl-lead-body">
<div class="jl-lead-title">
<a v-if="lead.url" :href="lead.url" target="_blank" rel="noopener" class="jl-link">{{ lead.jobTitle }}</a>
<span v-else>{{ lead.jobTitle }}</span>
<span class="jl-lead-company">{{ lead.company }}</span>
<div class="jl-list">
<article
v-for="lead in visibleLeads"
:key="lead.id"
class="card jl-lead"
:class="{ 'jl-lead-unmatched': !lead.matched && lead.state === 'new' }"
>
<div
class="jl-score"
:class="scoreClass(lead)"
:style="{ '--arc': scoreArc(lead) }"
:title="scoreTitle(lead)"
>
<span>{{ lead.score ?? "–" }}</span>
</div>
<div class="jl-lead-meta">
<span v-if="lead.location">{{ lead.location }}</span>
<span>{{ SOURCE_LABELS[lead.sourceKind] ?? lead.sourceKind }}</span>
<span>{{ ageLabel(lead) }}</span>
<span v-if="!lead.matched && lead.state === 'new'">filtered out</span>
<div class="jl-lead-body">
<h3 class="jl-lead-title">
<a v-if="lead.url" :href="lead.url" target="_blank" rel="noopener">{{ lead.jobTitle }}</a>
<span v-else>{{ lead.jobTitle }}</span>
</h3>
<div class="jl-lead-meta">
<span class="jl-company">{{ lead.company }}</span>
<span v-if="lead.location">{{ lead.location }}</span>
<span>{{ SOURCE_LABELS[lead.sourceKind] ?? lead.sourceKind }}</span>
<span>{{ ageLabel(lead) }}</span>
<span v-if="!lead.matched && lead.state === 'new'" class="jl-tag">filtered out</span>
</div>
<p v-if="lead.scoreReasons" class="jl-lead-reasons">{{ lead.scoreReasons }}</p>
<pre v-if="descriptionId === lead.id" class="posting jl-desc">{{
descriptions[lead.id] === undefined ? "Loading…" : descriptions[lead.id] || "The source gave no description."
}}</pre>
</div>
<p v-if="lead.scoreReasons" class="jl-lead-reasons">{{ lead.scoreReasons }}</p>
<pre v-if="descriptionId === lead.id" class="jl-desc">{{
descriptions[lead.id] === undefined ? "Loading…" : descriptions[lead.id] || "The source gave no description."
}}</pre>
</div>
<div class="jl-lead-actions">
<button class="cv-btn cv-btn-sm" @click="toggleDescription(lead)">
{{ descriptionId === lead.id ? "Hide" : "Posting" }}
</button>
<template v-if="lead.state === 'new'">
<div class="jl-lead-actions">
<button
class="cv-btn cv-btn-sm cv-btn-primary"
:disabled="busyId === lead.id"
title="Add to the tracker as Saved"
@click="act(lead, 'promote')"
class="btn btn-ghost btn-sm"
:class="{ 'jl-action-on': descriptionId === lead.id }"
:aria-expanded="descriptionId === lead.id"
@click="toggleDescription(lead)"
>
Track
<Icon name="file" :size="14" />
{{ descriptionId === lead.id ? "Hide" : "Posting" }}
</button>
<button class="cv-btn cv-btn-sm" :disabled="busyId === lead.id" @click="act(lead, 'dismiss')">Dismiss</button>
</template>
<button v-else-if="lead.state === 'dismissed'" class="cv-btn cv-btn-sm" :disabled="busyId === lead.id" @click="act(lead, 'restore')">
Restore
</button>
<RouterLink v-else to="/" class="cv-btn cv-btn-sm jl-btn-link">In tracker</RouterLink>
</div>
</article>
<template v-if="lead.state === 'new'">
<button class="btn btn-sm" :disabled="busyId === lead.id" @click="act(lead, 'dismiss')">
<Icon name="x" :size="14" />
Dismiss
</button>
<button
class="btn btn-primary btn-sm"
:disabled="busyId === lead.id"
title="Add to the tracker as Saved"
@click="act(lead, 'promote')"
>
<Icon name="plus" :size="14" />
Track
</button>
</template>
<button
v-else-if="lead.state === 'dismissed'"
class="btn btn-sm"
:disabled="busyId === lead.id"
@click="act(lead, 'restore')"
>
<Icon name="undo" :size="14" />
Restore
</button>
<RouterLink v-else to="/" class="btn btn-sm">
<Icon name="briefcase" :size="14" />
In tracker
</RouterLink>
</div>
</article>
<p v-if="!visibleLeads.length" class="jl-empty">
<template v-if="loading">Loading…</template>
<template v-else-if="tab !== 'new'">Nothing here.</template>
<template v-else-if="hiddenLow">Nothing at or above {{ minScore }}. Tick "Below {{ minScore }}" to see the rest.</template>
<template v-else-if="!leads.length">No leads yet. Add a source above, then press "Check now".</template>
<template v-else>The inbox is empty.</template>
</p>
<div v-if="!visibleLeads.length" class="card empty">
<template v-if="loading">Loading…</template>
<template v-else-if="tab !== 'new'">Nothing here.</template>
<template v-else-if="hiddenLow">Nothing at or above {{ minScore }}. Tick "Below {{ minScore }}" to see the rest.</template>
<template v-else-if="!leads.length">No leads yet. Add a source above, then press "Check now".</template>
<template v-else>The inbox is empty.</template>
</div>
</div>
</div>
</template>
<!-- Unscoped on purpose, for the same reason as jobs-shared.css: the two child
components render the boxes these classes style, and a scoped rule stops
at a child's root element. Every selector is under .jl-root. -->
<style>
.jl-root .jl-box {
margin-bottom: 1rem;
padding: 0.75rem 1rem;
border: 1px solid var(--color-line-soft);
border-radius: 6px;
background: var(--color-paper);
}
.jl-root .jl-box-heading {
font-size: 1rem;
font-weight: 600;
color: var(--color-ink-soft);
cursor: pointer;
}
.jl-root .jl-box-heading > span {
margin-left: 0.6rem;
font-weight: 400;
}
.jl-root .jl-hint {
font-size: 0.8rem;
color: var(--color-ink-faint);
}
.jl-root p.jl-hint {
margin: 0.5rem 0 0;
}
.jl-root .jl-warn {
font-size: 0.8rem;
color: var(--color-ink-danger);
}
</style>
<style scoped>
/* Colours are the paper palette from CVLayout.vue; buttons are .cv-btn from
there too, and the inputs are styled by jobs-shared.css. The frame matches
the tracker page's (.ja-root and friends in JobApplications.vue), whose
rules are scoped to that component and so are repeated here. */
.jl-root {
padding: 1.5rem;
border-top: 2px solid var(--color-ink-soft);
background: var(--color-paper-tint);
}
.jl-header {
/* Shared primitives are in assets/styles.css; this block is the page's own
layout. */
.jl-sub {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.jl-setup {
display: grid;
grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
gap: 1rem;
margin-bottom: 1rem;
align-items: start;
margin-bottom: 1.75rem;
}
.jl-header-left,
.jl-header-right {
display: flex;
align-items: center;
gap: 1rem;
}
.jl-back {
font-size: 0.85rem;
color: var(--color-ink-muted);
text-decoration: none;
}
.jl-back:hover {
color: var(--color-ink);
}
.jl-heading {
font-size: 1.1rem;
font-weight: 600;
color: var(--color-ink-soft);
}
.jl-error {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1rem;
padding: 0.5rem 0.75rem;
border: 1px solid #b91c1c;
border-radius: 4px;
background: #fef2f2;
color: #7f1d1d;
font-size: 0.85rem;
@media (max-width: 1100px) {
.jl-setup {
grid-template-columns: minmax(0, 1fr);
}
}
.jl-tabs {
display: flex;
gap: 0.5rem;
margin-bottom: 0.75rem;
gap: 0.25rem;
margin-bottom: 1rem;
border-bottom: 1px solid var(--border);
}
.jl-tab {
display: flex;
align-items: baseline;
gap: 0.4rem;
padding: 0.4rem 0.9rem;
border: 1px solid var(--color-line-soft);
border-radius: 6px;
background: var(--color-paper);
color: var(--color-ink-muted);
display: inline-flex;
align-items: center;
gap: 0.5rem;
margin-bottom: -1px;
padding: 0.6rem 0.85rem;
border-bottom: 2px solid transparent;
color: var(--text-3);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
}
.jl-tab-active {
border-color: var(--color-ink-soft);
color: var(--color-ink);
.jl-tab:hover {
color: var(--text);
}
.jl-tab-active,
.jl-tab-active:hover {
border-bottom-color: var(--accent);
color: var(--text);
}
.jl-tab-active .count {
background: var(--accent-soft);
color: var(--accent);
}
.jl-tab-count {
font-size: 1.05rem;
font-weight: 600;
}
.jl-tab-label {
font-size: 0.8rem;
}
.jl-filterbar {
.jl-toolbar {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 0.75rem;
flex-wrap: wrap;
margin-bottom: 1rem;
}
.jl-sort {
flex: 0 0 auto;
width: auto;
}
.jl-check {
.jl-list {
display: flex;
align-items: center;
gap: 0.35rem;
font-size: 0.8rem;
color: var(--color-ink-muted);
white-space: nowrap;
cursor: pointer;
flex-direction: column;
gap: 0.6rem;
}
.jl-lead {
display: flex;
align-items: flex-start;
gap: 0.9rem;
margin-bottom: 0.5rem;
padding: 0.7rem 0.9rem;
border: 1px solid var(--color-line-soft);
border-radius: 6px;
background: var(--color-paper);
gap: 1rem;
padding: 1rem 1.1rem;
transition: border-color 0.12s;
}
.jl-lead:hover {
border-color: var(--border-strong);
}
.jl-lead-unmatched {
opacity: 0.6;
}
/* The score reads as a number first; the tint only groups it. Same tints as
the tracker's status pills. */
/* The score reads as a number first; the ring shows it out of 100 and its
colour only groups it. */
.jl-score {
flex: 0 0 2.6rem;
padding: 0.35rem 0;
border-radius: 6px;
font-size: 1rem;
font-weight: 600;
text-align: center;
color: var(--color-ink-soft);
background: var(--color-paper-shade);
--tone: var(--text-3);
display: grid;
place-items: center;
flex: 0 0 3rem;
width: 3rem;
height: 3rem;
border-radius: 50%;
background: conic-gradient(
var(--tone) calc(var(--arc) * 1%),
color-mix(in srgb, var(--tone) 15%, var(--surface)) 0
);
}
.jl-score > span {
display: grid;
place-items: center;
width: 2.45rem;
height: 2.45rem;
border-radius: 50%;
background: var(--surface);
color: color-mix(in srgb, var(--tone) 80%, var(--text));
font-size: 0.95rem;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.jl-score-high {
background: #dcfce7;
color: #14532d;
--tone: var(--ok);
}
.jl-score-mid {
background: #fef9c3;
color: #713f12;
--tone: var(--warn);
}
.jl-score-none {
color: var(--color-ink-faint);
.jl-score-low {
--tone: var(--danger);
}
.jl-lead-body {
@@ -575,86 +567,78 @@ onBeforeUnmount(stopPolling);
}
.jl-lead-title {
font-size: 0.95rem;
font-size: 1rem;
font-weight: 600;
color: var(--color-ink);
}
.jl-lead-company {
margin-left: 0.5rem;
font-weight: 400;
color: var(--color-ink-muted);
.jl-lead-title a {
color: var(--text);
}
.jl-link {
color: var(--color-ink-link);
.jl-lead-title a:hover {
color: var(--accent);
text-decoration: none;
}
.jl-link:hover {
text-decoration: underline;
}
.jl-lead-meta {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 0.9rem;
align-items: center;
gap: 0.2rem 0;
margin-top: 0.15rem;
font-size: 0.8rem;
color: var(--color-ink-faint);
color: var(--text-3);
font-size: 0.8125rem;
}
.jl-lead-meta > span + span::before {
content: "·";
margin: 0 0.5rem;
color: var(--border-strong);
}
.jl-company {
color: var(--text-2);
font-weight: 500;
}
.jl-tag {
color: var(--warn);
}
.jl-lead-reasons {
margin: 0.4rem 0 0;
font-size: 0.85rem;
color: var(--color-ink-soft);
margin-top: 0.5rem;
color: var(--text-2);
font-size: 0.875rem;
line-height: 1.55;
}
/* The posting text is long, so it scrolls inside the card. */
.jl-desc {
max-height: 22rem;
overflow: auto;
margin: 0.6rem 0 0;
padding: 0.6rem;
border: 1px solid var(--color-line-soft);
border-radius: 4px;
background: var(--color-paper-tint);
font-family: inherit;
font-size: 0.8rem;
white-space: pre-wrap;
margin-top: 0.75rem;
}
.jl-lead-actions {
display: flex;
gap: 0.4rem;
white-space: nowrap;
flex: none;
}
.jl-btn-link {
text-decoration: none;
.jl-action-on {
background: var(--accent-soft);
color: var(--accent);
}
.jl-empty {
color: var(--color-ink-faint);
font-size: 0.9rem;
}
@media (max-width: 640px) {
.jl-header,
.jl-filterbar {
flex-wrap: wrap;
}
@media (max-width: 720px) {
.jl-lead {
flex-wrap: wrap;
}
.jl-lead-body {
flex-basis: calc(100% - 3.5rem);
flex-basis: calc(100% - 4rem);
}
.jl-lead-actions {
flex-basis: 100%;
}
.jl-lead-actions > * {
flex: 1;
}
}
</style>