From a5af47349ffe154725ef426447ccad09bfc0838d Mon Sep 17 00:00:00 2001 From: Wolf Date: Fri, 25 Sep 2026 21:52:31 +0200 Subject: [PATCH] Pulls: Pull now on top, one stage at a time tucked away Pull now moves from the Sources page's own button to Pulls, wired the same way (POST /api/jobs {kind: "pull"}), sitting beside what is running. The schedule follows, then extract, embed and score move under a "Run one stage" details -- jobs.js still draws them from /api/jobs/kinds, minus pull, which gets the dedicated button instead of appearing twice. Messages' lede drops the file's own vocabulary (a "fix", "cleared yet") for the reader's: a fortnight, not a job kind or a config key. Found but not fixed: at 375px the refreshed desk-schedules still squeezes its name and cadence columns to a sliver, because kind/next/last size to their untruncated content instead of the width their own ellipsis implies. No page-level horizontal scroll comes of it, so overflow-x: auto stays as the safety net, with a comment pointing at the cause. The fix belongs in ../boilerplate, ahead of the next refresh -- out of reach from this worktree. Co-Authored-By: Claude Fable 5.1 --- app/static/app.css | 16 +++++++++++-- app/static/jobs.js | 18 ++++++++++---- app/templates/settings/messages.html | 2 +- app/templates/settings/pulls.html | 36 +++++++++++++++------------- 4 files changed, 48 insertions(+), 24 deletions(-) diff --git a/app/static/app.css b/app/static/app.css index 40a8e87..e494315 100644 --- a/app/static/app.css +++ b/app/static/app.css @@ -192,6 +192,13 @@ button.secondary { font-size: 0.8rem; } +/* -- pulls ------------------------------------------------------------------ */ +/* "Run one stage" on the Pulls page: extract, embed and score on their own, + under the schedule rather than beside Pull now. */ + +details.stage summary { cursor: pointer; color: var(--dim); font-size: 0.95rem; font-weight: 600; } +details.stage[open] summary { margin-bottom: 0.75rem; } + /* -- the notice log ------------------------------------------------------- */ .notice { @@ -277,8 +284,13 @@ desk-jobs, desk-schedules, auth-account { --desk-jobs-gap: var(--gap); --desk-jobs-radius: var(--radius); } -/* The schedule table has no narrow layout of its own yet, and what overflows - a shadow root widens the page. It scrolls inside its own box instead. */ +/* pipeline 21c5faa gave the schedule table a narrow layout, but its + kind/next/last columns are sized to their untruncated content rather than + the width their own ellipsis implies, which still squeezes the name and + cadence columns to a sliver at 375px -- a fix that has to land in + ../boilerplate first, or the next refresh reverts it (see CLAUDE.md). Kept + until then so the odd pixel that still overflows scrolls inside its own + box rather than widening the page. */ desk-schedules { overflow-x: auto; } /* -- roledesk's tabs ------------------------------------------------------ */ diff --git a/app/static/jobs.js b/app/static/jobs.js index 199c689..1fcaa01 100644 --- a/app/static/jobs.js +++ b/app/static/jobs.js @@ -1,8 +1,11 @@ -/* The Pulls page: a button per kind. +/* The Pulls page: Pull now on top, one button per remaining kind under + * "Run one stage". * * The list comes from `/api/jobs/kinds`, which is the registry, so a new - * `@job` in `app/jobs.py` is a new button and this file is not edited. What - * the queue is doing is ``'s business, and it draws itself. + * `@job` in `app/jobs.py` is a new button and this file is not edited -- + * except that `pull` itself is pulled out of the list and wired to the + * dedicated button instead of appearing twice. What the queue is doing is + * ``'s business, and it draws itself. * * Failures are the server's sentence through `api()`, which toasts it -- so * there is no error handling here beyond keeping the button usable. @@ -12,7 +15,7 @@ "use strict"; const host = document.getElementById("kinds"); - if (!host) return; + const pullButton = document.getElementById("pull-now"); async function start(kind, button) { button.disabled = true; @@ -26,7 +29,12 @@ } } + if (pullButton) { + pullButton.addEventListener("click", () => start("pull", pullButton)); + } + async function draw() { + if (!host) return; let kinds; try { kinds = await window.api("/api/jobs/kinds"); @@ -34,6 +42,7 @@ host.innerHTML = 'could not read the job kinds'; return; } + kinds = kinds.filter((k) => k.kind !== "pull"); if (!kinds.length) { host.innerHTML = 'nothing is registered'; return; @@ -42,6 +51,7 @@ kinds.forEach((k) => { const button = document.createElement("button"); button.type = "button"; + button.className = "secondary"; button.textContent = k.label || k.kind; button.title = k.solo ? `${k.kind} -- one at a time` : k.kind; button.dataset.kind = k.kind; diff --git a/app/templates/settings/messages.html b/app/templates/settings/messages.html index 63e2fca..1e6a67b 100644 --- a/app/templates/settings/messages.html +++ b/app/templates/settings/messages.html @@ -5,7 +5,7 @@

Settings

{% include "settings/_tabs.html" %} -

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.

+

What the server said that nobody has cleared, newest first. A message goes when you clear it, or a fortnight after it was last said.

diff --git a/app/templates/settings/pulls.html b/app/templates/settings/pulls.html index 7fcc32e..7e1a6a4 100644 --- a/app/templates/settings/pulls.html +++ b/app/templates/settings/pulls.html @@ -8,21 +8,16 @@

Every 6 hours roledesk reads every board and search, then fills in what each posting says, embeds and scores. Change the cadence below.

-

Start something

-
- loading… +
+

What is running

+
-
- -
- {# 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. #} -

What is running

+ {# The heading and the idle line are the app's: the element takes up no + space while the queue is idle — 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. The element + and its script are the queue's own, served by its own router — see + pipeline/web/static/jobs.js. #}

Nothing at the moment.

@@ -30,13 +25,20 @@
{# 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. #} + router — see pipeline/web/static/schedules.js. 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. #}

Schedule

+ +
+ Run one stage +
+ loading… +
+
{% endblock %} {% block scripts %}