@open-workspace/email 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-workspace/email",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Team mail for OpenWorkspace: personal and shared inboxes, mailing lists, previews, safety, and AI.",
5
5
  "keywords": [
6
6
  "alchemy",
@@ -53,63 +53,63 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@hono/zod-validator": "0.9.1",
56
- "@hookform/resolvers": "7.0.6",
56
+ "@hookform/resolvers": "7.0.10",
57
57
  "@mmmike/web-push": "1.5.0",
58
58
  "@modelcontextprotocol/server": "2.4.0",
59
- "@tanstack/react-query": "5.107.1",
60
- "@tiptap/extension-placeholder": "3.33.1",
61
- "@tiptap/extension-table": "3.33.1",
62
- "@tiptap/pm": "3.33.1",
63
- "@tiptap/react": "3.33.1",
64
- "@tiptap/starter-kit": "3.33.1",
59
+ "@tanstack/react-query": "5.108.4",
60
+ "@tiptap/extension-placeholder": "3.35.1",
61
+ "@tiptap/extension-table": "3.35.1",
62
+ "@tiptap/pm": "3.35.1",
63
+ "@tiptap/react": "3.35.1",
64
+ "@tiptap/starter-kit": "3.35.1",
65
65
  "aws4fetch": "1.0.20",
66
66
  "date-fns": "4.4.0",
67
- "dompurify": "3.4.17",
67
+ "dompurify": "3.5.0",
68
68
  "drizzle-orm": "0.45.4",
69
- "hono": "4.13.17",
69
+ "hono": "4.13.23",
70
70
  "html-to-text": "10.0.1",
71
71
  "linkifyjs": "4.4.0",
72
- "lucide-react": "1.71.0",
72
+ "lucide-react": "1.84.0",
73
73
  "nuqs": "2.10.3",
74
74
  "pdfjs-dist": "6.5.438",
75
75
  "postal-mime": "4.2.1",
76
76
  "react": "19.3.1",
77
77
  "react-hook-form": "7.92.0",
78
- "react-router": "8.5.1",
78
+ "react-router": "8.5.3",
79
79
  "sanitize-html": "2.18.2",
80
80
  "sonner": "2.0.8",
81
- "tldts": "7.4.21",
81
+ "tldts": "7.6.4",
82
82
  "zod": "4.6.7"
83
83
  },
84
84
  "devDependencies": {
85
- "@alchemy.run/cloudflare": "2.0.0-beta.85",
86
- "@alchemy.run/test": "2.0.0-beta.85",
87
- "@effect/platform-bun": "4.1.3",
88
- "@effect/platform-node": "4.1.3",
89
- "@open-workspace/core": "0.5.1",
90
- "@open-workspace/create": "0.5.1",
91
- "@types/bun": "1.4.4",
85
+ "@alchemy.run/cloudflare": "2.0.0-beta.87",
86
+ "@alchemy.run/test": "2.0.0-beta.87",
87
+ "@effect/platform-bun": "4.1.7",
88
+ "@effect/platform-node": "4.1.7",
89
+ "@open-workspace/core": "0.5.2",
90
+ "@open-workspace/create": "0.5.2",
91
+ "@types/bun": "1.4.5",
92
92
  "@types/html-to-text": "9.0.4",
93
93
  "@types/jsdom": "30.0.0",
94
- "@types/node": "26.6.6",
95
- "@types/react": "19.3.0",
94
+ "@types/node": "26.6.11",
95
+ "@types/react": "19.3.3",
96
96
  "@types/react-dom": "19.3.0",
97
97
  "@types/sanitize-html": "2.16.2",
98
- "ai": "7.0.166",
99
- "alchemy": "2.0.0-beta.85",
98
+ "ai": "7.0.185",
99
+ "alchemy": "2.0.0-beta.87",
100
100
  "drizzle-kit": "0.31.11",
101
- "effect": "4.1.3",
102
- "jsdom": "30.1.3",
103
- "openid-client": "6.8.9",
104
- "playwright": "1.65.0",
105
- "standardwebhooks": "1.1.1",
101
+ "effect": "4.1.7",
102
+ "jsdom": "31.0.1",
103
+ "openid-client": "6.9.1",
104
+ "playwright": "1.65.1",
105
+ "standardwebhooks": "1.3.0",
106
106
  "typescript": "7.0.2",
107
- "vite": "8.3.7"
107
+ "vite": "8.4.0"
108
108
  },
109
109
  "peerDependencies": {
110
- "@alchemy.run/cloudflare": "2.0.0-beta.85",
111
- "@open-workspace/core": "0.5.1",
112
- "alchemy": "2.0.0-beta.85",
113
- "effect": "4.1.3"
110
+ "@alchemy.run/cloudflare": "2.0.0-beta.87",
111
+ "@open-workspace/core": "0.5.2",
112
+ "alchemy": "2.0.0-beta.87",
113
+ "effect": "4.1.7"
114
114
  }
115
115
  }
