@bobfrankston/rmfmail 1.2.39 → 1.2.41

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.js CHANGED
@@ -463,6 +463,9 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
463
463
  updateSearchHighlight();
464
464
  }
465
465
  clearSearchMode();
466
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
467
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
468
+ cancelServerSearch();
466
469
  markAsSeen();
467
470
  releaseFocus();
468
471
  loadMessages(accountId, folderId, 1, specialUse);
@@ -494,6 +497,9 @@ initFolderTree(folderTree, (accountId, folderId, folderName, specialUse) => {
494
497
  updateSearchHighlight();
495
498
  }
496
499
  clearSearchMode();
500
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
501
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
502
+ cancelServerSearch();
497
503
  releaseFocus();
498
504
  loadUnifiedInbox();
499
505
  setTitle(`${APP_NAME} - All Inboxes`);
@@ -511,6 +517,9 @@ function applyTabView(tab) {
511
517
  updateSearchHighlight();
512
518
  }
513
519
  clearSearchMode();
520
+ // Navigating to a folder / All Inboxes ALSO abandons search — kill any
521
+ // in-flight server sweep so it stops starving the read worker (Bob 2026-06-19).
522
+ cancelServerSearch();
514
523
  releaseFocus();
515
524
  const v = tab.view;
516
525
  if (v.kind === "unified") {
@@ -2426,6 +2435,17 @@ let serverSearchTimer = null;
2426
2435
  function doSearch(immediate = false) {
2427
2436
  const query = searchInput.value.trim();
2428
2437
  if (query.length === 0) {
2438
+ // Leaving search — ABORT any in-flight server sweep. A "Server" search is
2439
+ // a 90-folder IMAP run on the daemon; if it's still going when you clear
2440
+ // the box, it keeps churning the sync worker + connections and starves
2441
+ // the read worker, so the folder reload's getUnifiedInbox ballooned from
2442
+ // ~200ms to 4.7s and the IPC timed out (Bob 2026-06-19). cancelServerSearch
2443
+ // bumps the daemon's serverSearchGen so the sweep loop bails immediately.
2444
+ if (serverSearchTimer) {
2445
+ clearTimeout(serverSearchTimer);
2446
+ serverSearchTimer = null;
2447
+ }
2448
+ cancelServerSearch();
2429
2449
  reloadCurrentFolder();
2430
2450
  return;
2431
2451
  }