From ac23270ac53aba5adb1803256bdcaee8fffbb680 Mon Sep 17 00:00:00 2001 From: Vincent Taverna Date: Mon, 16 Nov 2026 19:38:11 -0500 Subject: [PATCH] fix(sample): serve an empty linked tag summary --- crates/libbui/src/sample/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/libbui/src/sample/mod.rs b/crates/libbui/src/sample/mod.rs index 771cc42..dcf5124 100644 --- a/crates/libbui/src/sample/mod.rs +++ b/crates/libbui/src/sample/mod.rs @@ -547,6 +547,14 @@ impl Api for SampleApi { }) } + async fn tags(&self) -> libby::Result { + let _state = self.linked()?; + Ok(libby::models::TagSummary { + tags: Vec::new(), + extra: Default::default(), + }) + } + async fn cover_bytes(&self, url: &Url) -> libby::Result> { Ok(cover::render(url)) } @@ -598,6 +606,14 @@ mod tests { ); } + #[tokio::test] + async fn tag_summary_is_empty_and_requires_a_linked_account() { + let api = api(); + assert!(api.tags().await.unwrap().tags.is_empty()); + api.sign_out(); + assert!(matches!(api.tags().await, Err(libby::Error::Unlinked))); + } + #[tokio::test] async fn search_matches_every_word_and_pages() { let api = api(); -- knotmirror 0.0.1