app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit d388f35614a1e5b4e92a8858464a8a22fe46f561
parent e186e039495c230ff08fdaabbf57e3884fea4756
Author: triesap <tyson@radroots.org>
Date:   Sat, 21 Mar 2026 22:20:33 +0000

web: report offline geocoder as unavailable

- expose offline geocoder runtime state on the wasm backend without attempting a blocking loader path
- keep the web app startup independent from geocoder initialization so missing offline geocoding never blocks browser-signer flows
- surface a user-facing unavailable message and a concrete debug reason about the current rusqlite-based runtime limitation
- validate the web slice through the repo wasm toolchain helper for the wasm32 target

Diffstat:
Mcrates/web/src/lib.rs | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/crates/web/src/lib.rs b/crates/web/src/lib.rs @@ -16,7 +16,7 @@ use nostr_browser_signer::{BrowserSigner, Error as BrowserSignerError}; #[cfg(target_arch = "wasm32")] use radroots_app_core::{ HomeActionKind, HomeActionResult, HomeActionState, IdentityGateState, RadrootsApp, - RadrootsAppBackend, SetupActionState, + RadrootsAppBackend, RadrootsOfflineGeocoderState, SetupActionState, }; #[cfg(target_arch = "wasm32")] @@ -80,6 +80,15 @@ impl WebBackend { state.pending_result = None; IdentityGateState::Missing } + + fn offline_geocoder_unavailable_state() -> RadrootsOfflineGeocoderState { + RadrootsOfflineGeocoderState::Unavailable { + user_message: "Offline geocoder is not available in this web build.".to_owned(), + debug_message: + "radroots-geocoder currently depends on rusqlite and is not wired for wasm runtime initialization." + .to_owned(), + } + } } #[cfg(target_arch = "wasm32")] @@ -94,6 +103,10 @@ impl RadrootsAppBackend for WebBackend { } } + fn offline_geocoder_state(&self) -> Option<RadrootsOfflineGeocoderState> { + Some(Self::offline_geocoder_unavailable_state()) + } + fn setup_action_state(&self) -> SetupActionState { let state = self.state.borrow(); match &state.connection {