feat(ui): schedules table, runs page and Schedule trigger

Schedules list as a table with enable, run now, edit, duplicate, delete and
view runs; built-ins only enable, retime and run. The runs page links each
run's tasks through its capture's dispatches. The Start node gains a Schedule
trigger that picks or creates a schedule and binds the schedule source to the
workflow. Times show in a per-browser display zone set under Appearance; the
cron time zone and run retention are edited on the Schedules page.
This commit is contained in:
sam committed 2026-10-26 00:57:52 +11:00
1 parent 12dd3084e5
commit d4e563a19c
52 files changed
+1425 -131

No files matched your search

+20
View File
@@ -7,6 +7,7 @@ export const MOTION_KEY = "archie.motion";
export const TOOLTIPS_KEY = "archie.tooltips";
export const OVERSCROLL_KEY = "archie.overscroll";
export const PRINT_WIDTH_KEY = "archie.printWidth";
export const TIME_ZONE_KEY = "archie.timeZone";
export type Theme = "system" | "dark" | "light";
export type Density = "comfortable" | "compact";
@@ -39,6 +40,16 @@ function persist(key: string, value: string): void {
}
}
function storedZone(): string {
try {
const value = localStorage.getItem(TIME_ZONE_KEY) ?? "";
if (value) new Intl.DateTimeFormat(undefined, { timeZone: value });
return value;
} catch {
return "";
}
}
function resolveTheme(preference: Theme): ResolvedTheme {
if (preference !== "system") return preference;
try {
@@ -69,6 +80,8 @@ export const useAppearanceStore = defineStore("appearance", () => {
const printWidth = ref<PrintWidth>(
storedChoice(PRINT_WIDTH_KEY, PRINT_WIDTHS, "window"),
);
// An IANA zone times are shown in; empty follows the browser.
const timeZone = ref(storedZone());
let initialized = false;
function applyTheme(): void {
@@ -121,6 +134,11 @@ export const useAppearanceStore = defineStore("appearance", () => {
persist(PRINT_WIDTH_KEY, value);
}
function setTimeZone(value: string): void {
timeZone.value = value;
persist(TIME_ZONE_KEY, value);
}
function initialize(): void {
if (initialized) return;
initialized = true;
@@ -148,6 +166,7 @@ export const useAppearanceStore = defineStore("appearance", () => {
tooltipsEnabled,
overscroll,
printWidth,
timeZone,
initialize,
setTheme,
setDensity,
@@ -155,5 +174,6 @@ export const useAppearanceStore = defineStore("appearance", () => {
setTooltips,
setOverscroll,
setPrintWidth,
setTimeZone,
};
});
+2
View File
@@ -171,6 +171,7 @@ export type ControlPlanePage =
| "scheduling"
| "tools"
| "soul"
| "schedules"
| "plugins"
| "containers"
| "review";
@@ -184,6 +185,7 @@ const PAGE_RESOURCES: Record<ControlPlanePage, string[]> = {
scheduling: ["scheduling-policy"],
tools: ["tool-settings"],
soul: ["soul"],
schedules: ["schedule-settings"],
plugins: ["plugin-settings"],
containers: ["container-runtime-policies"],
review: ["review-settings"],