@bobfrankston/rmfmail 1.2.112 → 1.2.114

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.
Files changed (41) hide show
  1. package/TODO.md +5 -5
  2. package/bin/mailx.js +72 -3
  3. package/bin/mailx.js.map +1 -1
  4. package/bin/mailx.ts +62 -3
  5. package/client/android-bootstrap.bundle.js +60 -3
  6. package/client/android-bootstrap.bundle.js.map +2 -2
  7. package/client/app.bundle.js +42 -0
  8. package/client/app.bundle.js.map +2 -2
  9. package/client/app.js +58 -0
  10. package/client/app.js.map +1 -1
  11. package/client/app.ts +60 -0
  12. package/client/compose/compose.bundle.js +50 -5
  13. package/client/compose/compose.bundle.js.map +2 -2
  14. package/client/compose/compose.ts +13 -5
  15. package/client/compose/spellcheck-core.js +59 -3
  16. package/client/compose/spellcheck-core.js.map +1 -1
  17. package/client/compose/spellcheck-core.ts +58 -3
  18. package/client/compose/spellcheck.js +15 -6
  19. package/client/compose/spellcheck.js.map +1 -1
  20. package/client/compose/spellcheck.ts +15 -6
  21. package/package.json +1 -1
  22. package/packages/mailx-imap/index.d.ts +4 -1
  23. package/packages/mailx-imap/index.d.ts.map +1 -1
  24. package/packages/mailx-imap/index.js +59 -5
  25. package/packages/mailx-imap/index.js.map +1 -1
  26. package/packages/mailx-imap/index.ts +55 -5
  27. package/packages/mailx-imap/package-lock.json +2 -2
  28. package/packages/mailx-imap/package.json +1 -1
  29. package/packages/mailx-store-web/android-bootstrap.js +48 -3
  30. package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
  31. package/packages/mailx-store-web/android-bootstrap.ts +47 -4
  32. package/packages/mailx-store-web/package.json +1 -1
  33. package/packages/mailx-store-web/web-service.d.ts +21 -0
  34. package/packages/mailx-store-web/web-service.d.ts.map +1 -1
  35. package/packages/mailx-store-web/web-service.js +11 -0
  36. package/packages/mailx-store-web/web-service.js.map +1 -1
  37. package/packages/mailx-store-web/web-service.ts +11 -0
  38. package/packages/mailx-types/mailx-api.d.ts +22 -0
  39. package/packages/mailx-types/mailx-api.d.ts.map +1 -1
  40. package/packages/mailx-types/mailx-api.ts +7 -0
  41. package/packages/mailx-types/package.json +1 -1
package/client/app.js CHANGED
@@ -657,6 +657,61 @@ function scheduleSyncedStamp() {
657
657
  }
658
658
  }, SYNC_SETTLE_MS);
659
659
  }
660
+ // C121: connect-phase ticker. The daemon emits connectProgress per IMAP
661
+ // connection attempt (socket → handshake → done/failed). While any attempt
662
+ // has been in flight longer than CONNECT_SHOW_AFTER_MS, the status bar shows
663
+ // "Connecting to <host> (<phase> <purpose>, 3.2s)" with a live elapsed
664
+ // counter — so a stuck DNS/TLS/greeting/LOGIN is distinguishable at a glance
665
+ // instead of an opaque frozen "Syncing…". Healthy sub-second connects never
666
+ // surface (the delay gate kills the flicker).
667
+ const activeConnects = new Map();
668
+ const CONNECT_SHOW_AFTER_MS = 1500;
669
+ let connectTickTimer = null;
670
+ function handleConnectProgress(event) {
671
+ const key = `${event.accountId}|${event.purpose}`;
672
+ if (event.phase === "done" || event.phase === "failed") {
673
+ activeConnects.delete(key);
674
+ if (activeConnects.size === 0 && connectTickTimer) {
675
+ clearInterval(connectTickTimer);
676
+ connectTickTimer = null;
677
+ // Leave the bar to the normal sync handlers; stamp settle so a
678
+ // lingering "Connecting…" flips to Synced when things go quiet.
679
+ scheduleSyncedStamp();
680
+ }
681
+ return;
682
+ }
683
+ const existing = activeConnects.get(key);
684
+ if (existing) {
685
+ existing.phase = event.phase;
686
+ }
687
+ else {
688
+ activeConnects.set(key, {
689
+ host: event.host || event.accountId,
690
+ purpose: event.purpose || "",
691
+ phase: event.phase,
692
+ startedAt: Date.now() - (event.elapsedMs || 0),
693
+ });
694
+ }
695
+ if (!connectTickTimer)
696
+ connectTickTimer = setInterval(renderConnectTick, 100);
697
+ }
698
+ function renderConnectTick() {
699
+ const el = document.getElementById("status-sync");
700
+ if (!el || activeConnects.size === 0)
701
+ return;
702
+ // Show the LONGEST-waiting attempt — that's the one worth staring at.
703
+ let worst = null;
704
+ for (const c of activeConnects.values()) {
705
+ if (!worst || c.startedAt < worst.startedAt)
706
+ worst = c;
707
+ }
708
+ if (!worst)
709
+ return;
710
+ const elapsed = Date.now() - worst.startedAt;
711
+ if (elapsed < CONNECT_SHOW_AFTER_MS)
712
+ return;
713
+ el.textContent = `Connecting to ${worst.host} (${worst.phase}${worst.purpose ? " " + worst.purpose : ""}, ${(elapsed / 1000).toFixed(1)}s)`;
714
+ }
660
715
  // ── Auto two-line when message list is narrow ──
661
716
  const messageList = document.getElementById("message-list");
662
717
  if (messageList) {
@@ -3148,6 +3203,9 @@ onWsEvent((event) => {
3148
3203
  startupStatus.textContent = "Loading accounts...";
3149
3204
  // Don't refresh folder tree on connect — it's already loaded by initFolderTree
3150
3205
  break;
3206
+ case "connectProgress":
3207
+ handleConnectProgress(event);
3208
+ break;
3151
3209
  case "syncProgress": {
3152
3210
  // Aggregate folders phases ("folders:<path>" when starting a folder,
3153
3211
  // "folders-done" between folders) print as a proportion so the user