• exec/tests/mailbox/store_owner.js store_rows.js store_star.jsexec/load

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Nov 19 15:05:47 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3d25d13289a385d7e81155cb
    Added Files:
    exec/tests/mailbox/store_owner.js store_rows.js store_star.js
    Modified Files:
    exec/load/mailbox.js mailbox_tags.js exec/tests/mailbox/read.js store_read.js store_write.js tags.js
    Log Message:
    Mailbox library: stars as an attribute, cached list rows, 16-bit users

    Three changes to the stock mailbox library (exec/load/mailbox*.js)
    that the web mail client needs. Nothing but that client calls the
    library yet.

    - A starred message has the MSG_VALIDATED attribute, in the mail base
    and in a private mailbox alike, in place of a "$Starred" tag. It is
    the bit the IMAP service shows as \Flagged (#1369 asks for IMAP to
    let a user set it on their own mail). Being an index attribute, a
    star is read on every call without opening a header, and it stays
    with a message moved between the bases, to Trash and back.
    - The list rows of mail in the shared base (sender, subject, dates,
    size) are kept in the per-user cache the library already had, so a
    page of the Inbox and a search read no headers for messages seen
    before. Read, replied, spam and star still come from the index on
    every call. Measured by counting file operations for a 500-message
    Inbox and a 2,000-message private mailbox: a page of the Inbox went
    from 1,335 to about 510, a search from 8,449 to about 390. Rows are
    cached only for records the user owns.
    - A user number above 65535 is refused. The mail index holds user
    numbers in 16 bits and the stock mail code matches on that field, so
    mail cannot work for such a user.

    Also: reading a message can mark it read and return only its list row
    (for a message the caller already holds).

    Tests are in exec/tests/mailbox. Run on Linux only.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net