The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): accept comma decimals in scheduled task intervals (#22158)
Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>
Victor Vogel committed
Oct 30, 2026 at 15:38 UTC
5fd36391db1b4951855505cedf0e9bb3e619e845
3 files changed
+18
-2
apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx
+2
-1
@@ -72,6 +72,7 @@ import { SettingsSection } from "./components/SettingsSection";
72
import { useSettingsEnvironmentFilter, type SettingsTarget } from "./settings-environment-filter";
73
import {
74
editDraft,
75
+ parseIntervalMinutes,
76
scheduledTaskDefaultModel,
77
scheduleFromDraft,
78
type ScheduledTaskDraft as Draft,
@@ -1127,7 +1128,7 @@ function TaskForm({
1128
setDraft({ ...draft, schedule: { ...draft.schedule, intervalMinutes } })
1129
}
1130
/>
1130
- {Number(draft.schedule.intervalMinutes) < 1 ? (
1131
+ {!(parseIntervalMinutes(draft.schedule.intervalMinutes) >= 1) ? (
1132
<Text className="px-4 pb-3 text-sm text-danger-foreground">
1133
Intervals must be at least 1 minute. Update this interval before saving.
1134
</Text>
apps/mobile/src/features/settings/scheduledTaskDraft.test.ts
+11
@@ -89,6 +89,8 @@ describe("scheduleFromDraft", () => {
89
90
it.each([
91
["1.5", 90_000],
92
+ ["2,5", 150_000],
93
+ [" 2,5 ", 150_000],
94
[String(60_001 / 60_000), 60_001],
95
])("preserves a valid %s minute interval when saving", (intervalMinutes, everyMs) => {
96
expect(scheduleFromDraft({ ...DEFAULT_SCHEDULE, mode: "interval", intervalMinutes })).toEqual({
@@ -96,6 +98,15 @@ describe("scheduleFromDraft", () => {
98
everyMs,
99
});
100
});
101
+
102
+ it.each(["0,5", "2,5,0", "Infinity", "150119987580", ""])(
103
+ "rejects invalid interval minutes: %s",
104
+ (intervalMinutes) => {
105
+ expect(
106
+ scheduleFromDraft({ ...DEFAULT_SCHEDULE, mode: "interval", intervalMinutes }),
107
+ ).toBeNull();
108
+ },
109
+ );
110
});
111
112
describe("scheduled task model defaults", () => {
apps/mobile/src/features/settings/scheduledTaskDraft.ts
+5
-1
@@ -116,6 +116,10 @@ export function scheduleDraftForTask(task: Pick<ScheduledTask, "schedule">): Sch
116
}
117
}
118
119
+export function parseIntervalMinutes(value: string): number {
120
+ return Number(value.trim().replace(",", "."));
121
+}
122
+
123
export function scheduleFromDraft(draft: ScheduleDraft): ScheduledTaskUpsertSchedule | null {
124
if (draft.mode === "webhook") {
125
const maxDeliveryAgeMinutes = parseMaxDeliveryAge(draft.maxDeliveryAgeMinutes);
@@ -163,7 +167,7 @@ export function scheduleFromDraft(draft: ScheduleDraft): ScheduledTaskUpsertSche
167
};
168
}
169
if (draft.mode === "interval") {
166
- const minutes = Number(draft.intervalMinutes);
170
+ const minutes = parseIntervalMinutes(draft.intervalMinutes);
171
const everyMs = Math.round(minutes * 60_000);
172
return minutes >= 1 && Number.isSafeInteger(everyMs) ? { type: "interval", everyMs } : null;
173
}