add trash panel and re-tag stale cached rooms

This commit is contained in:
2026-11-13 21:22:42 +07:00
parent 3484c2c71b
commit eef4acc91f
8 changed files with 300 additions and 21 deletions
+4 -3
View File
@@ -966,9 +966,10 @@ clean, `cargo test --workspace` 38 passed / 0 failed. Diff: 25 files, +1072/−2
(`common::stable_id` 128-bit hex, `stable_id_u64` for u64-keyed consumers); `Event` and
`UnsignedEvent` `uniq_id` impls factored into one `pubkey_set_uniq_id` helper; nip29's
`GroupKey::uniq_id` and `browse_subscription` unified (verified session-local). **Room id
values change** (new hash domain) — existing cached groupings regroup per session as rumors
re-arrive; release notes should mention it. Follow-up if 128-bit ids are wanted: chat's id
fields are u64-typed; migrating to `String` ids is mechanical.
values change** (new hash domain) — follow-up fix after first run: `Room::get_messages`
filters cached history by the persisted `r` tag, so pre-change rows were unreachable
(empty message lists); `query_chat_rooms` now compares each row's `r` tag against the
freshly computed id during its startup scan and re-tags stale rows, restoring history.
11. **nip4e lifecycle** (`nip4e/src/lib.rs`): approval has an `approving` re-entry guard (the
device secret can no longer be double-sent), toast lifecycle is correct on both outcomes
(success clears only the matching request; failure rebuilds the toast with a fresh enabled