notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 40beb3282b8ec8cb50f66eb25d43ccea2408d897
parent 972bb3551ab8a2d0feddac0d4b30c469c8837507
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 16 Feb 2026 17:25:33 -0800

wire PNS into dave startup, bump nostrdb to nip-pns branch

Spawn process_pns thread on first update to unwrap kind-1080 events.
Bump nostrdb dep to 9aeecd3 which adds ndb_process_pns support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
MCargo.lock | 2+-
MCargo.toml | 2+-
Mcrates/notedeck_dave/src/lib.rs | 15++++++++++++++-
3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -3941,7 +3941,7 @@ dependencies = [ [[package]] name = "nostrdb" version = "0.9.0" -source = "git+https://github.com/damus-io/nostrdb-rs?rev=34738d2894d841ac44b1c46e0334a7cf2ca09b34#34738d2894d841ac44b1c46e0334a7cf2ca09b34" +source = "git+https://github.com/damus-io/nostrdb-rs?rev=9aeecd3c4576be0b34df87c26e334e87a39d57e5#9aeecd3c4576be0b34df87c26e334e87a39d57e5" dependencies = [ "bindgen 0.69.5", "cc", diff --git a/Cargo.toml b/Cargo.toml @@ -63,7 +63,7 @@ md5 = "0.7.0" nostr = { version = "0.37.0", default-features = false, features = ["std", "nip44", "nip49"] } nwc = "0.39.0" mio = { version = "1.0.3", features = ["os-poll", "net"] } -nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "34738d2894d841ac44b1c46e0334a7cf2ca09b34" } +nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "9aeecd3c4576be0b34df87c26e334e87a39d57e5" } #nostrdb = "0.6.1" notedeck = { path = "crates/notedeck" } notedeck_chrome = { path = "crates/notedeck_chrome" } diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -1324,9 +1324,22 @@ impl notedeck::App for Dave { // Poll for external spawn-agent commands via IPC self.poll_ipc_commands(); - // Restore sessions from kind-31988 events on first update + // One-time initialization on first update if !self.sessions_restored && self.ai_mode == AiMode::Agentic { self.sessions_restored = true; + + // Process any PNS-wrapped events already in ndb + let pns_ndb = ctx.ndb.clone(); + if let Err(e) = std::thread::Builder::new() + .name("process_pns".into()) + .spawn(move || { + let txn = Transaction::new(&pns_ndb).expect("txn"); + pns_ndb.process_pns(&txn); + }) + { + tracing::error!("failed to spawn process_pns thread: {e}"); + } + self.restore_sessions_from_ndb(ctx); }