package/src/client.tsx CHANGED
@@ -188,7 +188,9 @@ const mail: ClientModule = {
188
188
  background: mailBackground.Component,
189
189
  preload: async () => {
190
190
  // Message bodies need the sanitizer (DOMPurify); the screen need not wait for it.
191
- loadSanitizer().catch(() => undefined);
191
+ loadSanitizer().catch((error) =>
192
+ console.warn("Could not preload the sanitizer", error)
193
+ );
192
194
 
193
195
  await Promise.all([mailboxRoute.preload(), mailBackground.preload()]);
194
196
  },
@@ -80,9 +80,9 @@ class AssetBookmarkStep extends Step {
80
80
  try {
81
81
  Step.jsonID("openworkspaceAssetBookmark", AssetBookmarkStep);
82
82
  } catch (error) {
83
- if (
84
- !(error instanceof RangeError && error.message.includes("Duplicate use"))
85
- ) {
83
+ if (!(
84
+ error instanceof RangeError && error.message.includes("Duplicate use")
85
+ )) {
86
86
  throw error;
87
87
  }
88
88
  }
@@ -119,8 +119,8 @@ function MailboxSheet({
119
119
  if (!open) return;
120
120
 
121
121
  for (const id of otherIds.split(" ").filter(Boolean)) {
122
- void prefetchMailboxSwitch(queryClient, id, folder).catch(
123
- () => undefined
122
+ void prefetchMailboxSwitch(queryClient, id, folder).catch((error) =>
123
+ console.warn("Mailbox prefetch failed", error)
124
124
  );
125
125
  }
126
126
  }, [open, otherIds, folder, queryClient]);
@@ -75,6 +75,6 @@ export function prefetchMail({
75
75
  });
76
76
  }
77
77
  },
78
- () => undefined
78
+ (error) => console.warn("Mail prefetch failed", error)
79
79
  );
80
80
  }
@@ -18,9 +18,10 @@ function updateAppBadge(count: number) {
18
18
  const operation =
19
19
  count > 0 ? navigator.setAppBadge?.(count) : navigator.clearAppBadge?.();
20
20
 
21
- void operation?.catch(() => {
22
- // Badging is optional and can be denied independently of notifications.
23
- });
21
+ // Badging is optional and can be denied independently of notifications.
22
+ void operation?.catch((error) =>
23
+ console.debug("Could not update the app badge", error)
24
+ );
24
25
  }
25
26
 
26
27
  export function UnreadDocumentIndicator() {
@@ -124,8 +124,9 @@ export function useComposerAttachmentPreflight(
124
124
  const resolvePlan = useEffectEvent((signal: AbortSignal) => {
125
125
  if (!hasAttachments || assets.some((asset) => !asset.uploadId)) return;
126
126
  void resolveComposerAttachmentPlan(session, context, assets, signal).catch(
127
- () => {
127
+ (error) => {
128
128
  // Background preflight is advisory. Final submission reports failures.
129
+ if (!signal.aborted) console.warn("Attachment preflight failed", error);
129
130
  }
130
131
  );
131
132
  });
@@ -253,12 +253,10 @@ export function useComposerCore(input: {
253
253
  event.dataTransfer.dropEffect = busy ? "none" : "copy";
254
254
  },
255
255
  onDragLeave: (event: DragEvent<HTMLFormElement>) => {
256
- if (
257
- !(
258
- event.relatedTarget instanceof Node &&
259
- event.currentTarget.contains(event.relatedTarget)
260
- )
261
- ) {
256
+ if (!(
257
+ event.relatedTarget instanceof Node &&
258
+ event.currentTarget.contains(event.relatedTarget)
259
+ )) {
262
260
  setDragging(false);
263
261
  }
264
262
  },
@@ -80,7 +80,10 @@ export async function jmapEventStream(input: {
80
80
  }
81
81
  }
82
82
 
83
- writer.close().catch(() => {});
83
+ // Closing fails when the client has already gone.
84
+ writer
85
+ .close()
86
+ .catch((error) => console.debug("Event stream already closed", error));
84
87
  finished();
85
88
  };
86
89
 
@@ -1294,7 +1294,10 @@ export const mailRoutes = new Hono<AppEnv>()
1294
1294
  ])
1295
1295
  );
1296
1296
 
1297
- workspace.catch(() => undefined);
1297
+ // Awaited below, unless the mailbox call fails or finds nothing first.
1298
+ workspace.catch((error) =>
1299
+ console.warn("Workspace inputs failed to load", error)
1300
+ );
1298
1301
 
1299
1302
  const view = await timed(c, "do", "conversation", () =>
1300
1303
  mailbox.getConversationView(
@@ -1538,7 +1541,10 @@ export const mailRoutes = new Hono<AppEnv>()
1538
1541
  ])
1539
1542
  );
1540
1543
 
1541
- workspace.catch(() => undefined);
1544
+ // Awaited below, unless the mailbox call fails or finds nothing first.
1545
+ workspace.catch((error) =>
1546
+ console.warn("Workspace inputs failed to load", error)
1547
+ );
1542
1548
 
1543
1549
  const view = await timed(c, "do", "message", () =>
1544
1550
  mailbox.getMessageSenderView(c.req.param("id"))