mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
Three Phase-3 polish items, bridge-only:
1. Folder CRUD events. A MailSet (typeId 429) event in a batch now flips
the `Bucketed.folder_list_dirty` flag; the handler refreshes the
folder list and prunes any folder that disappeared from the server
(both in-memory and from LocalStore + .eml files). New helpers
`MailStore::prune_unknown_folders` and `LocalStore::delete_folder_mails`.
2. Out-of-sync detection. The server only replays missed batches for
~44 days. At startup we now check the oldest `event_bus_state` row;
if it predates that window we wipe the table so the syncer falls
through to a bootstrap full sync instead of looping on a server
refusal. New helpers `event_bus_state_min_updated_at_ms` and
`clear_event_bus_state`.
3. Model versions. Drop the hard-coded `SYS_MODEL_VERSION = 150` /
`TUTANOTA_MODEL_VERSION = 108` and read them at compile time from the
vendored SDK's `type_models/{sys,tutanota}.json` via `include_str!` +
`LazyLock`. They now track every SDK submodule bump automatically.
154/154 lib tests pass (6 new across bucket_marks_folder_list_dirty,
prune_unknown_folders, delete_folder_mails, event_bus_state min+clear,
parse_model_version + sanity check on the included JSON).