From 75c633681899091cede1508a57f32c868aaac5de Mon Sep 17 00:00:00 2001 From: Taylor Ho Date: Wed, 12 Aug 2026 20:40:03 -0700 Subject: [PATCH] fix(desktop): simplify monthly schedule warning Signed-off-by: Taylor Ho --- .../workflows/ui/WorkflowScheduleFields.tsx | 13 +++---------- desktop/tests/e2e/workflows.spec.ts | 4 +--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/desktop/src/features/workflows/ui/WorkflowScheduleFields.tsx b/desktop/src/features/workflows/ui/WorkflowScheduleFields.tsx index bd25daaa9..8bb0db807 100644 --- a/desktop/src/features/workflows/ui/WorkflowScheduleFields.tsx +++ b/desktop/src/features/workflows/ui/WorkflowScheduleFields.tsx @@ -28,16 +28,9 @@ const WEEKDAYS = [ const MONTH_DAYS = Array.from({ length: 31 }, (_, index) => String(index + 1)); function monthlyDayWarning(monthDay: string): string | null { - switch (monthDay) { - case "29": - return "Day 29 does not occur in February every year, so this schedule will occasionally skip a month."; - case "30": - return "Day 30 does not occur in February, so this schedule will skip February."; - case "31": - return "Day 31 does not occur in every month, so this schedule will skip shorter months."; - default: - return null; - } + return Number(monthDay) > 28 + ? "This schedule won’t run in some months." + : null; } function customCronSeed(schedule: ScheduleFormState): string { diff --git a/desktop/tests/e2e/workflows.spec.ts b/desktop/tests/e2e/workflows.spec.ts index 630859e51..580d2d699 100644 --- a/desktop/tests/e2e/workflows.spec.ts +++ b/desktop/tests/e2e/workflows.spec.ts @@ -145,9 +145,7 @@ test("configures common schedules and exposes custom cron", async ({ await inspector.getByText("Monthly", { exact: true }).click(); await inspector.getByLabel("Day of month").selectOption("31"); await expect( - inspector.getByText( - "Day 31 does not occur in every month, so this schedule will skip shorter months.", - ), + inspector.getByText("This schedule won’t run in some months."), ).toBeVisible(); await dialog.getByRole("tab", { name: "YAML" }).click(); await expect(dialog.getByLabel("Workflow YAML")).toHaveValue(