@bobfrankston/rmfmail 1.1.249 → 1.1.251

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
@@ -3,7 +3,7 @@
3
3
  * Wires together all UI components and WebSocket connection.
4
4
  */
5
5
  import { initFolderTree, refreshFolderTree, updateFolderCounts, setFolderSynced, getFolderSynced, setOutboxTotal } from "./components/folder-tree.js";
6
- import { initMessageList, loadMessages, loadUnifiedInbox, loadSearchResults, reloadCurrentFolder, clearSearchMode, setLiveFilter, getSelectedMessages, markBodiesCached, getCurrentFocused, releaseFocus, removeMessagesAndReconcile, setRowFlagged, scrollFocusedIntoView, refreshPriorityIndex } from "./components/message-list.js";
6
+ import { initMessageList, loadMessages, loadUnifiedInbox, loadSearchResults, reloadCurrentFolder, clearSearchMode, getSelectedMessages, markBodiesCached, getCurrentFocused, releaseFocus, removeMessagesAndReconcile, setRowFlagged, scrollFocusedIntoView, refreshPriorityIndex } from "./components/message-list.js";
7
7
  import { seenOf, flaggedOf, draftOf, setSeen, setFlagged } from "@bobfrankston/mailx-types";
8
8
  import { initTabs, setActiveView as setActiveTabView, openTab } from "./components/tabs.js";
9
9
  import { getCurrentMessage, initViewer, popOutCurrentMessage, printCurrentMessage, toggleFullscreenPreview, showPreviewBodyMenu, wrapHtmlBody } from "./components/message-viewer.js";
@@ -2454,18 +2454,16 @@ function doSearch(immediate = false) {
2454
2454
  serverSearchTimer = null;
2455
2455
  }
2456
2456
  cancelServerSearch();
2457
- // "This folder" scope: instant client-side filter of the visible rows.
2458
- // Only when the server checkbox is OFF with it on we want the real
2459
- // local+server search, not a row filter.
2460
- if (localScope === "current" && !serverOn && !immediate) {
2461
- // Register as a live list filter (not a raw DOM toggle) so it survives
2462
- // background sync reloads and blocks reloadCurrentFolder otherwise a
2463
- // sync mid-read wipes the filter, deselects the open message, and pops
2464
- // back to the full list while the search box still shows the query
2465
- // (Bob 2026-05-31). setLiveFilter applies the hide to current rows.
2466
- setLiveFilter(query);
2467
- return;
2468
- }
2457
+ // "This folder" scope used to be an instant client-side filter of the
2458
+ // VISIBLE rows. That was doubly wrong (Bob 2026-06-12): it only saw the
2459
+ // loaded page (so a match deeper in a big folder like Trash never showed),
2460
+ // and it did a dumb substring match that didn't understand qualifiers
2461
+ // (`from:amazon` matched the literal text and so found nothing). "This
2462
+ // folder" now runs the REAL DB search below (scope="current"), which the
2463
+ // service scopes to the current folder AND forces includeTrashSpam=true
2464
+ // so searching inside Trash finds Trash messages, and `from:`/`subject:`
2465
+ // qualifiers work. The DB FTS pass is sub-second, so we don't lose the
2466
+ // instant feel. (Server checkbox still adds the cross-folder IMAP sweep.)
2469
2467
  // ── Phase 1: LOCAL search — always, immediately ──
2470
2468
  // The local SQLite store is fast; results paint as the user types.
2471
2469
  const localScopeEff = localScope === "current" ? "current" : "all";