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 <noreply@anthropic.com>
This commit is contained in:
1 parent
c74546d959
commit
a5af47349f
4 files changed
+48
-24
No files matched your search
+14
-4
@@ -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 `<desk-jobs>`'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
|
||||
* `<desk-jobs>`'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 = '<span class="muted">could not read the job kinds</span>';
|
||||
return;
|
||||
}
|
||||
kinds = kinds.filter((k) => k.kind !== "pull");
|
||||
if (!kinds.length) {
|
||||
host.innerHTML = '<span class="muted">nothing is registered</span>';
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user