-
Morphit v1.24.1
StableAll checks were successfulmorphit-ci / Supply-chain audit gate (every advisory triaged, none fixable in range) (push) Successful in 1m2smorphit-ci / TypeScript typecheck (sweep all workspaces) (push) Successful in 1m22smorphit-ci / apps/web svelte-check (svelte-kit sync + svelte-aware tsc) (push) Successful in 56smorphit-ci / Integration tests (real Postgres 16) (push) Successful in 7m56smorphit-ci / ansible-lint (playbook quality gate) (push) Successful in 47smorphit-ci / Smoke suite (run-smokes.sh, pulses 1–2 of 3) (push) Successful in 1h10m23smorphit-ci / Smoke suite (run-smokes.sh, pulse 3 of 3) (push) Successful in 35m52smorphit-release / Build + publish release tarball (push) Successful in 49m30sreleased this
2026-11-11 03:48:45 +00:00 | 3 commits to main since this releaseMorphit v1.24.1
The browser tab no longer shows unread messages you have already read.
This release contains everything in v1.24.0. The deadline v1.23.5 set still stands: every site must
run v1.23.5 or later (so this release is fine) before 2026-11-22 00:00 UTC.For people using the site
A tab left open in the background shows only what is really unread. A Morphit tab left open
could show "(2)" in its title, with a red dot on its icon, for messages you had already read on your
phone or that were not new at all. The count went away the moment you looked at the tab, and there
was nothing new in your inbox. Three things caused it, and all three are fixed:- A message you read on your phone or in another tab stayed counted. A new message lights
the badge as soon as it arrives, before the site's records have it. The tab then waits for those
records to catch up. It dated the message by your computer's clock when the alert arrived, a
moment after the message's real time on the chain, so the records never seemed to catch up.
Every alert now carries the message's own time. - A tab in the background checked for news only when a new message came in. Reading a message
elsewhere isn't news, so the tab never found out. It now also checks about once a minute, and
drops a message the site's records still don't confirm after 10 minutes. - A tab that had locked itself still counted. When the Start button says "Unlock", the tab
knows nothing of what you have read, so every new message counted, read or not. A locked tab now
shows no chat count, as it was meant to, and unlocking brings back the right count at once.
A message you read on your phone stays read on your computer. A message often reaches you
before it is written to the chain. If you opened the conversation and read it then, your other
devices showed it as unread once it was written, until you opened it there too. Your site now
recognises that read and counts it for the message, on every device. It never does so when another
message from the same person, which you have not seen, was written alongside it."Mark all read" holds for a conversation that so far only an alert knows about. It used to show
as unread again once the message was written to the chain. As for every conversation, "Mark all
read" marks it on that device; for such a conversation the mark lasts until the page is reloaded.A message you haven't read still shows on the tab as soon as it arrives, in the background too.
An alert that reaches a computer late, such as one waking from sleep, no longer lights the tab for a
message you have already read.Three limits remain:
- If someone sends two messages within the same three seconds and you leave the conversation after
seeing only the first, the second shows as unread only once it is written to the chain, about a
minute later. The site keeps your place by time, and the two share it. - For the same reason, a second alert for a message you have just read, such as one arriving late,
can show it as unread on that device for a minute or two, until your site's answer about the read
comes back. - The alert's timing works once your browser runs this version's background helper. The site
offers it with its usual "Load it now".
For operators
Upgrade as usual. The indexer applies migration v74 when it starts: one new column,
chat_messages.sent_at, filled for messages indexed from now on. It changes nothing for an older
indexer, so rolling back stays possible.A Morphit tab left open in the background, signed in and unlocked, now asks your indexer for its
conversations and read state about once a minute (/v1/conversations/<account>and
/v1/chat-read-state/<account>), besides when a message arrives. A locked or signed-out tab still
asks nothing. Nothing to configure.For developers
- The message's time travels with every alert. The indexer's live
chat_activityping now
carriesat: the message's time (createdAt, the head block's time or the sender's signed
time), as the replay always did. The service worker forwards the Web Push'seventAtto the
tabs asat, throughchatPushTabMessage(notifications/chatThread.ts), and the tab passes it
on to the badge. chatUnread.ts.- A pending push is
{ at, seen }:atis the newest pushed message's time,seenis when
its push reached this device. - The durable row reconciles it once
last_message_at >= at, and the read cursor judges it by
at, both on the chain's clock. This device's own acknowledgement and the 10-minute TTL use
seen, the device clock. - A time that is missing, invalid or far in the future (
sanitizeBlockTime) counts as now. An
older message announced late does not replace a newer one. recount()uses the same live-session gate aspoll().- The channel re-polls when the session locks or unlocks.
- A hidden tab polls about every
HIDDEN_POLL_MS(60 s). Each poll recounts, which also drops an
expired push.
- A pending push is
- The read ack of a fast copy (migration v74). The chat handler stores each message's signed
time inchat_messages.sent_at: the expiration less the client's 60 s lead, capped at the block
time. It usessentAtFromExpiry, the rule the fast path dates its copy with, now in
indexer/chatSentAt.tsand re-exported bychatFastFederation.ts. Rows indexed before v74, and
messages applied without their transaction, keepNULL./v1/chat-read-stategives a thread's ack as a message's block time when all of these hold:- a message of the thread was signed at exactly the ack's time and landed within 75 s of it;
- no message of the thread has the ack's time as its block time;
- no other message of the peer's landed between the ack and that message's block signed at or
after the ack, or at an unknown time.
- The second condition matters because the signed time is a head block's time, so an ack of an
earlier message's row can carry the same instant. - The third matters because a message can miss a block and land with the peer's next message,
which the reader has not seen. The rule is never to hide a message to cure a phantom. - The earliest such message is the one read. Legacy peer-wide acks (
'*') are left alone. - Every lookup uses
chat_pair_idx. - The mapping applies to acks sent on chain (the thread view's). The relay's offline notices
still read the raw ack.
- The fast-copy cover (
readState.noteThreadActivity) now ends on a push of the SAME time as
the message read. Every push carries its time now, and one at the read message's time may be
another message signed in the same head block. Keeping the cover would hide that message on this
device for good; ending it can show the read message as unread until the mapped ack arrives.
fastCopyAck.test.tspins both sides. - "Mark all read" acks a pushed-only thread at the message's own time when its push carried
one, with this device's fast-copy cover, as the thread view does. It skips threads the badge does
not count (archived, hidden, blocked), so it never moves their cursor back. The inbox's
placeholder cards do the same (timedAt).listFastPendingsays whether its time istimed, and
ackThreadReadtakes afastCopyflag. Like the rest of "Mark all read", these are acks on this
device only, and the cover is in memory. - Tests.
chatUnread.test.tshas 18 new tests: a read on another device, before and after the durable
row lands; a hidden tab learning of it; a hidden tab dropping an expired push; an unread
control; a locked tab; two messages in a row; an older message announced late; a push
delivered hours late; a device clock running fast; far-future and invalid times; a push before
the first poll answers; the inbox card's verdict in the same cases; and "Mark all read" on a
pushed-only thread, an archived one, and one read further already.test/integration/chat-read-fast-copy.test.tsis new (10 tests, real Postgres).fastCopyAck.test.ts: a push of the same time now ends the cover, one of an older time keeps
it.ackWiring.test.tspins that a placeholder card'stimedAtcomes from a timed push only.test/handlers/chat.test.tshas 2 more, onsent_at.chatThread.test.tsis new.globalChatActivityStream.test.tsdelivers a service-worker message.chatActivityStream.test.tsrequires the live ping's time.- Each part of the fix, undone on its own, fails a test or a smoke: 31 mutations. The one
exception is the inbox card's own reconcile, which is written as the badge's is; no sequence
of reads makes the two differ.
- Smokes.
fastchat-instance-matrix-smokenow tells a replay by its coming beforeready, and requires a
numericat.fast-badge-push-contract-smokeandchat-fast-notification-smokefollow the service worker's
message intochatPushTabMessage.chat-bg-notify-v148-smokeacceptspollNow().schema-migration-coverage-smokepins schema head 74.
For monitoring scripts: changed JSON
- The
chat_activityevent of/v1/chat-activity/:account/streamcarries the message's time in
at(milliseconds) on a live ping too; it wasnullthere before. /v1/chat-read-state/:accountmay give a thread'slast_read_atup to 75 seconds later than the
ack written on chain: the block time of the message whose fast copy the ack read.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
3 downloads
- A message you read on your phone or in another tab stayed counted. A new message lights