feat(scheduling): resolve the issue discovery rule per organisation

This commit is contained in:
sam committed 2026-10-27 10:38:00 +11:00
1 parent b8e080301c
commit 8150df8d81
12 files changed
+168 -35

No files matched your search

+1 -2
View File
@@ -41,7 +41,7 @@ const orgSpecs: NavSpec[] = [
},
{
label: "Automation",
paths: ["/org/schedules", "/org/playbooks"],
paths: ["/org/schedules", "/org/scheduling-policy", "/org/playbooks"],
},
],
},
@@ -59,7 +59,6 @@ const settings: NavSpec = {
"/settings/models",
"/settings/skills",
"/settings/curators",
"/settings/scheduling-policy",
],
},
{
+7 -12
View File
@@ -266,6 +266,12 @@ const routes = [
component: () => import("@/schedules/ScheduleRunsPage.vue"),
meta: { label: "Schedule runs", navPath: "/org/schedules", nav: false },
},
{
path: "scheduling-policy",
name: "org-scheduling-policy",
component: SchedulingPolicyPage,
meta: { label: "Scheduling policy", navPath: "/org", description: "Work discovery and forge labels." },
},
{
path: "playbooks",
name: "org-playbooks",
@@ -293,6 +299,7 @@ const routes = [
"/org/soul": "/org/instructions",
"/settings/schedules": "/org/schedules",
"/settings/playbooks": "/org/playbooks",
"/settings/scheduling-policy": "/org/scheduling-policy",
}).map(([path, redirect]) => ({ path, redirect, meta: { nav: false } })),
{
path: "/settings/channels",
@@ -306,18 +313,6 @@ const routes = [
section: "channels",
},
},
{
path: "/settings/scheduling-policy",
name: "settings-scheduling-policy",
component: SchedulingPolicyPage,
meta: {
navPath: "/settings",
settings: true,
label: "Scheduling policy",
description: "Work discovery and forge labels.",
section: "settings",
},
},
{
path: "/settings/tools",
name: "settings-tools",
+5 -1
View File
@@ -18,6 +18,7 @@ import {
} from "@/components/ui/number-field";
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import { Section } from "@/components/ui/section";
import { useSessionStore } from "@/stores/session";
import { resourcesForPage, useSettingsStore } from "@/stores/settings";
import DraftHint from "./DraftHint.vue";
import { fieldInvalid } from "./settings-form";
@@ -32,6 +33,9 @@ interface SchedulingPolicy {
}
const store = useSettingsStore();
// Polling and the retry cap belong to the one daemon, so only the system
// org's admin sees them.
const instance = computed(() => useSessionStore().sections?.settings !== false);
const { catalog, catalogError } = storeToRefs(store);
onMounted(store.load);
@@ -121,7 +125,7 @@ const triggers = [
</FieldGroup>
</Section>
<Section title="Retries and polling">
<Section v-if="instance" title="Retries and polling">
<FieldGroup class="@container/field-group">
<form.Field v-slot="{ field }" name="max_retries">
<Field orientation="responsive">
+1 -1
View File
@@ -62,7 +62,7 @@ export function validateSchedulingPolicy(value: unknown): FieldIssue[] {
const policy = (value ?? {}) as SchedulingDraft;
const issues: FieldIssue[] = [];
const ms = parseGoDuration(policy.poll_interval ?? "");
if (ms === null || ms <= 0)
if (policy.poll_interval && (ms === null || ms <= 0))
issues.push({
path: "poll_interval",
label: "Poll interval",