Highly ambitious ATProtocol AppView service and sdks

fix validation on reference lookup, fix records search to return results for dids

Changed files
+8 -10
frontend
src
features
slices
records
packages
lexicon-rs
src
validation
field
+4 -3
frontend/src/features/slices/records/handlers.tsx
··· 46 46 // Get URL parameters for collection, author, and search filtering 47 47 const url = new URL(req.url); 48 48 const selectedCollection = url.searchParams.get("collection") || ""; 49 - const selectedAuthor = url.searchParams.get("author") || ""; 50 49 const searchQuery = url.searchParams.get("search") || ""; 51 50 52 51 // Fetch real records if a collection is selected ··· 72 71 collection: { eq: selectedCollection }, 73 72 }), 74 73 ...(searchQuery && 75 - searchQuery.trim() !== "" && { json: { contains: searchQuery } }), 76 - ...(selectedAuthor && { did: { eq: selectedAuthor } }), 74 + searchQuery.trim() !== "" && { 75 + json: { contains: searchQuery }, 76 + $or: { did: { eq: searchQuery } }, 77 + }), 77 78 }, 78 79 limit: 20, 79 80 });
+1 -1
packages/lexicon-rs/src/lib.rs
··· 357 357 )))?; 358 358 359 359 // Validate the record data against the schema 360 - validate_data_against_schema(&record, record_schema, &ctx.with_path(collection)) 360 + validate_data_against_schema(&record, record_schema, &ctx.with_current_lexicon(collection).with_path(collection)) 361 361 } 362 362 363 363 /// Internal function to validate data against a schema
+3 -6
packages/lexicon-rs/src/validation/field/reference.rs
··· 417 417 )) 418 418 })?; 419 419 420 - // Check for circular references 421 - // TODO: Implement circular reference detection when ValidationContext supports it 422 - // For now, we rely on reasonable recursion depth limits 423 - 424 420 // Resolve the reference to get the target schema 421 + // Note: Circular reference detection is handled by ValidationContext.resolve_reference() 425 422 let resolved_schema = Self::resolve_reference(&parsed_ref, ctx)?; 426 423 427 424 // Create a new validation context for the resolved schema ··· 431 428 ctx.with_path(&format!("{}#{}", ctx.current_lexicon_id().unwrap_or("unknown"), def_name)) 432 429 }, 433 430 ParsedReference::GlobalWithFragment { nsid, definition } => { 434 - ctx.with_path(&format!("{}#{}", nsid, definition)) 431 + ctx.with_current_lexicon(nsid).with_path(&format!("{}#{}", nsid, definition)) 435 432 }, 436 433 ParsedReference::GlobalMain(nsid) => { 437 - ctx.with_path(&format!("{}#main", nsid)) 434 + ctx.with_current_lexicon(nsid).with_path(&format!("{}#main", nsid)) 438 435 }, 439 436 }; 440 437