("details[id$='-tail']")?.open).toBe(false);
@@ -311,13 +360,13 @@ describe("Digests app", () => {
it("keeps repeat senders flat and preserves every source link and semantic accent", async () => {
const app = await loadPluginApp(() => import("./app.js"));
- const rows = ["Robinhood", "Figma", "robinhood", "Robinhood", "Figma"].map((sender, index) => ({
- title: `${sender} · Notice ${index}`, text: index === 2 ? "September statement is ready." : `Detail ${index}`, url: `https://example.test/mail/${index}`,
+ const rows = ["Example Finance", "Example Design", "example finance", "Example Finance", "Example Design"].map((sender, index) => ({
+ title: `${sender} · Notice ${index}`, text: index === 2 ? "September statement is ready." : index === 3 ? "Investment account update." : `Detail ${index}`, url: `https://example.test/mail/${index}`,
...(index === 0 ? { kind: "receipt", receivedAt: 1791043200000 } : {}),
}));
const slot = renderSlot(app.messageDirectives[0]!, directiveProps, { rpc: { getIssue: () => ({ ...readyIssue, brief: {
heading: "Needs you", items: [
- { title: "Reply to Ada", text: "Confirm Thursday.", action: { label: "Review reply", url: "https://example.test/reply" } },
+ { title: "Reply to Example Sender", text: "Confirm Thursday.", action: { label: "Review reply", url: "https://example.test/reply" } },
{ title: "Check a new sign-in", tone: "danger", text: "An unfamiliar device.", action: { label: "Review alert", url: "https://example.test/alert" } },
], later: [], laterLabel: "Later", tail: { label: "Routine (5)", details: "", items: rows },
} }) } });
diff --git a/plugins/digests/app.tsx b/plugins/digests/app.tsx
index 8264f0514..0961d2c2a 100644
--- a/plugins/digests/app.tsx
+++ b/plugins/digests/app.tsx
@@ -249,7 +249,7 @@ function emailKind(item: EmailRow): string | undefined {
if (item.kind) return item.kind;
const text = `${item.title} ${item.sender ?? ""} ${item.subject ?? ""} ${item.text}`;
if (/\bstatements?\b/iu.test(text)) return "statement";
- if (/\b(dividend|trade confirmation|brokerage|investment|retirement|robinhood)\b/iu.test(text)) return "account";
+ if (/\b(dividend|trade confirmation|brokerage|investment|retirement)\b/iu.test(text)) return "account";
if (/\b(receipt|payment (?:complete|completed|received)|order confirmation)\b/iu.test(text)) return "receipt";
if (/\b(bill|invoice|autopay|payment due|amount due)\b/iu.test(text)) return "bill";
if (/\b(shipp?ing|shipped|package|tracking|delivery)\b/iu.test(text)) return "shipping";
@@ -482,6 +482,7 @@ function DigestForm({ connection, definition, pending, onCancel, onSave }: {
const simpleSchedule = day === "*" && month === "*" && DAYS.some(([value]) => value === weekday) && /^\d+$/u.test(hour) && /^\d+$/u.test(minute);
const [frequency, setFrequency] = useState(simpleSchedule ? weekday : "custom");
const [time, setTime] = useState(`${hour.padStart(2, "0")}:${minute.padStart(2, "0")}`);
+ const timezone = definition?.schedule?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
const publishOnly = !!definition && !definition.schedule;
const times = Array.from({ length: 48 }, (_, index) => `${String(Math.floor(index / 2)).padStart(2, "0")}:${index % 2 ? "30" : "00"}`);
if (!times.includes(time)) times.push(time);
@@ -490,19 +491,19 @@ function DigestForm({ connection, definition, pending, onCancel, onSave }: {
const [hours, minutes] = time.split(":");
void onSave({ ...(definition ? { id: definition.id } : {}), connectionId: connection.id, name, ...(emoji.trim() ? { emoji: emoji.trim() } : {}), instructions, ...(execution || definition?.execution ? { execution } : {}),
...(connection.id === "gmail" ? { afterReading } : {}),
- schedule: publishOnly ? null : frequency === "custom" ? definition!.schedule : { cron: `${Number(minutes)} ${Number(hours)} * * ${frequency}`, timezone: definition?.schedule?.timezone ?? "America/Los_Angeles" } });
+ schedule: publishOnly ? null : frequency === "custom" ? definition!.schedule : { cron: `${Number(minutes)} ${Number(hours)} * * ${frequency}`, timezone } });
}}>
-