Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.
Rust apple-notesapple-reminderscloudkitcrdtdesktop-appicloudicloud-calendaricloud-driveicloud-notesicloud-photosiphonelinuxlinux-desktoplocal-firstoffline-firstprivacyrusttauritauri-appwindows
Reminders: a day's repeating reminder moves to a day, not to midnight
Yashwanth Kamireddi31c7abb54abe
diff --git a/.uiverify/reminders-repeat-allday.mjs b/.uiverify/reminders-repeat-allday.mjsnew file mode 100644index 0000000..fb183d9--- /dev/null+++ b/.uiverify/reminders-repeat-allday.mjs@@ -0,0 +1,31 @@+// A daily reminder for the day, with no time, ticked: it rolls on to tomorrow and says so —+// "Moved to Tomorrow", as a day — never with a time it does not have ("Tomorrow 12:00 AM").+import { engine } from "./engine.mjs";+import { SERVICES, installStub, openScreen } from "./stub.mjs";+const BASE = process.env.BASE ?? "http://localhost:4202";+const b = await engine.launch();+let failures = 0;+const ok = (p, m) => { console.log(`${p ? "PASS" : "FAIL"} ${m}`); if (!p) failures++; };+const ctx = await b.newContext({ viewport: { width: 1200, height: 800 } });+await ctx.addInitScript(installStub, { screen: "library", services: SERVICES, twoFactor: null, remindersFixture: true });+await ctx.addInitScript(() => {+ const d = new Date();+ // Today, as Apple keeps a day: its midnight in UTC.+ const day = Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()) / 1000;+ window.__extraReminders = [{ guid: "rd", listGuid: "l1", title: "Water the herbs", notes: null, dueAt: day, allDay: true,+ completedAt: null, priority: 0, flagged: false, parentGuid: null, etag: null, recurFrequency: 0, recurInterval: 1 }];+});+const page = await ctx.newPage();+page.on("pageerror", (e) => { console.log(`FAIL page error: ${e.message}`); failures++; });+await page.goto(BASE, { waitUntil: "networkidle" });+await openScreen(page, "Reminders");+await page.locator(".rx-list", { hasText: "Daily" }).click();+await page.waitForTimeout(300);+const row = page.locator(".rx-row", { has: page.getByLabel("Rename Water the herbs") });+await row.locator(".rx-tick").click();+const moved = row.locator(".rx-moved");+await moved.waitFor({ timeout: 4000 }).catch(() => {});+const said = (await moved.count()) ? (await moved.innerText()).trim() : "(nothing)";+ok(said === "Moved to Tomorrow", `it says where it went, as a day ${JSON.stringify(said)}`);+await b.close();+process.exitCode = failures ? 1 : 0;diff --git a/src/screens/RemindersView.tsx b/src/screens/RemindersView.tsxindex 9ee0d93..f6d83c3 100644--- a/src/screens/RemindersView.tsx+++ b/src/screens/RemindersView.tsx@@ -758,7 +758,8 @@ export function RemindersView() {if (!fresh || !wasOpen || !rollsOn(r)) return;const after = fresh.find((x) => x.guid === r.guid);if (after && after.dueAt !== null && after.dueAt !== r.dueAt) {- setMoved({ guid: r.guid, text: dueLabel(after.dueAt).text });+ // A day's reminder moves to a day: said without the time it does not have.+ setMoved({ guid: r.guid, text: dueLabel(after.dueAt, false, after.allDay).text });}};const flag = (r: Reminder) =>