Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

feat(web): repeat tasks from the due date picker

olozano-edb4b3635d26
diff --git a/apps/web/package.json b/apps/web/package.json
index cb1783aa1..bd85689f0 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -15,6 +15,7 @@
"dependencies": {
"@base-ui/react": "^1.8.0",
"@better-auth/api-key": "1.6.26",
+ "@date-fns/tz": "^1.4.1",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
diff --git a/apps/web/src/components/backlog-list-view/backlog-task-row.tsx b/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
index 8433d6770..b301a8694 100644
--- a/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
+++ b/apps/web/src/components/backlog-list-view/backlog-task-row.tsx
@@ -11,6 +11,7 @@ import {
import { type CSSProperties, memo, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { TaskProgressBadges } from "@/components/task/task-progress-badges";
+import { TaskRecurrenceBadge } from "@/components/task/task-recurrence-badge";
import {
AlertDialog,
AlertDialogClose,
@@ -225,6 +226,7 @@ const BacklogTaskRow = memo(function BacklogTaskRow({
</span>
<div className="flex items-center gap-1">
<TaskProgressBadges task={task} />
+ <TaskRecurrenceBadge task={task} />
{showLabels && <TaskLabels labels={task.labels ?? []} />}
</div>
</div>
diff --git a/apps/web/src/components/kanban-board/task-card.tsx b/apps/web/src/components/kanban-board/task-card.tsx
index 2e9151dff..a0eb1b18d 100644
--- a/apps/web/src/components/kanban-board/task-card.tsx
+++ b/apps/web/src/components/kanban-board/task-card.tsx
@@ -11,6 +11,7 @@ import {
import { type CSSProperties, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { TaskProgressBadges } from "@/components/task/task-progress-badges";
+import { TaskRecurrenceBadge } from "@/components/task/task-recurrence-badge";
import { TaskPullRequests } from "@/components/task/task-pull-requests";
import {
AlertDialog,
@@ -389,6 +390,7 @@ function TaskCard({
)}
<TaskProgressBadges task={task} />
+ <TaskRecurrenceBadge task={task} />
{showDueDates && task.dueDate && (
<div
diff --git a/apps/web/src/components/list-view/task-row.tsx b/apps/web/src/components/list-view/task-row.tsx
index 5da882b0f..a12d600b0 100644
--- a/apps/web/src/components/list-view/task-row.tsx
+++ b/apps/web/src/components/list-view/task-row.tsx
@@ -6,6 +6,7 @@ import { Calendar, CalendarClock, CalendarX } from "lucide-react";
import { type CSSProperties, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { TaskProgressBadges } from "@/components/task/task-progress-badges";
+import { TaskRecurrenceBadge } from "@/components/task/task-recurrence-badge";
import { TaskPullRequests } from "@/components/task/task-pull-requests";
import {
AlertDialog,
@@ -194,6 +195,7 @@ function TaskRow({ task, projectSlug }: TaskRowProps) {
</span>
<div className="flex items-center gap-1">
<TaskProgressBadges task={task} />
+ <TaskRecurrenceBadge task={task} />
{showLabels && <TaskLabels labels={task.labels ?? []} />}
<TaskPullRequests
diff --git a/apps/web/src/components/task/task-due-date-popover.tsx b/apps/web/src/components/task/task-due-date-popover.tsx
index e87ad51e7..fd2259772 100644
--- a/apps/web/src/components/task/task-due-date-popover.tsx
+++ b/apps/web/src/components/task/task-due-date-popover.tsx
@@ -1,5 +1,5 @@
-import { X } from "lucide-react";
-import { useState } from "react";
+import { Repeat, X } from "lucide-react";
+import { useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
@@ -9,9 +9,14 @@ import {
PopoverTrigger,
} from "@/components/ui/popover";
import { useUpdateTaskDueDate } from "@/hooks/mutations/task/use-update-task-due-date";
+import { useUpdateTaskRecurrence } from "@/hooks/mutations/task/use-update-task-recurrence";
import { useWorkspacePermission } from "@/hooks/use-workspace-permission";
+import { cn } from "@/lib/cn";
+import { upcomingOccurrences } from "@/lib/next-occurrence-date";
import { toast } from "@/lib/toast";
import type Task from "@/types/task";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+import TaskRecurrenceSettings from "./task-recurrence-settings";
type TaskDueDatePopoverProps = {
task: Task;
@@ -25,8 +30,19 @@ export default function TaskDueDatePopover({
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const { mutateAsync: updateTaskDueDate } = useUpdateTaskDueDate();
+ const { mutateAsync: updateTaskRecurrence } = useUpdateTaskRecurrence();
const { canUpdateTasks } = useWorkspacePermission();
const canEdit = canUpdateTasks();
+ const recurrence = task.recurrence ?? null;
+ const dueDate = useMemo(
+ () => (task.dueDate ? new Date(task.dueDate) : undefined),
+ [task.dueDate],
+ );
+ const upcoming = useMemo(
+ () =>
+ dueDate && recurrence ? upcomingOccurrences(dueDate, recurrence, 8) : [],
+ [dueDate, recurrence],
+ );
const handleDateChange = async (date: Date | undefined) => {
try {
@@ -35,7 +51,8 @@ export default function TaskDueDatePopover({
dueDate: date?.toISOString() || null,
});
toast.success(t("tasks:popover.dueDate.updateSuccess"));
- setOpen(false);
+ // Keep a repeating task's picker open to show its upcoming dates.
+ if (!recurrence) setOpen(false);
} catch (error) {
toast.error(
error instanceof Error
@@ -45,34 +62,88 @@ export default function TaskDueDatePopover({
}
};
+ const handleRecurrenceChange = async (next: TaskRecurrence | null) => {
+ try {
+ await updateTaskRecurrence({ task, recurrence: next });
+ } catch (error) {
+ toast.error(
+ error instanceof Error
+ ? error.message
+ : t("tasks:popover.recurrence.updateError"),
+ );
+ }
+ };
+
+ const toggleRepeat = () =>
+ handleRecurrenceChange(
+ recurrence
+ ? null
+ : {
+ frequency: "weekly",
+ interval: 1,
+ weekdays: [(dueDate ?? new Date()).getDay()],
+ // Keeps the next due date on the same local day across DST changes.
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC",
+ },
+ );
+
if (!canEdit) return <>{children}</>;
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>{children}</PopoverTrigger>
- <PopoverContent className="p-0" align="start">
+ <PopoverContent className="w-72 p-0" align="start">
<Calendar
mode="single"
- selected={task.dueDate ? new Date(task.dueDate) : undefined}
+ selected={dueDate}
+ defaultMonth={dueDate}
onSelect={handleDateChange}
disabled={
task.startDate ? { before: new Date(task.startDate) } : undefined
}
+ modifiers={{ repeats: upcoming }}
+ modifiersClassNames={{
+ repeats:
+ "[&>button]:bg-primary/12 [&>button]:font-medium [&>button]:text-primary",
+ }}
className="w-full bg-popover"
/>
- {task.dueDate && (
- <div className="pt-2 border-t border-border">
+ {recurrence && (
+ <TaskRecurrenceSettings
+ recurrence={recurrence}
+ defaultWeekday={(dueDate ?? new Date()).getDay()}
+ onChange={handleRecurrenceChange}
+ />
+ )}
+ <div className="flex items-center justify-between border-t border-border p-1.5">
+ <Button
+ variant="ghost"
+ size="sm"
+ aria-pressed={Boolean(recurrence)}
+ className={cn(
+ "gap-2 text-muted-foreground hover:text-foreground",
+ recurrence && "bg-accent text-foreground",
+ )}
+ onClick={toggleRepeat}
+ >
+ <Repeat className="h-4 w-4" />
+ {t("tasks:popover.recurrence.toggle")}
+ </Button>
+ {task.dueDate && (
<Button
variant="ghost"
size="sm"
- className="w-full justify-start gap-2 text-muted-foreground hover:text-foreground"
- onClick={() => handleDateChange(undefined)}
+ className="gap-2 text-muted-foreground hover:text-foreground"
+ onClick={() => {
+ setOpen(false);
+ void handleDateChange(undefined);
+ }}
>
<X className="h-4 w-4" />
{t("tasks:popover.dueDate.clear")}
</Button>
- </div>
- )}
+ )}
+ </div>
</PopoverContent>
</Popover>
);
diff --git a/apps/web/src/components/task/task-properties-sidebar.tsx b/apps/web/src/components/task/task-properties-sidebar.tsx
index db9898256..14bd8bfdd 100644
--- a/apps/web/src/components/task/task-properties-sidebar.tsx
+++ b/apps/web/src/components/task/task-properties-sidebar.tsx
@@ -40,6 +40,7 @@ import TaskAssigneePopover from "./task-assignee-popover";
import TaskDueDatePopover from "./task-due-date-popover";
import TaskLabelsPopover from "./task-labels-popover";
import TaskPriorityPopover from "./task-priority-popover";
+import { TaskRecurrenceBadge } from "./task-recurrence-badge";
import TaskStartDatePopover from "./task-start-date-popover";
import TaskStatusPopover from "./task-status-popover";
@@ -303,6 +304,7 @@ export default function TaskPropertiesSidebar({
</span>
</>
)}
+ <TaskRecurrenceBadge task={task} asText />
</Button>
</TaskDueDatePopover>
)}
@@ -452,6 +454,7 @@ export default function TaskPropertiesSidebar({
</span>
</>
)}
+ <TaskRecurrenceBadge task={task} asText />
</Button>
</TaskDueDatePopover>
)}
@@ -601,6 +604,7 @@ export default function TaskPropertiesSidebar({
</span>
</>
)}
+ <TaskRecurrenceBadge task={task} asText />
</Button>
</TaskDueDatePopover>
)}
diff --git a/apps/web/src/components/task/task-recurrence-badge.tsx b/apps/web/src/components/task/task-recurrence-badge.tsx
new file mode 100644
index 000000000..af70b349c
--- /dev/null
+++ b/apps/web/src/components/task/task-recurrence-badge.tsx
@@ -0,0 +1,38 @@
+import { Repeat } from "lucide-react";
+import { useTranslation } from "react-i18next";
+import { Tooltip, TooltipPopup, TooltipTrigger } from "@/components/ui/tooltip";
+import { formatRecurrence } from "@/lib/format-recurrence";
+import type Task from "@/types/task";
+
+export function TaskRecurrenceBadge({
+ task,
+ asText = false,
+}: {
+ task: Pick<Task, "recurrence">;
+ asText?: boolean;
+}) {
+ const { t, i18n } = useTranslation();
+ if (!task.recurrence) return null;
+ const label = formatRecurrence(t, task.recurrence, i18n.language);
+ const className =
+ "inline-flex shrink-0 cursor-inherit items-center text-muted-foreground";
+
+ // Inside another button, such as the due date trigger, stay plain text.
+ if (asText) {
+ return (
+ <span className={className} title={label}>
+ <Repeat className="size-3" aria-hidden="true" />
+ <span className="sr-only">{label}</span>
+ </span>
+ );
+ }
+
+ return (
+ <Tooltip>
+ <TooltipTrigger aria-label={label} className={className}>
+ <Repeat className="size-3" aria-hidden="true" />
+ </TooltipTrigger>
+ <TooltipPopup>{label}</TooltipPopup>
+ </Tooltip>
+ );
+}
diff --git a/apps/web/src/components/task/task-recurrence-settings.tsx b/apps/web/src/components/task/task-recurrence-settings.tsx
new file mode 100644
index 000000000..681787fda
--- /dev/null
+++ b/apps/web/src/components/task/task-recurrence-settings.tsx
@@ -0,0 +1,175 @@
+import { useTranslation } from "react-i18next";
+import {
+ NumberField,
+ NumberFieldGroup,
+ NumberFieldInput,
+} from "@/components/ui/number-field";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+import WeekdayPicker from "./weekday-picker";
+
+type Frequency = TaskRecurrence["frequency"];
+type Pattern = Frequency | "periodically";
+
+const PATTERNS: Pattern[] = [
+ "daily",
+ "weekly",
+ "monthly",
+ "yearly",
+ "periodically",
+];
+const FREQUENCIES: Frequency[] = ["daily", "weekly", "monthly", "yearly"];
+
+// Weekdays only belong to weekly rules; a new weekly rule starts on the due
+// date's weekday.
+function withFrequency(
+ recurrence: TaskRecurrence,
+ frequency: Frequency,
+ interval: number,
+ defaultWeekday: number,
+): TaskRecurrence {
+ const { weekdays, ...rule } = recurrence;
+ return frequency === "weekly"
+ ? { ...rule, frequency, interval, weekdays: weekdays ?? [defaultWeekday] }
+ : { ...rule, frequency, interval };
+}
+
+export default function TaskRecurrenceSettings({
+ recurrence,
+ defaultWeekday,
+ onChange,
+}: {
+ recurrence: TaskRecurrence;
+ defaultWeekday: number;
+ onChange: (recurrence: TaskRecurrence) => void;
+}) {
+ const { t } = useTranslation();
+ const pattern: Pattern =
+ recurrence.interval > 1 ? "periodically" : recurrence.frequency;
+ const patternLabels: Record<Pattern, string> = {
+ daily: t("tasks:popover.recurrence.pattern.daily"),
+ weekly: t("tasks:popover.recurrence.pattern.weekly"),
+ monthly: t("tasks:popover.recurrence.pattern.monthly"),
+ yearly: t("tasks:popover.recurrence.pattern.yearly"),
+ periodically: t("tasks:popover.recurrence.pattern.periodically"),
+ };
+ const unitLabel = (frequency: Frequency) => {
+ const count = recurrence.interval;
+ switch (frequency) {
+ case "daily":
+ return t("tasks:popover.recurrence.unit.days", { count });
+ case "weekly":
+ return t("tasks:popover.recurrence.unit.weeks", { count });
+ case "monthly":
+ return t("tasks:popover.recurrence.unit.months", { count });
+ case "yearly":
+ return t("tasks:popover.recurrence.unit.years", { count });
+ }
+ };
+
+ const change = (frequency: Frequency, interval: number) =>
+ onChange(withFrequency(recurrence, frequency, interval, defaultWeekday));
+
+ return (
+ <div className="flex flex-col gap-3 border-t border-border p-3">
+ <div className="flex items-center justify-between gap-2">
+ <span className="text-xs text-muted-foreground">
+ {t("tasks:popover.recurrence.repeats")}
+ </span>
+ <Select
+ value={pattern}
+ onValueChange={(value) => {
+ if (value === "periodically")
+ change(recurrence.frequency, Math.max(2, recurrence.interval));
+ else if (value) change(value as Frequency, 1);
+ }}
+ >
+ <SelectTrigger
+ size="sm"
+ className="w-36 min-w-0"
+ aria-label={t("tasks:popover.recurrence.repeats")}
+ >
+ <SelectValue>{patternLabels[pattern]}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ {PATTERNS.map((option) => (
+ <SelectItem key={option} value={option}>
+ {patternLabels[option]}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+
+ {pattern === "periodically" && (
+ <div className="flex items-center gap-2">
+ <span className="text-xs text-muted-foreground">
+ {t("tasks:popover.recurrence.every")}
+ </span>
+ <NumberField
+ key={recurrence.interval}
+ size="sm"
+ className="w-16"
+ min={2}
+ max={99}
+ step={1}
+ defaultValue={recurrence.interval}
+ onValueCommitted={(value) => {
+ if (value && value !== recurrence.interval)
+ change(recurrence.frequency, value);
+ }}
+ >
+ <NumberFieldGroup>
+ <NumberFieldInput
+ aria-label={t("tasks:popover.recurrence.interval")}
+ />
+ </NumberFieldGroup>
+ </NumberField>
+ <Select
+ value={recurrence.frequency}
+ onValueChange={(value) => {
+ if (value) change(value as Frequency, recurrence.interval);
+ }}
+ >
+ <SelectTrigger
+ size="sm"
+ className="min-w-0 flex-1"
+ aria-label={t("tasks:popover.recurrence.unit.label")}
+ >
+ <SelectValue>{unitLabel(recurrence.frequency)}</SelectValue>
+ </SelectTrigger>
+ <SelectContent>
+ {FREQUENCIES.map((frequency) => (
+ <SelectItem key={frequency} value={frequency}>
+ {unitLabel(frequency)}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
+ )}
+
+ {recurrence.frequency === "weekly" && (
+ <div className="flex flex-col gap-1.5">
+ <span className="text-xs text-muted-foreground">
+ {t("tasks:popover.recurrence.onDays")}
+ </span>
+ <WeekdayPicker
+ value={recurrence.weekdays ?? [defaultWeekday]}
+ onChange={(weekdays) => onChange({ ...recurrence, weekdays })}
+ />
+ </div>
+ )}
+
+ <p className="text-xs text-muted-foreground">
+ {t("tasks:popover.recurrence.hint")}
+ </p>
+ </div>
+ );
+}
diff --git a/apps/web/src/components/task/weekday-picker.tsx b/apps/web/src/components/task/weekday-picker.tsx
new file mode 100644
index 000000000..6b99a1a94
--- /dev/null
+++ b/apps/web/src/components/task/weekday-picker.tsx
@@ -0,0 +1,46 @@
+import { useTranslation } from "react-i18next";
+import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
+import { formatWeekday } from "@/lib/format-recurrence";
+import { useUserPreferencesStore } from "@/store/user-preferences";
+
+export default function WeekdayPicker({
+ value,
+ onChange,
+}: {
+ value: number[];
+ onChange: (weekdays: number[]) => void;
+}) {
+ const { t, i18n } = useTranslation();
+ const weekStartsOn = useUserPreferencesStore((state) => state.weekStartsOn);
+ const days = Array.from(
+ { length: 7 },
+ (_, index) => (weekStartsOn + index) % 7,
+ );
+
+ return (
+ <ToggleGroup
+ multiple
+ variant="outline"
+ size="sm"
+ aria-label={t("tasks:popover.recurrence.onDays")}
+ className="w-full justify-between"
+ value={value.map(String)}
+ onValueChange={(selected) => {
+ // A weekly rule needs at least one day.
+ if (selected.length > 0)
+ onChange(selected.map(Number).sort((a, b) => a - b));
+ }}
+ >
+ {days.map((day) => (
+ <ToggleGroupItem
+ key={day}
+ value={String(day)}
+ aria-label={formatWeekday(day, i18n.language)}
+ className="flex-1 text-xs data-pressed:bg-primary data-pressed:text-primary-foreground dark:data-pressed:bg-primary"
+ >
+ {formatWeekday(day, i18n.language, "narrow")}
+ </ToggleGroupItem>
+ ))}
+ </ToggleGroup>
+ );
+}
diff --git a/apps/web/src/fetchers/task/update-task-recurrence.ts b/apps/web/src/fetchers/task/update-task-recurrence.ts
new file mode 100644
index 000000000..2dae852a0
--- /dev/null
+++ b/apps/web/src/fetchers/task/update-task-recurrence.ts
@@ -0,0 +1,21 @@
+import { client } from "@kaneo/libs";
+import { HttpError } from "@/lib/http-error";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+
+async function updateTaskRecurrence(
+ taskId: string,
+ recurrence: TaskRecurrence | null,
+) {
+ const response = await client.task.recurrence[":id"].$put({
+ param: { id: taskId },
+ json: { recurrence },
+ });
+
+ if (!response.ok) {
+ throw new HttpError(response.status, await response.text());
+ }
+
+ return response.json();
+}
+
+export default updateTaskRecurrence;
diff --git a/apps/web/src/hooks/mutations/task/use-update-task-recurrence.ts b/apps/web/src/hooks/mutations/task/use-update-task-recurrence.ts
new file mode 100644
index 000000000..3ba48f6c5
--- /dev/null
+++ b/apps/web/src/hooks/mutations/task/use-update-task-recurrence.ts
@@ -0,0 +1,49 @@
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import updateTaskRecurrence from "@/fetchers/task/update-task-recurrence";
+import {
+ getBoardCacheVersion,
+ markBoardCacheChanged,
+} from "@/lib/board-cache-version";
+import { updateBoardTaskCache } from "@/lib/update-board-task-cache";
+import type Task from "@/types/task";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+
+type Variables = { task: Task; recurrence: TaskRecurrence | null };
+
+export function useUpdateTaskRecurrence() {
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: ({ task, recurrence }: Variables) =>
+ updateTaskRecurrence(task.id, recurrence),
+ // The picker edits the rule in place, so it shows each change right away.
+ onMutate: async ({ task, recurrence }: Variables) => {
+ markBoardCacheChanged(queryClient, task.projectId, task.id);
+ const queryKey = ["task", task.id];
+ await queryClient.cancelQueries({ queryKey });
+ const previous = queryClient.getQueryData(queryKey);
+ queryClient.setQueryData<Task>(queryKey, (current) =>
+ current ? { ...current, recurrence } : current,
+ );
+ return {
+ previous,
+ version: getBoardCacheVersion(queryClient, task.projectId, task.id),
+ };
+ },
+ onError: (_error, { task }, context) => {
+ queryClient.setQueryData(["task", task.id], context?.previous);
+ },
+ onSuccess: (updated, { task }, context) => {
+ updateBoardTaskCache(
+ queryClient,
+ task.projectId,
+ task.id,
+ { recurrence: updated.recurrence ?? null },
+ context?.version,
+ );
+ },
+ onSettled: (_data, _error, { task }) => {
+ queryClient.invalidateQueries({ queryKey: ["task", task.id] });
+ },
+ });
+}
diff --git a/apps/web/src/lib/format-recurrence.test.ts b/apps/web/src/lib/format-recurrence.test.ts
new file mode 100644
index 000000000..9eea5dd77
--- /dev/null
+++ b/apps/web/src/lib/format-recurrence.test.ts
@@ -0,0 +1,37 @@
+import type { TFunction } from "i18next";
+import { describe, expect, it } from "vite-plus/test";
+import { formatRecurrence, formatWeekday } from "./format-recurrence";
+
+const t = ((key: string, options: Record<string, unknown>) =>
+ `${key}:${JSON.stringify(options)}`) as unknown as TFunction;
+
+describe("formatRecurrence", () => {
+ it("uses the frequency's plural key with the interval as count", () => {
+ expect(
+ formatRecurrence(t, { frequency: "monthly", interval: 3 }, "en-US"),
+ ).toBe('tasks:recurrence.monthly:{"count":3}');
+ });
+
+ it("names the weekdays of weekly rules, Monday first", () => {
+ expect(
+ formatRecurrence(
+ t,
+ { frequency: "weekly", interval: 2, weekdays: [5, 0, 1] },
+ "en-US",
+ ),
+ ).toBe(
+ `tasks:recurrence.onDays:${JSON.stringify({
+ rule: 'tasks:recurrence.weekly:{"count":2}',
+ days: "Monday, Friday, and Sunday",
+ })}`,
+ );
+ });
+});
+
+describe("formatWeekday", () => {
+ it("formats weekday numbers starting from Sunday", () => {
+ expect(formatWeekday(0, "en-US")).toBe("Sunday");
+ expect(formatWeekday(5, "en-US", "narrow")).toBe("F");
+ expect(formatWeekday(1, "es-ES", "short")).toBe("lun");
+ });
+});
diff --git a/apps/web/src/lib/format-recurrence.ts b/apps/web/src/lib/format-recurrence.ts
new file mode 100644
index 000000000..c494c65d6
--- /dev/null
+++ b/apps/web/src/lib/format-recurrence.ts
@@ -0,0 +1,50 @@
+import type { TFunction } from "i18next";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+
+// 2026-10-04 is a Sunday, so adding a weekday number gives that weekday.
+const SUNDAY = Date.UTC(2026, 9, 4);
+
+export function formatWeekday(
+ day: number,
+ locale: string,
+ width: "long" | "short" | "narrow" = "long",
+) {
+ return new Intl.DateTimeFormat(locale, {
+ weekday: width,
+ timeZone: "UTC",
+ }).format(new Date(SUNDAY + day * 86_400_000));
+}
+
+function formatInterval(
+ t: TFunction,
+ { frequency, interval }: Pick<TaskRecurrence, "frequency" | "interval">,
+) {
+ switch (frequency) {
+ case "daily":
+ return t("tasks:recurrence.daily", { count: interval });
+ case "weekly":
+ return t("tasks:recurrence.weekly", { count: interval });
+ case "monthly":
+ return t("tasks:recurrence.monthly", { count: interval });
+ case "yearly":
+ return t("tasks:recurrence.yearly", { count: interval });
+ }
+}
+
+export function formatRecurrence(
+ t: TFunction,
+ recurrence: Pick<TaskRecurrence, "frequency" | "interval" | "weekdays">,
+ locale: string,
+) {
+ const rule = formatInterval(t, recurrence);
+ if (recurrence.frequency !== "weekly" || !recurrence.weekdays?.length)
+ return rule;
+
+ const days = [...recurrence.weekdays]
+ .sort((a, b) => ((a + 6) % 7) - ((b + 6) % 7))
+ .map((day) => formatWeekday(day, locale));
+ return t("tasks:recurrence.onDays", {
+ rule,
+ days: new Intl.ListFormat(locale, { type: "conjunction" }).format(days),
+ });
+}
diff --git a/apps/web/src/lib/next-occurrence-date.test.ts b/apps/web/src/lib/next-occurrence-date.test.ts
new file mode 100644
index 000000000..1a126d693
--- /dev/null
+++ b/apps/web/src/lib/next-occurrence-date.test.ts
@@ -0,0 +1,40 @@
+import { describe, expect, it } from "vite-plus/test";
+import { upcomingOccurrences } from "./next-occurrence-date";
+
+const iso = (dates: Date[]) => dates.map((date) => date.toISOString());
+
+describe("upcomingOccurrences", () => {
+ it("lists the next dates of a rule", () => {
+ expect(
+ iso(
+ upcomingOccurrences(
+ new Date("2026-01-31T00:00:00.000Z"),
+ { frequency: "monthly", interval: 1, timeZone: "UTC" },
+ 2,
+ ),
+ ),
+ ).toEqual(["2026-02-28T00:00:00.000Z", "2026-03-28T00:00:00.000Z"]);
+ });
+
+ it("follows the selected weekdays and skips weeks by the interval", () => {
+ // 2026-10-05 is a Monday.
+ expect(
+ iso(
+ upcomingOccurrences(
+ new Date("2026-10-05T00:00:00.000Z"),
+ {
+ frequency: "weekly",
+ interval: 2,
+ timeZone: "UTC",
+ weekdays: [1, 5],
+ },
+ 3,
+ ),
+ ),
+ ).toEqual([
+ "2026-10-09T00:00:00.000Z",
+ "2026-10-19T00:00:00.000Z",
+ "2026-10-23T00:00:00.000Z",
+ ]);
+ });
+});
diff --git a/apps/web/src/lib/next-occurrence-date.ts b/apps/web/src/lib/next-occurrence-date.ts
new file mode 100644
index 000000000..5fe465b99
--- /dev/null
+++ b/apps/web/src/lib/next-occurrence-date.ts
@@ -0,0 +1,45 @@
+import { TZDate } from "@date-fns/tz";
+import { addDays, addMonths, addWeeks, addYears } from "date-fns";
+import type { TaskRecurrence } from "@/types/task/recurrence";
+
+// Mirrors apps/api/src/task/recurrence/next-occurrence-date.ts so the date
+// picker previews the dates the API will actually use.
+
+const advance = {
+ daily: addDays,
+ weekly: addWeeks,
+ monthly: addMonths,
+ yearly: addYears,
+};
+
+function nextWeekday(date: TZDate, interval: number, weekdays: number[]) {
+ const fromMonday = (day: number) => (day + 6) % 7;
+ const days = weekdays.map(fromMonday).sort((a, b) => a - b);
+ const today = fromMonday(date.getDay());
+ const later = days.find((day) => day > today);
+ if (later !== undefined) return addDays(date, later - today);
+ return addDays(addWeeks(date, interval), (days[0] ?? today) - today);
+}
+
+export function nextOccurrenceDate(date: Date, recurrence: TaskRecurrence) {
+ const zoned = new TZDate(date.getTime(), recurrence.timeZone);
+ const next =
+ recurrence.frequency === "weekly" && recurrence.weekdays?.length
+ ? nextWeekday(zoned, recurrence.interval, recurrence.weekdays)
+ : advance[recurrence.frequency](zoned, recurrence.interval);
+ return new Date(next.getTime());
+}
+
+export function upcomingOccurrences(
+ dueDate: Date,
+ recurrence: TaskRecurrence,
+ count: number,
+) {
+ const dates: Date[] = [];
+ let date = dueDate;
+ for (let index = 0; index < count; index += 1) {
+ date = nextOccurrenceDate(date, recurrence);
+ dates.push(date);
+ }
+ return dates;
+}
diff --git a/apps/web/src/types/task/index.ts b/apps/web/src/types/task/index.ts
index 2bcdaa526..f2ced8be9 100644
--- a/apps/web/src/types/task/index.ts
+++ b/apps/web/src/types/task/index.ts
@@ -1,3 +1,5 @@
+import type { TaskRecurrence } from "./recurrence";
+
type TaskLabel = {
id: string;
name: string;
@@ -30,6 +32,7 @@ type Task = {
priority: string | null;
startDate: string | null;
dueDate: string | null;
+ recurrence?: TaskRecurrence | null;
position: number | null;
createdAt: string;
updatedAt?: string;
diff --git a/apps/web/src/types/task/recurrence.ts b/apps/web/src/types/task/recurrence.ts
new file mode 100644
index 000000000..10a363d3c
--- /dev/null
+++ b/apps/web/src/types/task/recurrence.ts
@@ -0,0 +1,7 @@
+export type TaskRecurrence = {
+ frequency: "daily" | "weekly" | "monthly" | "yearly";
+ interval: number;
+ timeZone: string;
+ // 0 for Sunday to 6 for Saturday; weekly rules only.
+ weekdays?: number[];
+};
diff --git a/i18n/az-AZ.json b/i18n/az-AZ.json
index 8f52204ca..f3a2e80cb 100644
--- a/i18n/az-AZ.json
+++ b/i18n/az-AZ.json
@@ -2492,6 +2492,33 @@
"rose": "Çəhrayı",
"crimson": "Tünd qırmızı"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/de-DE.json b/i18n/de-DE.json
index cdf0b9df3..2f584804c 100644
--- a/i18n/de-DE.json
+++ b/i18n/de-DE.json
@@ -2492,6 +2492,33 @@
"rose": "Rosa",
"crimson": "Karmesinrot"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Die Reihenfolge konnte nicht gespeichert werden."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/el-GR.json b/i18n/el-GR.json
index 8861fbfa6..a91604796 100644
--- a/i18n/el-GR.json
+++ b/i18n/el-GR.json
@@ -2492,6 +2492,33 @@
"rose": "Ροζ",
"crimson": "Βυσσινί"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/en-US.json b/i18n/en-US.json
index 237784719..b0807de15 100644
--- a/i18n/en-US.json
+++ b/i18n/en-US.json
@@ -2467,6 +2467,33 @@
"updateError": "Failed to update task due date",
"clear": "Clear date"
},
+ "recurrence": {
+ "toggle": "Repeat",
+ "repeats": "Repeats",
+ "pattern": {
+ "daily": "Daily",
+ "weekly": "Weekly",
+ "monthly": "Monthly",
+ "yearly": "Yearly",
+ "periodically": "Periodically"
+ },
+ "every": "Every",
+ "interval": "Interval",
+ "unit": {
+ "label": "Unit",
+ "days_one": "day",
+ "days_other": "days",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "months_one": "month",
+ "months_other": "months",
+ "years_one": "year",
+ "years_other": "years"
+ },
+ "onDays": "On these days",
+ "hint": "When this task is done, the next one is created.",
+ "updateError": "Failed to update task repeat"
+ },
"startDate": {
"updateSuccess": "Task start date updated successfully",
"updateError": "Failed to update task start date",
@@ -2637,6 +2664,17 @@
"clearSuccess": "Task due date cleared",
"clearError": "Failed to clear due date"
},
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
+ },
"labels": {
"label": "Labels",
"empty": "No labels available"
diff --git a/i18n/es-ES.json b/i18n/es-ES.json
index eb519be04..29e923ebf 100644
--- a/i18n/es-ES.json
+++ b/i18n/es-ES.json
@@ -2467,6 +2467,37 @@
"updateError": "Error al actualizar la fehca de vencimiento de la tarea",
"clear": "Eliminar fecha"
},
+ "recurrence": {
+ "toggle": "Repetir",
+ "repeats": "Se repite",
+ "pattern": {
+ "daily": "Diariamente",
+ "weekly": "Semanalmente",
+ "monthly": "Mensualmente",
+ "yearly": "Anualmente",
+ "periodically": "Periódicamente"
+ },
+ "every": "Cada",
+ "interval": "Intervalo",
+ "unit": {
+ "label": "Unidad",
+ "days_many": "días",
+ "days_one": "día",
+ "days_other": "días",
+ "weeks_many": "semanas",
+ "weeks_one": "semana",
+ "weeks_other": "semanas",
+ "months_many": "meses",
+ "months_one": "mes",
+ "months_other": "meses",
+ "years_many": "años",
+ "years_one": "año",
+ "years_other": "años"
+ },
+ "onDays": "Estos días",
+ "hint": "Al completar esta tarea, se crea la siguiente.",
+ "updateError": "No se pudo actualizar la repetición de la tarea"
+ },
"startDate": {
"updateSuccess": "La fecha de inicio de la tarea se ha actualizado correctamente",
"updateError": "Error al actualizar la fecha de inicio de la tarea",
@@ -2625,6 +2656,21 @@
"clearSuccess": "Fecha de vencimiento eliminada correctamente",
"clearError": "Error al eliminar fecha de vencimiento"
},
+ "recurrence": {
+ "daily_many": "Cada {{count}} días",
+ "daily_one": "Cada día",
+ "daily_other": "Cada {{count}} días",
+ "weekly_many": "Cada {{count}} semanas",
+ "weekly_one": "Cada semana",
+ "weekly_other": "Cada {{count}} semanas",
+ "monthly_many": "Cada {{count}} meses",
+ "monthly_one": "Cada mes",
+ "monthly_other": "Cada {{count}} meses",
+ "yearly_many": "Cada {{count}} años",
+ "yearly_one": "Cada año",
+ "yearly_other": "Cada {{count}} años",
+ "onDays": "{{rule}}: {{days}}"
+ },
"labels": {
"label": "Etiquetas",
"empty": "No hay etiquetas disponibles"
diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json
index 7e21d203f..3c23dd1cd 100644
--- a/i18n/fr-FR.json
+++ b/i18n/fr-FR.json
@@ -2504,6 +2504,37 @@
"rose": "Rose",
"crimson": "Cramoisi"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2721,6 +2752,21 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/hi-IN.json b/i18n/hi-IN.json
index e42ac0fe9..92f09693b 100644
--- a/i18n/hi-IN.json
+++ b/i18n/hi-IN.json
@@ -2492,6 +2492,33 @@
"rose": "गुलाब",
"crimson": "किरमिज़ी"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/id-ID.json b/i18n/id-ID.json
index 580c0664a..8bc8d2c0e 100644
--- a/i18n/id-ID.json
+++ b/i18n/id-ID.json
@@ -2480,6 +2480,29 @@
"rose": "Rose",
"crimson": "Crimson"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/it-IT.json b/i18n/it-IT.json
index 8f8223a9e..dc7d82110 100644
--- a/i18n/it-IT.json
+++ b/i18n/it-IT.json
@@ -2504,6 +2504,37 @@
"rose": "Rosa",
"crimson": "Cremisi"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2721,6 +2752,21 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json
index 6a1b8e5b8..cd2233509 100644
--- a/i18n/ja-JP.json
+++ b/i18n/ja-JP.json
@@ -2480,6 +2480,29 @@
"rose": "ローズ",
"crimson": "クリムゾン"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/ko-KR.json b/i18n/ko-KR.json
index 1976eef69..45cb62e10 100644
--- a/i18n/ko-KR.json
+++ b/i18n/ko-KR.json
@@ -2480,6 +2480,29 @@
"rose": "로즈",
"crimson": "크림슨"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/mk-MK.json b/i18n/mk-MK.json
index 691704c6a..309898f91 100644
--- a/i18n/mk-MK.json
+++ b/i18n/mk-MK.json
@@ -2492,6 +2492,33 @@
"rose": "Роза",
"crimson": "Гримизна"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/nl-NL.json b/i18n/nl-NL.json
index bf7ce9260..1d258bdea 100644
--- a/i18n/nl-NL.json
+++ b/i18n/nl-NL.json
@@ -2481,6 +2481,33 @@
"rose": "Roos",
"crimson": "Karmozijn"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/pl-PL.json b/i18n/pl-PL.json
index 4d2041386..978ca99df 100644
--- a/i18n/pl-PL.json
+++ b/i18n/pl-PL.json
@@ -2866,6 +2866,41 @@
},
"status": {
"updateError": "Nie udało się zaktualizować statusu zadania"
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_few": "days",
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_few": "months",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_few": "weeks",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_few": "years",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"pr": {
@@ -2978,6 +3013,25 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_few": "Every {{count}} days",
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_few": "Every {{count}} months",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_few": "Every {{count}} weeks",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_few": "Every {{count}} years",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"press": {
diff --git a/i18n/pt-BR.json b/i18n/pt-BR.json
index 07ca30164..9ace4f11e 100644
--- a/i18n/pt-BR.json
+++ b/i18n/pt-BR.json
@@ -2504,6 +2504,37 @@
"rose": "Rosa",
"crimson": "Carmesim"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2721,6 +2752,21 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/ru-RU.json b/i18n/ru-RU.json
index c0809e912..c1cc2dabb 100644
--- a/i18n/ru-RU.json
+++ b/i18n/ru-RU.json
@@ -2524,6 +2524,41 @@
"rose": "Роза",
"crimson": "Малиновый"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_few": "days",
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_few": "months",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_few": "weeks",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_few": "years",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2790,6 +2825,25 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_few": "Every {{count}} days",
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_few": "Every {{count}} months",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_few": "Every {{count}} weeks",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_few": "Every {{count}} years",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/schema.json b/i18n/schema.json
index c41a6d4a3..f6eef263a 100644
--- a/i18n/schema.json
+++ b/i18n/schema.json
@@ -9952,6 +9952,154 @@
},
"required": ["updateSuccess", "updateError", "clear"]
},
+ "recurrence": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "toggle": {
+ "type": "string"
+ },
+ "repeats": {
+ "type": "string"
+ },
+ "pattern": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "daily": {
+ "type": "string"
+ },
+ "weekly": {
+ "type": "string"
+ },
+ "monthly": {
+ "type": "string"
+ },
+ "yearly": {
+ "type": "string"
+ },
+ "periodically": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "daily",
+ "weekly",
+ "monthly",
+ "yearly",
+ "periodically"
+ ]
+ },
+ "every": {
+ "type": "string"
+ },
+ "interval": {
+ "type": "string"
+ },
+ "unit": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "days_one": {
+ "type": "string"
+ },
+ "days_zero": {
+ "type": "string"
+ },
+ "days_two": {
+ "type": "string"
+ },
+ "days_few": {
+ "type": "string"
+ },
+ "days_many": {
+ "type": "string"
+ },
+ "days_other": {
+ "type": "string"
+ },
+ "weeks_one": {
+ "type": "string"
+ },
+ "weeks_zero": {
+ "type": "string"
+ },
+ "weeks_two": {
+ "type": "string"
+ },
+ "weeks_few": {
+ "type": "string"
+ },
+ "weeks_many": {
+ "type": "string"
+ },
+ "weeks_other": {
+ "type": "string"
+ },
+ "months_one": {
+ "type": "string"
+ },
+ "months_zero": {
+ "type": "string"
+ },
+ "months_two": {
+ "type": "string"
+ },
+ "months_few": {
+ "type": "string"
+ },
+ "months_many": {
+ "type": "string"
+ },
+ "months_other": {
+ "type": "string"
+ },
+ "years_one": {
+ "type": "string"
+ },
+ "years_zero": {
+ "type": "string"
+ },
+ "years_two": {
+ "type": "string"
+ },
+ "years_few": {
+ "type": "string"
+ },
+ "years_many": {
+ "type": "string"
+ },
+ "years_other": {
+ "type": "string"
+ }
+ },
+ "required": ["label"]
+ },
+ "onDays": {
+ "type": "string"
+ },
+ "hint": {
+ "type": "string"
+ },
+ "updateError": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "toggle",
+ "repeats",
+ "pattern",
+ "every",
+ "interval",
+ "unit",
+ "onDays",
+ "hint",
+ "updateError"
+ ]
+ },
"startDate": {
"type": "object",
"additionalProperties": false,
@@ -10063,6 +10211,7 @@
"status",
"priority",
"dueDate",
+ "recurrence",
"startDate",
"labels"
]
@@ -10704,6 +10853,88 @@
"clearError"
]
},
+ "recurrence": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "daily_one": {
+ "type": "string"
+ },
+ "daily_zero": {
+ "type": "string"
+ },
+ "daily_two": {
+ "type": "string"
+ },
+ "daily_few": {
+ "type": "string"
+ },
+ "daily_many": {
+ "type": "string"
+ },
+ "daily_other": {
+ "type": "string"
+ },
+ "weekly_one": {
+ "type": "string"
+ },
+ "weekly_zero": {
+ "type": "string"
+ },
+ "weekly_two": {
+ "type": "string"
+ },
+ "weekly_few": {
+ "type": "string"
+ },
+ "weekly_many": {
+ "type": "string"
+ },
+ "weekly_other": {
+ "type": "string"
+ },
+ "monthly_one": {
+ "type": "string"
+ },
+ "monthly_zero": {
+ "type": "string"
+ },
+ "monthly_two": {
+ "type": "string"
+ },
+ "monthly_few": {
+ "type": "string"
+ },
+ "monthly_many": {
+ "type": "string"
+ },
+ "monthly_other": {
+ "type": "string"
+ },
+ "yearly_one": {
+ "type": "string"
+ },
+ "yearly_zero": {
+ "type": "string"
+ },
+ "yearly_two": {
+ "type": "string"
+ },
+ "yearly_few": {
+ "type": "string"
+ },
+ "yearly_many": {
+ "type": "string"
+ },
+ "yearly_other": {
+ "type": "string"
+ },
+ "onDays": {
+ "type": "string"
+ }
+ },
+ "required": ["onDays"]
+ },
"labels": {
"type": "object",
"additionalProperties": false,
@@ -11150,6 +11381,7 @@
"pr",
"assignee",
"dueDate",
+ "recurrence",
"labels",
"update",
"contextMenu",
diff --git a/i18n/tr-TR.json b/i18n/tr-TR.json
index 59cea84d3..7e6006621 100644
--- a/i18n/tr-TR.json
+++ b/i18n/tr-TR.json
@@ -2492,6 +2492,33 @@
"rose": "Gül Kurusu",
"crimson": "Koyu Kırmızı"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2708,6 +2735,17 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/uk-UA.json b/i18n/uk-UA.json
index c58e48d35..06a4edb0e 100644
--- a/i18n/uk-UA.json
+++ b/i18n/uk-UA.json
@@ -2516,6 +2516,41 @@
"rose": "Троянда",
"crimson": "Багряний"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_few": "days",
+ "days_many": "days",
+ "days_one": "day",
+ "days_other": "days",
+ "label": "Unit",
+ "months_few": "months",
+ "months_many": "months",
+ "months_one": "month",
+ "months_other": "months",
+ "weeks_few": "weeks",
+ "weeks_many": "weeks",
+ "weeks_one": "week",
+ "weeks_other": "weeks",
+ "years_few": "years",
+ "years_many": "years",
+ "years_one": "year",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2734,6 +2769,25 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_few": "Every {{count}} days",
+ "daily_many": "Every {{count}} days",
+ "daily_one": "Every day",
+ "daily_other": "Every {{count}} days",
+ "monthly_few": "Every {{count}} months",
+ "monthly_many": "Every {{count}} months",
+ "monthly_one": "Every month",
+ "monthly_other": "Every {{count}} months",
+ "weekly_few": "Every {{count}} weeks",
+ "weekly_many": "Every {{count}} weeks",
+ "weekly_one": "Every week",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_few": "Every {{count}} years",
+ "yearly_many": "Every {{count}} years",
+ "yearly_one": "Every year",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json
index e718d354c..825d703de 100644
--- a/i18n/vi-VN.json
+++ b/i18n/vi-VN.json
@@ -2480,6 +2480,29 @@
"rose": "Hồng",
"crimson": "Đỏ thẫm"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json
index e473f8252..2fd6885b5 100644
--- a/i18n/zh-CN.json
+++ b/i18n/zh-CN.json
@@ -2480,6 +2480,29 @@
"rose": "玫红",
"crimson": "深红"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "Could not move task. Please try again."
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/i18n/zh-TW.json b/i18n/zh-TW.json
index 59a51d8cd..411df4e44 100644
--- a/i18n/zh-TW.json
+++ b/i18n/zh-TW.json
@@ -2480,6 +2480,29 @@
"rose": "玫瑰紅",
"crimson": "深紅"
}
+ },
+ "recurrence": {
+ "updateError": "Failed to update task repeat",
+ "every": "Every",
+ "hint": "When this task is done, the next one is created.",
+ "interval": "Interval",
+ "onDays": "On these days",
+ "pattern": {
+ "daily": "Daily",
+ "monthly": "Monthly",
+ "periodically": "Periodically",
+ "weekly": "Weekly",
+ "yearly": "Yearly"
+ },
+ "repeats": "Repeats",
+ "toggle": "Repeat",
+ "unit": {
+ "days_other": "days",
+ "label": "Unit",
+ "months_other": "months",
+ "weeks_other": "weeks",
+ "years_other": "years"
+ }
}
},
"backlog": {
@@ -2695,6 +2718,13 @@
},
"board": {
"reorderFailed": "無法移動任務,請再試一次。"
+ },
+ "recurrence": {
+ "daily_other": "Every {{count}} days",
+ "monthly_other": "Every {{count}} months",
+ "weekly_other": "Every {{count}} weeks",
+ "yearly_other": "Every {{count}} years",
+ "onDays": "{{rule}} on {{days}}"
}
},
"invitations": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f272f2acb..850faafa8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -318,6 +318,9 @@ importers:
'@better-auth/api-key':
specifier: 1.6.26
+ '@date-fns/tz':
+ specifier: ^1.4.1
+ version: 1.4.1
'@dnd-kit/core':
specifier: ^6.3.1