@bobfrankston/rmfmail 1.2.302 → 1.2.303
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 +47 -49
- package/client/android-bootstrap.bundle.js +25 -9
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/styles/components.css +6 -1
- package/npmchanges.md +52 -0
- package/package.json +4 -4
- package/packages/mailx-store-web/db.d.ts +1 -1
- package/packages/mailx-store-web/db.d.ts.map +1 -1
- package/packages/mailx-store-web/db.js +28 -4
- package/packages/mailx-store-web/db.js.map +1 -1
- package/packages/mailx-store-web/db.ts +28 -4
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-service.d.ts +2 -2
- package/packages/mailx-store-web/web-service.d.ts.map +1 -1
- package/packages/mailx-store-web/web-service.js +15 -5
- package/packages/mailx-store-web/web-service.js.map +1 -1
- package/packages/mailx-store-web/web-service.ts +14 -4
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-54400 → node_modules.npmglobalize-stash-42308}/.package-lock.json +0 -0
package/.commitmsg
CHANGED
|
@@ -1,49 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
call is wired; whether a payload that size survives one EvaluateJavaScriptAsync
|
|
49
|
-
can only be answered on the device. If it does not, the new log line names it.
|
|
1
|
+
The phone's star filter was never asked for, and the chip announcing it landed in a 28px column
|
|
2
|
+
|
|
3
|
+
"it then says no flagged messages. but there are message flagged" (Bob
|
|
4
|
+
2026-09-04, on Android, with the screenshot). There are 260 — 257 in bobma's
|
|
5
|
+
INBOX alone, and the desktop's own SQL finds every one of them.
|
|
6
|
+
|
|
7
|
+
`WebMailxService.getUnifiedInbox` took two parameters. api-client has always
|
|
8
|
+
called it with four: `(page, pageSize, flaggedOnly, dateBasis)`. `getMessages`
|
|
9
|
+
took seven and is called with nine, `flaggedOnly` at position 8. The extras
|
|
10
|
+
fell off the end and JavaScript said nothing — and neither did TypeScript,
|
|
11
|
+
because an implementation with FEWER parameters satisfies an interface
|
|
12
|
+
declaring more. Both dropped arguments are on `MessageQuery`, documented, and
|
|
13
|
+
honoured by the desktop store.
|
|
14
|
+
|
|
15
|
+
What was left on the phone was the client's `.flagged-only` CSS rule, which
|
|
16
|
+
hides unflagged rows in the loaded page. That is precisely the arrangement the
|
|
17
|
+
desktop comment has warned about since 2026-06-05: a paginated list whose
|
|
18
|
+
newest 50 messages happen to carry no star shows nothing at all, and every
|
|
19
|
+
starred message deeper in the mailbox is unreachable. The overlay then counted
|
|
20
|
+
the rows it was hiding and reported the truth from where it stood — "A 'flagged
|
|
21
|
+
only' filter is hiding 50 messages" — while the filter that could have found
|
|
22
|
+
the other 260 had never run.
|
|
23
|
+
|
|
24
|
+
Both parameters are now threaded through, and the `\Flagged` predicate lives in
|
|
25
|
+
one named constant matching desktop's character for character: two backslashes
|
|
26
|
+
in the SQL literal, because `flags_json` is JSON and the flag is stored
|
|
27
|
+
escaped. `dateBasis` was dropped by the same omission on the same line, so the
|
|
28
|
+
phone has been ordering by arrival time while the desktop ordered by the Date:
|
|
29
|
+
header; it now honours what it is handed. That is a visible change to list
|
|
30
|
+
order on the phone, and it is the order the client has been asking for all
|
|
31
|
+
along — say so if you want it left as it was.
|
|
32
|
+
|
|
33
|
+
Three tests assert the threading, which is where the bug was. They use a spy
|
|
34
|
+
db, since the failure was an argument that never arrived, not SQL that got it
|
|
35
|
+
wrong.
|
|
36
|
+
|
|
37
|
+
**The chip, separately.** `#ml-filter-chip` said `display: block; width: 100%`
|
|
38
|
+
and never said `grid-column: 1 / -1`. `.message-list` is a five-column grid,
|
|
39
|
+
every other full-width child declares the span, and this one auto-placed into
|
|
40
|
+
column 1 — the 28px avatar track — so "Showing flagged (★) messages only —
|
|
41
|
+
click to show everything" came out one word per line down the left edge of the
|
|
42
|
+
header. `width: 100%` cannot help there; inside a grid it means 100% of a 28px
|
|
43
|
+
track.
|
|
44
|
+
|
|
45
|
+
Not changed: the ★ button sits in the search row, next to Server and
|
|
46
|
+
Trash/Spam, which is why reaching for search found a list filter. That is a
|
|
47
|
+
placement judgement, not a bug, so it is yours to call.
|
|
@@ -5855,6 +5855,7 @@ var sql_wasm_default = __toBinary("AGFzbQEAAAABnwRFYAJ/fwF/YAF/AX9gA39/fwBgA39/f
|
|
|
5855
5855
|
|
|
5856
5856
|
// packages/mailx-store-web/db.js
|
|
5857
5857
|
init_mailx_types();
|
|
5858
|
+
var FLAGGED_SQL = " AND flags_json LIKE '%\\\\Flagged%'";
|
|
5858
5859
|
var JUNK_LOCAL_RE = new RegExp(CONTACT_RULES.junk.localExact, "i");
|
|
5859
5860
|
var JUNK_LOCAL_SUFFIX_RE = new RegExp(CONTACT_RULES.junk.localSuffix, "i");
|
|
5860
5861
|
var JUNK_LOCAL_PREFIX_RE = new RegExp(CONTACT_RULES.junk.localPrefix, "i");
|
|
@@ -6304,7 +6305,8 @@ var WebMailxDB = class {
|
|
|
6304
6305
|
const page = query.page || 1;
|
|
6305
6306
|
const pageSize = query.pageSize || 50;
|
|
6306
6307
|
const offset = (page - 1) * pageSize;
|
|
6307
|
-
const
|
|
6308
|
+
const dateCol = query.dateBasis === "received" ? "date" : "COALESCE(sent_date, date)";
|
|
6309
|
+
const sortCol = query.sort === "from" ? "from_name" : query.sort === "subject" ? "subject" : dateCol;
|
|
6308
6310
|
const sortDir = query.sortDir || "desc";
|
|
6309
6311
|
let where = "account_id = ? AND folder_id = ?";
|
|
6310
6312
|
const params = [query.accountId, query.folderId];
|
|
@@ -6313,21 +6315,25 @@ var WebMailxDB = class {
|
|
|
6313
6315
|
const term = `%${query.search}%`;
|
|
6314
6316
|
params.push(term, term, term);
|
|
6315
6317
|
}
|
|
6318
|
+
if (query.flaggedOnly)
|
|
6319
|
+
where += FLAGGED_SQL;
|
|
6316
6320
|
const countRow = this.get(`SELECT COUNT(*) as cnt FROM messages WHERE ${where}`, params);
|
|
6317
6321
|
const total = countRow?.cnt || 0;
|
|
6318
6322
|
const rows = this.all(`SELECT * FROM messages WHERE ${where} ORDER BY ${sortCol} ${sortDir} LIMIT ? OFFSET ?`, [...params, pageSize, offset]);
|
|
6319
6323
|
return { items: rows.map((r) => this.rowToEnvelope(r)), total, page, pageSize };
|
|
6320
6324
|
}
|
|
6321
|
-
getUnifiedInbox(page = 1, pageSize = 50) {
|
|
6325
|
+
getUnifiedInbox(page = 1, pageSize = 50, flaggedOnly = false, dateBasis = "sent") {
|
|
6322
6326
|
const offset = (page - 1) * pageSize;
|
|
6323
6327
|
const inboxRows = this.all("SELECT id FROM folders WHERE special_use = 'inbox'");
|
|
6324
6328
|
if (inboxRows.length === 0)
|
|
6325
6329
|
return { items: [], total: 0, page, pageSize };
|
|
6326
6330
|
const ids = inboxRows.map((r) => r.id);
|
|
6327
6331
|
const placeholders = ids.map(() => "?").join(",");
|
|
6328
|
-
const
|
|
6332
|
+
const flagFilter = flaggedOnly ? FLAGGED_SQL : "";
|
|
6333
|
+
const dateCol = dateBasis === "received" ? "date" : "COALESCE(sent_date, date)";
|
|
6334
|
+
const countRow = this.get(`SELECT COUNT(*) as cnt FROM messages WHERE folder_id IN (${placeholders})${flagFilter}`, ids);
|
|
6329
6335
|
const total = countRow?.cnt || 0;
|
|
6330
|
-
const rows = this.all(`SELECT * FROM messages WHERE folder_id IN (${placeholders}) ORDER BY
|
|
6336
|
+
const rows = this.all(`SELECT * FROM messages WHERE folder_id IN (${placeholders})${flagFilter} ORDER BY ${dateCol} DESC LIMIT ? OFFSET ?`, [...ids, pageSize, offset]);
|
|
6331
6337
|
return { items: rows.map((r) => this.rowToEnvelope(r)), total, page, pageSize };
|
|
6332
6338
|
}
|
|
6333
6339
|
getMessageByUid(accountId, uid, folderId) {
|
|
@@ -6936,11 +6942,21 @@ var WebMailxService = class _WebMailxService {
|
|
|
6936
6942
|
return this.db.getFolders(accountId);
|
|
6937
6943
|
}
|
|
6938
6944
|
// ── Messages ──
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6945
|
+
// 2026-09-04 — Claude Code (Opus 5), at Bob's direction ("it then says no
|
|
6946
|
+
// flagged messages. but there are message flagged" — 260 of them). Both of
|
|
6947
|
+
// these took two or seven parameters while api-client has always CALLED
|
|
6948
|
+
// them with four and nine: `flaggedOnly` and `dateBasis` fell off the end
|
|
6949
|
+
// and JavaScript said nothing. The star filter therefore existed on the
|
|
6950
|
+
// phone only as the client's `.flagged-only` CSS rule, which can hide
|
|
6951
|
+
// unflagged rows in the loaded page but cannot reach a starred message on
|
|
6952
|
+
// page 4 — so a list whose newest 50 carry no star reads as "no flagged
|
|
6953
|
+
// messages". Keep these signatures in step with api-client's calls; the
|
|
6954
|
+
// language will not do it for you.
|
|
6955
|
+
getUnifiedInbox(page = 1, pageSize = 50, flaggedOnly = false, dateBasis = "sent") {
|
|
6956
|
+
return this.db.getUnifiedInbox(page, pageSize, flaggedOnly, dateBasis);
|
|
6957
|
+
}
|
|
6958
|
+
getMessages(accountId, folderId, page = 1, pageSize = 50, sort = "date", sortDir = "desc", search, flaggedOnly = false, dateBasis = "sent") {
|
|
6959
|
+
return this.db.getMessages({ accountId, folderId, page, pageSize, sort, sortDir, search, flaggedOnly, dateBasis });
|
|
6944
6960
|
}
|
|
6945
6961
|
async getMessage(accountId, uid, allowRemote = false, folderId) {
|
|
6946
6962
|
const envelope = this.db.getMessageByUid(accountId, uid, folderId);
|