search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

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

refactor: rename standardsite platform to other

standardsite was a misnomer - it's a lexicon (site.standard.*), not a platform.
Documents using this lexicon that don't belong to a known platform (leaflet,
pckt, offprint) are now categorized as "other".

- extractor.zig: rename Platform.standardsite to Platform.other
- schema.zig: migration to rename existing records, update detection queries
- stats.zig: update sample query
- site/index.html: add "other" to platform filter, update empty state

馃 Generated with [Claude Code](https://claude.com/claude-code)

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

zzstoatzz d69f0682 6b3e03ff

+33 -23
+8 -6
backend/src/db/schema.zig
··· 145 145 client.exec("UPDATE documents SET platform = 'leaflet' WHERE platform = 'unknown' AND source_collection LIKE 'pub.leaflet.%'", &.{}) catch {}; 146 146 client.exec("UPDATE documents SET platform = 'pckt' WHERE platform = 'unknown' AND source_collection LIKE 'blog.pckt.%'", &.{}) catch {}; 147 147 148 + // rename 'standardsite' to 'other' (standardsite was a misnomer - it's a lexicon, not a platform) 149 + // documents using site.standard.* that don't match a known platform are simply "other" 150 + client.exec("UPDATE documents SET platform = 'other' WHERE platform = 'standardsite'", &.{}) catch {}; 151 + 148 152 // detect platform from publication basePath (site.standard.* is a lexicon, not a platform) 149 - // pckt uses site.standard.* lexicon but basePath contains pckt.blog 153 + // known platforms (pckt, leaflet, offprint) use site.standard.* but have distinct basePaths 150 154 client.exec( 151 155 \\UPDATE documents SET platform = 'pckt' 152 - \\WHERE platform IN ('standardsite', 'unknown') 156 + \\WHERE platform IN ('other', 'unknown') 153 157 \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%pckt.blog%') 154 158 , &.{}) catch {}; 155 159 156 - // leaflet also uses site.standard.* lexicon, detect by basePath 157 160 client.exec( 158 161 \\UPDATE documents SET platform = 'leaflet' 159 - \\WHERE platform IN ('standardsite', 'unknown') 162 + \\WHERE platform IN ('other', 'unknown') 160 163 \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%leaflet.pub%') 161 164 , &.{}) catch {}; 162 165 163 - // offprint uses site.standard.* lexicon, detect by basePath 164 166 client.exec( 165 167 \\UPDATE documents SET platform = 'offprint' 166 - \\WHERE platform IN ('standardsite', 'unknown') 168 + \\WHERE platform IN ('other', 'unknown') 167 169 \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%offprint.app%' OR base_path LIKE '%offprint.test%') 168 170 , &.{}) catch {}; 169 171
+12 -11
backend/src/extractor.zig
··· 5 5 const zat = @import("zat"); 6 6 7 7 /// Detected platform from collection name 8 - /// Note: pckt and other platforms use site.standard.* collections. 8 + /// Note: pckt, offprint, and other platforms use site.standard.* collections. 9 9 /// Platform detection from collection only distinguishes leaflet (custom lexicon) 10 - /// from site.standard users. Actual platform (pckt vs others) is detected later 11 - /// from publication basePath. 10 + /// from site.standard users. Actual platform (pckt/offprint/etc) is detected later 11 + /// from publication basePath. Documents that don't match any known platform are "other". 12 12 pub const Platform = enum { 13 13 leaflet, 14 - standardsite, // pckt and others using site.standard.* lexicon 14 + other, // site.standard.* documents not matching a known platform 15 15 unknown, 16 16 17 17 pub fn fromCollection(collection: []const u8) Platform { 18 18 if (mem.startsWith(u8, collection, "pub.leaflet.")) return .leaflet; 19 - if (mem.startsWith(u8, collection, "site.standard.")) return .standardsite; 19 + if (mem.startsWith(u8, collection, "site.standard.")) return .other; 20 20 return .unknown; 21 21 } 22 22 ··· 239 239 try std.testing.expectEqual(Platform.leaflet, Platform.fromCollection("pub.leaflet.publication")); 240 240 } 241 241 242 - test "Platform.fromCollection: standardsite" { 243 - // pckt and others use site.standard.* collections 244 - try std.testing.expectEqual(Platform.standardsite, Platform.fromCollection("site.standard.document")); 245 - try std.testing.expectEqual(Platform.standardsite, Platform.fromCollection("site.standard.publication")); 242 + test "Platform.fromCollection: other (site.standard.*)" { 243 + // pckt, offprint, and others use site.standard.* collections 244 + // detected as "other" initially, then corrected by basePath in schema migrations 245 + try std.testing.expectEqual(Platform.other, Platform.fromCollection("site.standard.document")); 246 + try std.testing.expectEqual(Platform.other, Platform.fromCollection("site.standard.publication")); 246 247 } 247 248 248 249 test "Platform.fromCollection: unknown" { ··· 252 253 253 254 test "Platform.name" { 254 255 try std.testing.expectEqualStrings("leaflet", Platform.leaflet.name()); 255 - try std.testing.expectEqualStrings("standardsite", Platform.standardsite.name()); 256 + try std.testing.expectEqualStrings("other", Platform.other.name()); 256 257 try std.testing.expectEqualStrings("unknown", Platform.unknown.name()); 257 258 } 258 259 259 260 test "Platform.displayName" { 260 261 try std.testing.expectEqualStrings("leaflet", Platform.leaflet.displayName()); 261 - try std.testing.expectEqualStrings("standardsite", Platform.standardsite.displayName()); 262 + try std.testing.expectEqualStrings("other", Platform.other.displayName()); 262 263 }
+2 -2
backend/src/stats.zig
··· 142 142 } else |_| try jw.write(0); 143 143 144 144 // sample URIs from each platform (for debugging) 145 - try jw.objectField("sample_standardsite"); 146 - if (c.query("SELECT uri FROM documents WHERE platform = 'standardsite' LIMIT 3", &.{})) |res_val| { 145 + try jw.objectField("sample_other"); 146 + if (c.query("SELECT uri FROM documents WHERE platform = 'other' LIMIT 3", &.{})) |res_val| { 147 147 var res = res_val; 148 148 defer res.deinit(); 149 149 try jw.beginArray();
+11 -4
site/index.html
··· 504 504 <div id="results" class="results"> 505 505 <div class="empty-state"> 506 506 <p>search atproto publishing platforms</p> 507 - <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a></p> 507 + <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a> 路 <a href="https://standard.site" target="_blank">other</a></p> 508 508 </div> 509 509 </div> 510 510 ··· 656 656 home: 'https://offprint.app', 657 657 label: 'offprint.app', 658 658 // offprint is in early beta, URL pattern unknown 659 + docUrl: null 660 + }, 661 + other: { 662 + home: 'https://standard.site', 663 + label: 'other', 664 + // "other" = site.standard.* documents not from a known platform 659 665 docUrl: null 660 666 }, 661 667 }; ··· 705 711 if (config) { 706 712 return { url: config.home, label: config.label }; 707 713 } 708 - // unknown platform using standard.site lexicon - link to standard.site 709 - return { url: 'https://standard.site', label: 'standard.site' }; 714 + // fallback for documents without a known platform - link to standard.site lexicon 715 + return { url: 'https://standard.site', label: 'other' }; 710 716 } 711 717 712 718 function highlightTerms(text, query) { ··· 788 794 { id: 'leaflet', label: 'leaflet' }, 789 795 { id: 'pckt', label: 'pckt' }, 790 796 { id: 'offprint', label: 'offprint' }, 797 + { id: 'other', label: 'other' }, 791 798 ]; 792 799 const html = platforms.map(p => ` 793 800 <span class="platform-option${currentPlatform === p.id ? ' active' : ''}" onclick="setPlatform('${p.id}')">${p.label}</span> ··· 872 879 resultsDiv.innerHTML = ` 873 880 <div class="empty-state"> 874 881 <p>search atproto publishing platforms</p> 875 - <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a></p> 882 + <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a> 路 <a href="https://standard.site" target="_blank">other</a></p> 876 883 </div> 877 884 `; 878 885 }