@bobfrankston/rmfmail 1.2.230 → 1.2.232

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/TODO.md CHANGED
@@ -661,6 +661,33 @@ Was part of S1 "local-first reconciliation refactor" until 2026-04-23 when S1's
661
661
 
662
662
  <a id="priority-1"></a>
663
663
 
664
+ <a id="ext162"></a>
665
+
666
+ ### C162 — Vetting sweep 2026-08-09: dead paths & duplicated mechanisms [↑ summary](#sum)
667
+
668
+ Requested 2026-08-08 22:34 ("spend the night vetting the code to look for dead path and duplicated mechanism"); the session crashed before it started. First pass below. Every row is a reachability result (grep for importers across `bin/`, `packages/`, `client/`, `android-maui/`, the HTML importmaps and the bundle config), not an impression.
669
+
670
+ **Dead — no path reaches it**
671
+
672
+ | What | Lines | Evidence | Call |
673
+ |---|---|---|---|
674
+ | `packages/mailx-core` | 665 | no importer anywhere; contains 2 of the 8 RFC822 assembly copies | delete |
675
+ | `packages/mailx-server` | 452 | `--server` mode removed v1.2.80; nothing imports it | delete |
676
+ | `packages/mailx-compose` | 111 | sole export `buildComposeInit` uncalled | delete |
677
+ | `packages/mailx-send` + its nested `mailsend/` copy | 1236 | the app never imports it — it publishes the `mailsend`/`mailq` CLI bins. The two copies differ by **8 lines, all comments** | keep only if the CLI is still wanted, and collapse to one copy |
678
+ | `client/components/calendar.ts` | 213 | superseded by `calendar-sidebar.ts` (951 lines, live); nothing imports it | delete |
679
+ | `client/components/tasks.ts` | 234 | ditto — tasks UI lives in calendar-sidebar + alarms | delete |
680
+ | `showSelectionMenu` in `message-list.ts` | ~55 | the toolbar **Selection** button and its handler were deleted 2026-06-26 (`e9c1efa9`); the menu was never re-anchored, so the whole bulk-actions menu is unreachable | re-anchor to the bulk bar **or** delete — this one is a lost feature, not just dead weight |
681
+ | uncalled exports | — | `destroyGhostText`, `local-service.handleCall`, `local-store.storeBody`, `spellcheck-core.MARKER_ATTR`, `mailx-settings`: `isCloudMode`/`getLastCloudError`/`getMicrosoftProfile`, `mailx-host.hostName`, `mailx-store-web`: `createWorkerHost`/`loadDeviceState`/`saveDeviceState`, `mailx-types`: `answeredOf`/`deletedOf`/`setAnswered`/`setDraft`/`toggleFlagged` | delete with their packages where applicable |
682
+
683
+ This is not tidiness. The RFC 2047 header fix on 2026-08-08 was hand-applied to **7 sites — 4 of them in the dead packages above**, which is real fix-time spent on code that cannot run.
684
+
685
+ **Duplicated mechanism**
686
+
687
+ - **RFC822/MIME assembly — the expensive one.** Eight sites build a message by hand (`mailx-service` ×2 live, `mailx-store-web` ×2 live, `mailx-core` ×2 dead, `mailx-send` ×2 dead). The two LIVE pairs — desktop and Android/web — are **72% identical line-for-line**. Every send-path fix since May has had to be applied 2–4×: quoted-header envelope scrape (v1.2.166, "SAME shape in 3 files"), inline images data:→cid (v1.2.179, "BOTH send paths"), RFC 2047 encoded-words (v1.2.226, 7 sites). Fix: one `buildMimeMessage()` in `mailx-types`, which already hosts `encodeHeaderWord`, `encodeQuotedPrintable`, `extractInlineImages` and `htmlToPlainText` — the parts each copy already shares. [M]
688
+ - ~~**Context menus** — three clipboard implementations (rich editor, compose recipient field, nothing at all elsewhere)~~ — **FIXED v1.2.230**, see DONE.md.
689
+ - **`escapeHtml`** — 15 separate definitions across client + packages. [S]
690
+
664
691
  ## Priority 1 — Get basics working [↑ top](#top)
665
692
 
666
693
  ### External content security
@@ -2364,7 +2364,7 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
2364
2364
  items.push({ label: "Reply", action: () => document.dispatchEvent(new CustomEvent("mailx-compose", { detail: { mode: "reply" } })) });
2365
2365
  items.push({ label: "Reply All", action: () => document.dispatchEvent(new CustomEvent("mailx-compose", { detail: { mode: "replyAll" } })) });
2366
2366
  items.push({ label: "Forward", action: () => document.dispatchEvent(new CustomEvent("mailx-compose", { detail: { mode: "forward" } })) });
2367
- showContextMenu(me.clientX, me.clientY, items);
2367
+ showContextMenu(me.clientX, me.clientY, items, { editTarget: me.target });
2368
2368
  });
2369
2369
  }
2370
2370
  headerEl.querySelector(".mv-date").textContent = new Date(msg.date).toLocaleString(void 0, { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hour12: false });
@@ -2897,7 +2897,7 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
2897
2897
  } });
2898
2898
  }
2899
2899
  }
2900
- showContextMenu(e.clientX, e.clientY, items);
2900
+ showContextMenu(e.clientX, e.clientY, items, { editTarget: e.target });
2901
2901
  });
2902
2902
  attEl.appendChild(chip);
2903
2903
  }
@@ -6266,7 +6266,7 @@ async function renderTasks(prefetched) {
6266
6266
  await deleteTask(uuid);
6267
6267
  renderTasks();
6268
6268
  } }
6269
- ]);
6269
+ ], { editTarget: e.target });
6270
6270
  });
6271
6271
  });
6272
6272
  }