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.

fix: detect platform from basePath, not lexicon

standard.site is a LEXICON, not a platform. platforms like pckt, leaflet,
and offprint use the standard.site lexicon.

- backend: migration detects pckt/leaflet from publication basePath
- frontend: shows 'standard.site' when platform unknown (not raw name)
- backfill-pds: also detects platform from basePath post-insert

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

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

zzstoatzz 434e9a5b e53abcab

+42 -5
+15 -1
backend/src/db/schema.zig
··· 143 143 // backfill platform from source_collection for records indexed before platform detection fix 144 144 client.exec("UPDATE documents SET platform = 'leaflet' WHERE platform = 'unknown' AND source_collection LIKE 'pub.leaflet.%'", &.{}) catch {}; 145 145 client.exec("UPDATE documents SET platform = 'pckt' WHERE platform = 'unknown' AND source_collection LIKE 'blog.pckt.%'", &.{}) catch {}; 146 - client.exec("UPDATE documents SET platform = 'standardsite' WHERE platform = 'unknown' AND source_collection LIKE 'site.standard.%'", &.{}) catch {}; 146 + 147 + // detect platform from publication basePath (site.standard.* is a lexicon, not a platform) 148 + // pckt uses site.standard.* lexicon but basePath contains pckt.blog 149 + client.exec( 150 + \\UPDATE documents SET platform = 'pckt' 151 + \\WHERE platform IN ('standardsite', 'unknown') 152 + \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%pckt.blog%') 153 + , &.{}) catch {}; 154 + 155 + // leaflet also uses site.standard.* lexicon, detect by basePath 156 + client.exec( 157 + \\UPDATE documents SET platform = 'leaflet' 158 + \\WHERE platform IN ('standardsite', 'unknown') 159 + \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%leaflet.pub%') 160 + , &.{}) catch {}; 147 161 }
+25 -3
scripts/backfill-pds
··· 133 133 if not isinstance(tags, list): 134 134 tags = [] 135 135 136 - # Determine platform from collection 136 + # Determine platform from collection (site.standard is a lexicon, not a platform) 137 137 if collection.startswith("pub.leaflet"): 138 138 platform = "leaflet" 139 - elif collection.startswith("site.standard"): 140 - platform = "standardsite" 139 + elif collection.startswith("blog.pckt"): 140 + platform = "pckt" 141 141 else: 142 + # site.standard.* and others - platform will be detected from publication basePath 142 143 platform = "unknown" 143 144 144 145 return { ··· 278 279 ) 279 280 print(f" indexed pub: {name}") 280 281 total_pubs += 1 282 + 283 + # post-process: detect platform from publication basePath 284 + if not args.dry_run and (total_docs > 0 or total_pubs > 0): 285 + print("detecting platforms from publication basePath...") 286 + turso_exec( 287 + settings, 288 + """ 289 + UPDATE documents SET platform = 'pckt' 290 + WHERE platform IN ('standardsite', 'unknown') 291 + AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%pckt.blog%') 292 + """, 293 + ) 294 + turso_exec( 295 + settings, 296 + """ 297 + UPDATE documents SET platform = 'leaflet' 298 + WHERE platform IN ('standardsite', 'unknown') 299 + AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%leaflet.pub%') 300 + """, 301 + ) 302 + print(" done") 281 303 282 304 print(f"\ndone! {total_docs} documents, {total_pubs} publications") 283 305
+2 -1
site/index.html
··· 535 535 if (config) { 536 536 return { url: config.home, label: config.label }; 537 537 } 538 - return { url: null, label: platform }; // just show platform name, no link 538 + // unknown platform using standard.site lexicon - link to standard.site 539 + return { url: 'https://standard.site', label: 'standard.site' }; 539 540 } 540 541 541 542 function highlightTerms(text, query) {