Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Reminders: an empty Today says No Reminders instead of three empty headings

Yashwanth Kamireddi68536e97ab71
diff --git a/.uiverify/reminders-empty.mjs b/.uiverify/reminders-empty.mjs
new file mode 100644
index 0000000..9f514b2
--- /dev/null
+++ b/.uiverify/reminders-empty.mjs
@@ -0,0 +1,22 @@
+// Today with nothing due: no empty Morning / Afternoon / Tonight headings, only that there
+// is nothing — as icloud.com shows it.
+import { engine } from "./engine.mjs";
+import { SERVICES, installStub, openScreen } from "./stub.mjs";
+
+const b = await engine.launch();
+const ctx = await b.newContext({ viewport: { width: 1200, height: 800 } });
+await ctx.addInitScript(installStub, { screen: "library", services: SERVICES, twoFactor: null, remindersFixture: "lists" });
+const page = await ctx.newPage();
+await page.goto("http://localhost:4173", { waitUntil: "networkidle" });
+await openScreen(page, "Reminders");
+await page.locator(".rx-tile", { hasText: "Today" }).click();
+await page.waitForTimeout(400);
+const seen = await page.evaluate(() => ({
+ headings: [...document.querySelectorAll(".rx-section")].map((h) => h.textContent.trim()),
+ empty: document.querySelector(".rx-empty")?.textContent.trim() ?? null,
+}));
+const pass = seen.headings.length === 0 && seen.empty === "No Reminders";
+console.log(pass ? "PASS an empty Today says No Reminders, with no empty headings"
+ : `FAIL an empty Today: ${JSON.stringify(seen)}`);
+await b.close();
+process.exitCode = pass ? 0 : 1;
diff --git a/.uiverify/stub.mjs b/.uiverify/stub.mjs
index 8f02f5a..62c3a2e 100644
--- a/.uiverify/stub.mjs
+++ b/.uiverify/stub.mjs
@@ -145,7 +145,7 @@ export function installStub({ screen, services, twoFactor, calendarFixture, note
case "calendar_sync": return { calendars: calendars.length, events: events.length };
case "reminder_counts": return { today: 4, scheduled: 7, flagged: 2, all: 12, lists: [["L1", 5], ["L2", 3], ["lists", 4]] };
case "reminder_lists": return !remindersFixture ? [] : reminderLists;
- case "reminders_in": return !remindersFixture ? [] : reminderItems;
+ case "reminders_in": return !remindersFixture || remindersFixture === "lists" ? [] : reminderItems;
case "reminders_due_between": return calendarFixture ? dueReminders : [];
case "reminder_create": return null;
case "reminder_delete": return null;
@@ -154,7 +154,7 @@ export function installStub({ screen, services, twoFactor, calendarFixture, note
case "reminder_edit": return null;
case "reminder_list_create": case "reminder_list_rename": case "reminder_list_delete":
return null;
- case "reminders_smart": return !remindersFixture ? [] : reminderItems.filter(r => !r.completedAt);
+ case "reminders_smart": return !remindersFixture || remindersFixture === "lists" ? [] : reminderItems.filter(r => !r.completedAt);
case "note_folders": return !notesFixture ? [] : noteFolders;
case "note_save": case "note_delete": case "note_move": return null;
case "note_pin": {
diff --git a/check.sh b/check.sh
index 8bc1df5..db5e79d 100755
--- a/check.sh
+++ b/check.sh
@@ -47,6 +47,7 @@ step "coming back" node .uiverify/resume.mjs
step "birthdays, holidays" node .uiverify/occasions.mjs
step "drive folders" node .uiverify/drive-nav.mjs
step "birthdays in contacts" node .uiverify/contact-birthday.mjs
+step "empty today" node .uiverify/reminders-empty.mjs
# The same screens in WebKit, the engine Quince draws in. Chromium above catches most things;
# this catches what only WebKit does — pointer capture, blur on removal, its own layout.
diff --git a/src/screens/RemindersView.tsx b/src/screens/RemindersView.tsx
index b1e9cfb..1fd90a6 100644
--- a/src/screens/RemindersView.tsx
+++ b/src/screens/RemindersView.tsx
@@ -571,7 +571,9 @@ export function RemindersView() {
const listOf = (guid: string) => lists.find((l) => l.guid === guid);
if (kind === "today") {
- // Apple's own buckets, and it shows all three whether or not anything is in them.
+ // Apple's own buckets, all three shown once anything is due today. A day with nothing
+ // in it shows no empty headings, only that there is nothing — as icloud.com does.
+ if (threaded.length === 0) return [];
const buckets: { key: string; heading: string | null; rows: typeof threaded }[] = [
{ key: "loose", heading: null, rows: [] },
{ key: "morning", heading: "Morning", rows: [] },
@@ -1172,7 +1174,7 @@ export function RemindersView() {
? showDone
? "Nothing in this list."
: "All done here."
- : "Nothing here."}
+ : "No Reminders"}
</p>
)}
</section>