@bobfrankston/rmfmail 1.2.39 → 1.2.40

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/client/app.ts CHANGED
@@ -452,6 +452,9 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
452
452
  // searchMode stayed true and the next loadMessages was rerouted.
453
453
  if (searchInput) { searchInput.value = ""; updateSearchHighlight(); }
454
454
  clearSearchMode();
455
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
456
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
457
+ cancelServerSearch();
455
458
  markAsSeen();
456
459
  releaseFocus();
457
460
  loadMessages(accountId, folderId, 1, specialUse);
@@ -480,6 +483,9 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
480
483
  // search is still showing even though all the entries are there.").
481
484
  if (searchInput) { searchInput.value = ""; updateSearchHighlight(); }
482
485
  clearSearchMode();
486
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
487
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
488
+ cancelServerSearch();
483
489
  releaseFocus();
484
490
  loadUnifiedInbox();
485
491
  setTitle(`${APP_NAME} - All Inboxes`);
@@ -495,6 +501,9 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
495
501
  function applyTabView(tab: ViewTab): void {
496
502
  if (searchInput) { searchInput.value = ""; updateSearchHighlight(); }
497
503
  clearSearchMode();
504
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
505
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
506
+ cancelServerSearch();
498
507
  releaseFocus();
499
508
  const v = tab.view;
500
509
  if (v.kind === "unified") {
@@ -2317,7 +2326,18 @@ let serverSearchTimer: ReturnType<typeof setTimeout> | null = null;
2317
2326
 
2318
2327
  function doSearch(immediate = false): void {
2319
2328
  const query = searchInput.value.trim();
2320
- if (query.length === 0) { reloadCurrentFolder(); return; }
2329
+ if (query.length === 0) {
2330
+ // Leaving search — ABORT any in-flight server sweep. A "Server" search is
2331
+ // a 90-folder IMAP run on the daemon; if it's still going when you clear
2332
+ // the box, it keeps churning the sync worker + connections and starves
2333
+ // the read worker, so the folder reload's getUnifiedInbox ballooned from
2334
+ // ~200ms to 4.7s and the IPC timed out (Bob 2026-06-19). cancelServerSearch
2335
+ // bumps the daemon's serverSearchGen so the sweep loop bails immediately.
2336
+ if (serverSearchTimer) { clearTimeout(serverSearchTimer); serverSearchTimer = null; }
2337
+ cancelServerSearch();
2338
+ reloadCurrentFolder();
2339
+ return;
2340
+ }
2321
2341
  if (query.length < 2 && !immediate) return;
2322
2342
 
2323
2343
  // P20: orthogonal "Server" checkbox. When checked, the search ALSO spans
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/rmfmail",
3
- "version": "1.2.39",
3
+ "version": "1.2.40",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -39,7 +39,7 @@
39
39
  "@bobfrankston/iflow-direct": "^0.1.55",
40
40
  "@bobfrankston/mailx-host": "^0.1.13",
41
41
  "@bobfrankston/mailx-imap": "^0.1.100",
42
- "@bobfrankston/mailx-store-web": "^0.1.28",
42
+ "@bobfrankston/mailx-store-web": "^0.1.29",
43
43
  "@bobfrankston/mailx-sync": "^0.1.22",
44
44
  "@bobfrankston/miscinfo": "^1.0.13",
45
45
  "@bobfrankston/msger": "^0.1.387",
@@ -119,7 +119,7 @@
119
119
  "@bobfrankston/iflow-direct": "^0.1.55",
120
120
  "@bobfrankston/mailx-host": "^0.1.13",
121
121
  "@bobfrankston/mailx-imap": "^0.1.100",
122
- "@bobfrankston/mailx-store-web": "^0.1.28",
122
+ "@bobfrankston/mailx-store-web": "^0.1.29",
123
123
  "@bobfrankston/mailx-sync": "^0.1.22",
124
124
  "@bobfrankston/miscinfo": "^1.0.13",
125
125
  "@bobfrankston/msger": "^0.1.387",