Pull pipeline/ from boilerplate a80ad8a: cadence picker, queue badge, label refresh

The schedule cadence is a picker, the add row is behind a button and off
here, a running-jobs chip with Kill and Stop run sits in every header, and
a declared schedule's label is refreshed at startup.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 16:22:46 +02:00
1 parent cebe62ddc9
commit 3a240e51df
16 files changed
+828 -167

No files matched your search

+36
View File
@@ -436,6 +436,42 @@ def test_reconciliation_keeps_what_the_user_edited(declared, jobs):
assert again.payload == {"note": "mine"}
def test_reconciliation_refreshes_the_label_and_nothing_else(declared, jobs):
"""The label is the declaration's: no screen edits it, so a relabel in the
code has to reach an install that already has the row, or the old wording
stays on screen forever. The cadence and the switch stay the user's."""
declare("nightly tick", "s_tick", "daily at 06:00", label="Old wording")
queue = JobQueue(jobs, {}, [], tz="UTC")
queue._reconcile_schedules()
row = jobs.schedules()[0]
jobs.update_schedule(row.id, cadence="every 2d", enabled=False)
declared.clear()
declare("nightly tick", "s_tick", "daily at 07:00", label="New wording")
queue._reconcile_schedules() # a restart, after a deploy
again = jobs.schedules()[0]
assert again.id == row.id
assert again.label == "New wording"
assert (again.cadence, again.enabled) == ("every 2d", False)
def test_a_row_whose_kind_was_changed_keeps_its_label(declared, jobs):
"""A row edited to run another kind is the declaration's in name only, and
a label written for the declared job would misname it."""
declare("nightly", "s_tick", "daily at 06:00", label="A tick")
queue = JobQueue(jobs, {}, [], tz="UTC")
queue._reconcile_schedules()
row = jobs.schedules()[0]
jobs.update_schedule(row.id, kind="s_solo", label="One at a time")
declared.clear()
declare("nightly", "s_tick", "daily at 06:00", label="A tick, renamed")
queue._reconcile_schedules()
assert jobs.schedules()[0].label == "One at a time"
def test_a_declaration_that_goes_away_leaves_its_row(declared, jobs):
"""Nothing here deletes. A deploy that silently forgot a schedule somebody
was relying on is the failure this avoids; an orphan says `unknown kind`