@bobfrankston/rmfmail 1.1.200 → 1.1.201

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, getSelectedMessages, markBodiesCached, getCurrentFocused, releaseFocus, removeMessagesAndReconcile, setRowFlagged, scrollFocusedIntoView, refreshPriorityIndex } from "./components/message-list.js";
6
+ import { initMessageList, loadMessages, loadUnifiedInbox, loadSearchResults, reloadCurrentFolder, clearSearchMode, setLiveFilter, 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";
@@ -2240,14 +2240,12 @@ function doSearch(immediate = false) {
2240
2240
  // Only when the server checkbox is OFF — with it on we want the real
2241
2241
  // local+server search, not a row filter.
2242
2242
  if (localScope === "current" && !serverOn && !immediate) {
2243
- const body = document.getElementById("ml-body");
2244
- if (body) {
2245
- const lower = query.toLowerCase();
2246
- for (const row of body.querySelectorAll(".ml-row")) {
2247
- const text = row.textContent?.toLowerCase() || "";
2248
- row.classList.toggle("filter-hidden", !text.includes(lower));
2249
- }
2250
- }
2243
+ // Register as a live list filter (not a raw DOM toggle) so it survives
2244
+ // background sync reloads and blocks reloadCurrentFolder — otherwise a
2245
+ // sync mid-read wipes the filter, deselects the open message, and pops
2246
+ // back to the full list while the search box still shows the query
2247
+ // (Bob 2026-05-31). setLiveFilter applies the hide to current rows.
2248
+ setLiveFilter(query);
2251
2249
  return;
2252
2250
  }
2253
2251
  // ── Phase 1: LOCAL search — always, immediately ──