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: greengale basePath resolution + tag input CSS

- delete stale publication/self records that cause wrong basePath lookups
- add platform-aware fallback: match greengale docs to greengale pubs
- re-derive basePath for affected documents
- fix tag input CSS specificity (input.tag-input beats input[type="text"])

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

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

zzstoatzz aa35fe00 97772b90

+60 -5
+32
backend/src/db/schema.zig
··· 200 200 201 201 // note: publications_fts was rebuilt with base_path column via scripts/rebuild-pub-fts 202 202 // new publications will include base_path via insertPublication in indexer.zig 203 + 204 + // 2026-01-22: clean up stale publication/self records that were deleted from ATProto 205 + // these cause incorrect basePath lookups for greengale documents 206 + // specifically: did:plc:27ivzcszryxp6mehutodmcxo had publication/self with basePath 'greengale.app' 207 + // but that publication was deleted, and the correct one is 'greengale.app/3fz.org' 208 + client.exec( 209 + \\DELETE FROM publications WHERE rkey = 'self' 210 + \\AND base_path = 'greengale.app' 211 + \\AND did = 'did:plc:27ivzcszryxp6mehutodmcxo' 212 + , &.{}) catch {}; 213 + client.exec( 214 + \\DELETE FROM publications_fts WHERE uri IN ( 215 + \\ SELECT 'at://' || did || '/site.standard.publication/self' 216 + \\ FROM publications WHERE rkey = 'self' AND base_path = 'greengale.app' 217 + \\) 218 + , &.{}) catch {}; 219 + 220 + // re-derive basePath for greengale documents that got wrong basePath 221 + // match documents to greengale publications (basePath contains greengale.app) 222 + // prefer more specific basePaths (with subdomain) 223 + client.exec( 224 + \\UPDATE documents SET base_path = ( 225 + \\ SELECT p.base_path FROM publications p 226 + \\ WHERE p.did = documents.did 227 + \\ AND p.base_path LIKE 'greengale.app/%' 228 + \\ ORDER BY LENGTH(p.base_path) DESC 229 + \\ LIMIT 1 230 + \\) 231 + \\WHERE platform = 'greengale' 232 + \\AND (base_path = 'greengale.app' OR base_path LIKE '%pckt.blog%') 233 + \\AND did IN (SELECT did FROM publications WHERE base_path LIKE 'greengale.app/%') 234 + , &.{}) catch {}; 203 235 }
+25 -2
backend/src/indexer.zig
··· 46 46 } 47 47 } else |_| {} 48 48 } 49 - // fallback: find any publication by this DID 49 + // fallback: find publication by DID, preferring platform-specific matches 50 50 if (base_path.len == 0) { 51 - if (c.query("SELECT base_path FROM publications WHERE did = ? LIMIT 1", &.{did})) |res| { 51 + // try platform-specific publication first 52 + const platform_pattern: []const u8 = if (std.mem.eql(u8, platform, "greengale")) 53 + "%greengale.app%" 54 + else if (std.mem.eql(u8, platform, "pckt")) 55 + "%pckt.blog%" 56 + else if (std.mem.eql(u8, platform, "offprint")) 57 + "%offprint.app%" 58 + else if (std.mem.eql(u8, platform, "leaflet")) 59 + "%leaflet.pub%" 60 + else 61 + "%"; 62 + 63 + if (c.query("SELECT base_path FROM publications WHERE did = ? AND base_path LIKE ? ORDER BY LENGTH(base_path) DESC LIMIT 1", &.{ did, platform_pattern })) |res| { 52 64 var result = res; 53 65 defer result.deinit(); 54 66 if (result.first()) |row| { 55 67 base_path = row.text(0); 56 68 } 57 69 } else |_| {} 70 + 71 + // if no platform-specific match, fall back to any publication 72 + if (base_path.len == 0) { 73 + if (c.query("SELECT base_path FROM publications WHERE did = ? ORDER BY LENGTH(base_path) DESC LIMIT 1", &.{did})) |res| { 74 + var result = res; 75 + defer result.deinit(); 76 + if (result.first()) |row| { 77 + base_path = row.text(0); 78 + } 79 + } else |_| {} 80 + } 58 81 } 59 82 60 83 try c.exec(
+3 -3
site/index.html
··· 331 331 margin-left: 4px; 332 332 } 333 333 334 - .tag-input { 334 + input.tag-input { 335 335 font-size: 11px; 336 336 padding: 3px 8px; 337 337 background: #111; ··· 342 342 width: 100px; 343 343 } 344 344 345 - .tag-input:focus { 345 + input.tag-input:focus { 346 346 outline: none; 347 347 border-color: #1B7340; 348 348 color: #ccc; 349 349 } 350 350 351 - .tag-input::placeholder { 351 + input.tag-input::placeholder { 352 352 color: #555; 353 353 font-style: italic; 354 354 }