This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

fix(search): index nameless repos by rkey ofc

Lewis: May this revision serve well! <lu5a@proton.me>

Lewis (May 12, 2026, 10:13 PM +0300) dcd98a01 e537af0b

+20 -1
+20 -1
crates/types/src/search.rs
··· 173 173 if let Some(topics) = &r.topics { 174 174 parts.extend(topics.iter().map(|t| t.as_str().to_owned())); 175 175 } 176 - let title = r.name.as_deref().unwrap_or(""); 176 + let rkey = source.rkey(); 177 + let title = r 178 + .name 179 + .as_deref() 180 + .or_else(|| rkey.as_ref().map(|k| k.as_str())) 181 + .unwrap_or(""); 177 182 doc( 178 183 source, 179 184 "sh.tangled.repo", ··· 338 343 assert!(doc.body.contains("shell index")); 339 344 assert!(doc.body.contains("intertidal")); 340 345 assert!(doc.body.contains("molluscs")); 346 + } 347 + 348 + #[test] 349 + fn repo_without_name_field_falls_back_to_rkey() { 350 + let doc = extract( 351 + "sh.tangled.repo", 352 + "at://did:plc:teq/sh.tangled.repo/limpet", 353 + json!({ 354 + "$type": "sh.tangled.repo", 355 + "knot": "oyster.cafe", 356 + "createdAt": "2026-05-01T00:00:00Z" 357 + }), 358 + ); 359 + assert_eq!(doc.title, "limpet"); 341 360 } 342 361 343 362 #[test]