@bobfrankston/rmfmail 1.2.300 → 1.2.301

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/.commitmsg CHANGED
@@ -1,41 +1,29 @@
1
- The chip claimed every rule was a bulk-mail test without looking at them
1
+ Placing the caret in the body is the same act as taking focus
2
2
 
3
- Altis Hotels' welcome mail (Bob 2026-09-03: "marked as spam but is valid",
4
- `mailxstore/bobma/90/90fd2404….eml`). The banner on it is already right —
5
- `info`, no headline, "Your mail server scored this as spam, but altishotels.com
6
- proved it sent this", and the "Stop warning about marketing@altishotels.com"
7
- button underneath. What was wrong sat one element above: the score chip's
8
- tooltip read "Scored by bulk-mail or blocklist rules; the sending domain passed
9
- DMARC, so the sender is proved" — and then listed, on the next line of the same
10
- tooltip, `3.2 KAM_ACCOUNTPHISH (Spam that tries to get account information)`,
11
- which is 3.2 of the message's 8.3 and is neither a bulk-mail nor a blocklist
12
- rule. A reader who reads both lines has been told two different things about
13
- the same message by the same tooltip, and the app is the one that is wrong.
3
+ Ctrl+N opens compose with the cursor in the message body instead of the To
4
+ field (Bob 2026-09-03: "^n (and forward?) still start me in the body rather
5
+ than the to field" and yes, forward too).
14
6
 
15
- The claim was never checked. `benign = proved || kind === "bulk"` picked the
16
- neutral chip correctly, that part is about the sender and the tooltip then
17
- described the RULES from that same flag. `proved` is a fact about the headers
18
- and says nothing about any rule; `kind` is the WORST class present and says
19
- nothing about the rest. Neither one can support a sentence beginning "every
20
- rule that scored".
7
+ applyInit made the decision twice. First it seeded the body and called
8
+ `editor.setCursor(0)`; twenty lines later it picked the first empty field and
9
+ focused it. Reading top to bottom the second one wins, and it does not:
10
+ `setCursor` is not a caret-placement call, it is a focus call. rmf-tiny's
11
+ implementation ends with `editor.focus()` and then re-runs the whole placement
12
+ inside `requestAnimationFrame` — deliberately, to survive the nested-iframe
13
+ focus race that produced the old "have to click in and try again" symptom — so
14
+ it lands after anything applyInit does synchronously afterwards. Quill's
15
+ `setSelection` focuses as well. Whatever order the two lines were written in,
16
+ the editor was always going to win.
21
17
 
22
- `analyzeServerSpam` now computes `bulkOnly` every rule that scored is `bulk`
23
- or `neutral` and `spamScoreOf` carries it to the chip. The bulk-only sentence
24
- is said only when it is true. Otherwise the tooltip says what IS established
25
- and nothing more: the proof, by name, plus "not every rule that scored is a
26
- bulk-mail test they are listed below", or for an unproved sender "no forgery
27
- rule scored", which `kind === "bulk"` does establish. The `info` banner for a
28
- bulk verdict loses its "— nothing that scored tests who sent it" clause on the
29
- same condition, since it was making the same unchecked claim.
18
+ So the two are now one decision, made once and up front: `focusTarget` is the
19
+ first field the user still has to fill, To Subject → body, and `setCursor` is
20
+ asked for only when the answer is the body. On a reply that is still the body —
21
+ To and Subject are filled, and the call also scrolls the quote out of view so
22
+ the empty line is what's on screen, which is the behaviour it exists for. On a
23
+ forward and on new mail it is the To field, untouched.
30
24
 
31
- Measured over the 800 newest messages in the store: 138 raise the neutral chip,
32
- and 132 of those were being told the score was bulk-mail rules only. Most are
33
- unflagged mail scoring above half the threshold, which carries no
34
- X-Spam-Report at all there the individual scores are unknown, which is
35
- precisely when a claim about all of them cannot be made.
36
-
37
- Not changed, on purpose: KAM_ACCOUNTPHISH stays unclassified. Its description
38
- says it tests what the message asks for, not who sent it, but "other" is the
39
- honest answer for a rule this file has no basis to classify, and the cautious
40
- default is what "other" is for. The fix is to stop asserting past it, not to
41
- guess at it.
25
+ Forward has been doing this since it grew a quoted body. Ctrl+N joined it in
26
+ v1.2.298, three hours ago: before the account signature reached compose,
27
+ `bodyToRender` was empty for new mail and the branch holding `setCursor` never
28
+ ran at all. The first message anyone composed with a signature was also the
29
+ first one that opened with the cursor in the wrong place.
@@ -6191,9 +6191,10 @@ function applyInit(init) {
6191
6191
  bodyToRender = isReplyForward ? `<br>${sigBlock}<br>${bodyToRender}` : `${bodyToRender}${sigBlock}`;
6192
6192
  }
6193
6193
  }
6194
+ const focusTarget = !toInput.value ? toInput : !subjectInput.value ? subjectInput : null;
6194
6195
  if (bodyToRender) {
6195
6196
  editor.setHtml(bodyToRender);
6196
- editor.setCursor(0);
6197
+ if (!focusTarget) editor.setCursor(0);
6197
6198
  }
6198
6199
  if (init.draftUid) {
6199
6200
  draftUid = init.draftUid;
@@ -6214,8 +6215,7 @@ function applyInit(init) {
6214
6215
  renderAttachmentChips();
6215
6216
  }
6216
6217
  setComposeTitle(init.subject || "");
6217
- if (!toInput.value) toInput.focus();
6218
- else if (!subjectInput.value) subjectInput.focus();
6218
+ if (focusTarget) focusTarget.focus();
6219
6219
  else editor.focus();
6220
6220
  recordContentBaseline();
6221
6221
  if (init.draftUid && init.draftId) {