imsd-messages/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 53bc4797bc
Store, Sync, main: a deleted text stays deleted
imsd keeps a received text until an app deletes it, and a delete can be
refused (polkit, for a session that is not the active one) or time out:
the List after the next start would carry the text again and the app
would import it again (within a run Sync's own record of what it
imported keeps it out). And a deleted row is a tombstone whose bytes
stay in the file until it is rewritten.

The store gains a second table, erased.cdb: the imsd ids of received
texts the user deleted while imsd may still hold their copies, its
format held by the build as the first table's is. Erase and
EraseConversation remember the id before the row goes (a crash between
the two leaves a remembered id, never a text that comes back; a
remembering the store refuses refuses the delete), ImsdIds folds the
remembered ids in, so Sync's `known` keeps a List from importing them,
and ForgetErased drops the ids a List no longer carries — of those
remembered before that List was sent: an id remembered while it was in
flight waits for the next (FetchList's `before` snapshot). Sync's Erase
and EraseConversation go to the store; Fail and the Send continuation
check that the row still exists, so a text deleted while its Send is in
flight takes no late word, and a late answer for a deleted message finds
no row and is logged. main compacts both files at start when either
holds deleted rows or bytes an update or a delete orphaned (a state
reason replaced by another can leave some, so a start after a send may
rewrite both with nothing deleted), and opens the store again on what is
there if the rewrite failed: a deleted text's bytes leave the files at
the next start (a resident instance keeps them until then — nothing
holds a row id across the rewrite but the app itself).

Tested: tests/Store — the remembered ids across a reopen and as known, a
deleted sent text's id not remembered, the ids imsd no longer lists
forgotten, the bytes of deleted texts and forgotten ids gone after the
Compact and a reopen while the kept ones stay, a forgotten id alone
enough for a Compact, the second file private and rewritten with the
first; tests/Sync — a message deleted while it is sending (its late
answers write nothing and are logged), a received text imported,
remembered when deleted and forgotten when no longer listed, a text
signalled while a List is in flight kept by the List sent before the
delete — which forgets the id remembered before it went out — and
forgotten by the next, and a state for another client's text leaving
every message alone.
2026-11-18 01:12:27 +01:00
..
ImsdMessages-Edit.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages-Gesture.cppm Gesture: taps, long presses, drags and flings from pointer phases 2026-11-18 01:12:27 +01:00
ImsdMessages-Model.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages-Number.cppm main: show the window; --screenshot and --quit-after 2026-11-18 01:12:27 +01:00
ImsdMessages-Store.cppm Store, Sync, main: a deleted text stays deleted 2026-11-18 01:12:27 +01:00
ImsdMessages-Sync.cppm Store, Sync, main: a deleted text stays deleted 2026-11-18 01:12:27 +01:00
ImsdMessages-Time.cppm Time: ISO 8601 stamps, civil dates and the captions 2026-11-17 06:14:18 +01:00
ImsdMessages-Wrap.cppm Wrap: word wrap and ellipsis over a measure function 2026-11-17 06:14:18 +01:00
ImsdMessages.Bus-Client.cppm Bus: the GDBus client, imsd's dictionaries, the notifier and the owned name 2026-11-18 01:12:27 +01:00
ImsdMessages.Bus-Instance.cppm Bus: the GDBus client, imsd's dictionaries, the notifier and the owned name 2026-11-18 01:12:27 +01:00
ImsdMessages.Bus-Notifier.cppm main: show the window; --screenshot and --quit-after 2026-11-18 01:12:27 +01:00
ImsdMessages.Bus-Variant.cppm Bus: the GDBus client, imsd's dictionaries, the notifier and the owned name 2026-11-18 01:12:27 +01:00
ImsdMessages.Bus.cppm Bus: the GDBus client, imsd's dictionaries, the notifier and the owned name 2026-11-18 01:12:27 +01:00
ImsdMessages.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui-App.cppm Ui, main: closing the window hides it; Activate shows it again 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui-Canvas.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui-Compose.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui-Loop.cppm Ui: the window on Crafter.Graphics, driven from the GLib main loop 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui-Screens.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00
ImsdMessages.Ui.cppm Ui: the compose field and the send bar 2026-11-18 01:12:27 +01:00