fix(desktop): simplify monthly schedule warning

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
Taylor Ho
2026-08-13 14:11:55 -07:00
parent 604b9b7390
commit 75c6336818
2 changed files with 4 additions and 13 deletions
@@ -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 {
+1 -3
View File
@@ -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(