@bobfrankston/rmfmail 1.0.695 → 1.0.696

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.
Files changed (40) hide show
  1. package/client/app.bundle.js +38 -41
  2. package/client/app.bundle.js.map +2 -2
  3. package/client/app.js +16 -14
  4. package/client/app.js.map +1 -1
  5. package/client/app.ts +16 -13
  6. package/client/components/folder-tree.js +36 -37
  7. package/client/components/folder-tree.js.map +1 -1
  8. package/client/components/folder-tree.ts +33 -33
  9. package/client/index.html +14 -0
  10. package/package.json +1 -1
  11. package/packages/mailx-core/index.d.ts.map +1 -1
  12. package/packages/mailx-core/index.js +2 -3
  13. package/packages/mailx-core/index.js.map +1 -1
  14. package/packages/mailx-core/index.ts +2 -3
  15. package/packages/mailx-imap/index.d.ts.map +1 -1
  16. package/packages/mailx-imap/index.js +3 -5
  17. package/packages/mailx-imap/index.js.map +1 -1
  18. package/packages/mailx-imap/index.ts +3 -5
  19. package/packages/mailx-imap/package-lock.json +2 -2
  20. package/packages/mailx-imap/package.json +1 -1
  21. package/packages/mailx-service/index.d.ts.map +1 -1
  22. package/packages/mailx-service/index.js +2 -2
  23. package/packages/mailx-service/index.js.map +1 -1
  24. package/packages/mailx-service/index.ts +2 -3
  25. package/packages/mailx-service/local-store.d.ts.map +1 -1
  26. package/packages/mailx-service/local-store.js +1 -17
  27. package/packages/mailx-service/local-store.js.map +1 -1
  28. package/packages/mailx-service/local-store.ts +1 -18
  29. package/packages/mailx-store/index.d.ts +1 -0
  30. package/packages/mailx-store/index.d.ts.map +1 -1
  31. package/packages/mailx-store/index.js +1 -0
  32. package/packages/mailx-store/index.js.map +1 -1
  33. package/packages/mailx-store/index.ts +1 -0
  34. package/packages/mailx-store/package.json +3 -2
  35. package/packages/mailx-store/parse-serial.d.ts +33 -0
  36. package/packages/mailx-store/parse-serial.d.ts.map +1 -0
  37. package/packages/mailx-store/parse-serial.js +38 -0
  38. package/packages/mailx-store/parse-serial.js.map +1 -0
  39. package/packages/mailx-store/parse-serial.ts +40 -0
  40. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-36352 → node_modules.npmglobalize-stash-34224}/.package-lock.json +0 -0
package/client/app.js CHANGED
@@ -1232,21 +1232,23 @@ async function deleteSelectedMessages() {
1232
1232
  if (statusSync?.textContent?.includes("undo"))
1233
1233
  statusSync.textContent = "";
1234
1234
  }, 30000);
1235
- try {
1236
- const byAccount = new Map();
1237
- for (const msg of snapshot) {
1238
- const uids = byAccount.get(msg.accountId) || [];
1239
- uids.push(msg.uid);
1240
- byAccount.set(msg.accountId, uids);
1241
- }
1242
- for (const [accountId, uids] of byAccount) {
1243
- await deleteMessages(accountId, uids);
1244
- }
1235
+ // Fire-and-forget per local-first: optimistic remove above already
1236
+ // updated the UI; the daemon-side trash is sync DB + queued IMAP.
1237
+ // An IPC 120s timeout doesn't mean the trash failed — surfacing it
1238
+ // as a status-bar error would only mislead. Real errors are still
1239
+ // reported by next sync's diagnostics.
1240
+ const byAccount = new Map();
1241
+ for (const msg of snapshot) {
1242
+ const uids = byAccount.get(msg.accountId) || [];
1243
+ uids.push(msg.uid);
1244
+ byAccount.set(msg.accountId, uids);
1245
1245
  }
1246
- catch (e) {
1247
- console.error(`Delete failed: ${e.message}`);
1248
- if (statusSync)
1249
- statusSync.textContent = `Delete failed: ${e?.message || e}`;
1246
+ for (const [accountId, uids] of byAccount) {
1247
+ deleteMessages(accountId, uids).catch((e) => {
1248
+ console.error(`Delete failed for ${accountId}: ${e?.message || e}`);
1249
+ if (statusSync)
1250
+ statusSync.textContent = `Delete sync issue (${accountId}): ${e?.message || e}`;
1251
+ });
1250
1252
  }
1251
1253
  }
1252
1254
  async function undoDelete() {