@bobfrankston/rmfmail 1.1.211 → 1.1.213
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 +2 -0
- package/client/app.bundle.js +16 -1
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +23 -2
- package/client/app.js.map +1 -1
- package/client/app.ts +17 -2
- package/client/lib/mailxapi.js +6 -0
- package/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-37624 → node_modules.npmglobalize-stash-79912}/.package-lock.json +0 -0
package/TODO.md
CHANGED
|
@@ -236,6 +236,8 @@ Previously shown as showstoppers; moved here because they haven't recurred on re
|
|
|
236
236
|
|
|
237
237
|
Small, self-contained items. Pick them up between higher-priority blocks without asking. Bump version per fix.
|
|
238
238
|
|
|
239
|
+
- **Q153 — Independent pop-out compose window (loopback-HTTP).** [L — feature, ~day+] Bob wants compose/reply as a real OS window (movable to another monitor, main window unobstructed). Plan settled (see `[[project_independent_compose_window]]` memory): in IPC mode also run the Express+WS app on a loopback `127.0.0.1` port sharing the LIVE store+imapManager (same pattern as `--debug-server` at `bin/mailx.ts:1883`, which mounts `createApiRouter(store, imapManager)`); popout button does `window.open("http://127.0.0.1:PORT/compose/compose.html?init=…")`; gate behind the button so a flaky window can't break normal in-window compose. **BLOCKER discovered 2026-06-01:** `client/lib/api-client.ts` is 100% IPC (`ipc().method(...)` via the injected `mailxapi` bridge) — there is NO REST/fetch fallback despite the "auto-detects HTTP" claim in docs. So pop-out FIRST needs a REST+WebSocket transport built into api-client (every method → `fetch('/api/…')`, events → WS), THEN the always-on loopback server (static + /api + ws), THEN cross-origin init via URL params (the popup is origin `127.0.0.1`, can't read the GUI's `sessionStorage`/parent). Sequence the transport layer first; it's the bulk of the work.
|
|
240
|
+
|
|
239
241
|
- ~~**Q152 — "Edit as new message" / resend on a sent (or any) message.**~~ **DONE 2026-05-31.** New `editAsNew` compose mode in `client/app.ts` (`openCompose` branch + `editAsNewBody` helper) clones the selected message into a fresh compose: original To/Cc/Subject verbatim, body via `sanitizeQuotedBody` with no quote/forward wrapper, no In-Reply-To/References (new Message-ID at send). Right-click menu entry "Edit as new message" added after Forward in `message-list.ts`. Replaces the move-to-Drafts kludge. *(Original entry below.)* Bob 2026-05-29: no clean way to take an already-sent message, tweak it, and send it again — today's only path is move-to-Drafts-then-edit (a kludge) or Forward (adds `Fwd:` + quote wrapper, wrong recipients). Add an **"Edit as new message"** affordance — in the viewer toolbar (next to Forward) and/or the message-list right-click menu — that loads the selected message's `.eml` **straight into a fresh compose** as the author: original To/Cc/Subject/body editable, **no `Fwd:`/`Re:` prefix, no quote indent, no In-Reply-To/References threading headers**, a new Message-ID. Effectively "duplicate into compose." Distinct from the existing Drafts `Edit & Send` (that edits the draft in place); this clones any message into a new outgoing draft. Reuse the compose-init plumbing the draft-edit path already uses (`showComposeOverlay` + the init payload built in `app.ts`); the only difference is which headers get stripped vs. carried. Most natural as the message-viewer From/To right-click "duplicate"-style action plus a toolbar button gated on non-draft messages. [S]
|
|
240
242
|
- ~~**Preview CSS leak — `<style>`/`<head>` contents bled into the message-list one-liner.**~~ DONE 2026-05-31. `extractPreview` (`mailx-imap/index.ts`) flattened HTML by stripping tags only, leaving the CSS *between* `<style>…</style>` (and `<head>`/`<script>`) in the preview as `*{box-sizing…}` / `@media…{…}` garbage (Bob's marketing-mail shot). Now strips those block contents + HTML comments before the tag-strip; `[image]` marker preserved. IMAP-path only (Gmail uses Google's clean snippet). Existing rows refresh via `rmfmail -repair`.
|
|
241
243
|
- ~~**Q138 — Quoted-reply image sizes lost.**~~ DONE 2026-05-11 in `client/app.ts:1000` — strip skips `<img>`. Two-pass loop handles multiple stripped attrs per tag.
|
package/client/app.bundle.js
CHANGED
|
@@ -10611,8 +10611,23 @@ optAutomarkDelay?.addEventListener("change", () => {
|
|
|
10611
10611
|
}
|
|
10612
10612
|
});
|
|
10613
10613
|
var isApp = typeof mailxapi !== "undefined" && mailxapi?.isApp;
|
|
10614
|
-
|
|
10614
|
+
async function getVersionWithRetry(attempts = 5) {
|
|
10615
|
+
for (let i = 0; i < attempts; i++) {
|
|
10616
|
+
try {
|
|
10617
|
+
return await getVersion();
|
|
10618
|
+
} catch (e) {
|
|
10619
|
+
if (i === attempts - 1) {
|
|
10620
|
+
console.warn("getVersion failed after retries:", e);
|
|
10621
|
+
return {};
|
|
10622
|
+
}
|
|
10623
|
+
await new Promise((r) => setTimeout(r, 1500));
|
|
10624
|
+
}
|
|
10625
|
+
}
|
|
10626
|
+
return {};
|
|
10627
|
+
}
|
|
10628
|
+
var versionPromise = getVersionWithRetry();
|
|
10615
10629
|
versionPromise.then((d) => {
|
|
10630
|
+
if (!d || !d.version) return;
|
|
10616
10631
|
const els = document.querySelectorAll(".app-version");
|
|
10617
10632
|
const storage = d.storage || {};
|
|
10618
10633
|
const storageLabel = storage.provider && storage.provider !== "local" ? ` [${storage.provider}]` : "";
|