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: use path slug instead of rkey for pckt URLs on atlas

pckt uses slug-based paths (e.g., /da-premier-post-9dmgs7z) not rkeys
in URLs. Include the path field from turbopuffer in atlas.json and
use it in atUriToUrl when available, matching the backend's
buildDocUrl logic.

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

+12 -3
+3 -1
scripts/build-atlas
··· 60 60 "Authorization": f"Bearer {settings.turbopuffer_api_key}", 61 61 "Content-Type": "application/json", 62 62 } 63 - attrs = ["uri", "title", "platform", "base_path", "did", "vector"] 63 + attrs = ["uri", "title", "platform", "base_path", "path", "did", "vector"] 64 64 all_rows = [] 65 65 last_id = None 66 66 ··· 191 191 "title": row.get("title", ""), 192 192 "platform": row.get("platform", "other"), 193 193 "basePath": row.get("base_path", ""), 194 + "path": row.get("path", ""), 194 195 "did": row.get("did", ""), 195 196 }) 196 197 ··· 303 304 "title": meta["title"], 304 305 "platform": meta["platform"], 305 306 "basePath": meta["basePath"], 307 + "path": meta["path"], 306 308 "clusterCoarse": int(labels_coarse[i]), 307 309 "clusterFine": int(labels_fine[i]), 308 310 })
+9 -2
site/atlas.js
··· 506 506 if (dragging) { 507 507 if (Math.abs(e.clientX - dragStartX) < 4 && Math.abs(e.clientY - dragStartY) < 4 && hoveredIndex >= 0) { 508 508 var p = data.points[hoveredIndex]; 509 - var url = atUriToUrl(p.uri, p.basePath, p.platform); 509 + var url = atUriToUrl(p.uri, p.basePath, p.platform, p.path); 510 510 if (url) window.open(url, '_blank'); 511 511 } 512 512 dragging = false; ··· 590 590 canvas.style.cursor = dragging ? 'grabbing' : 'grab'; 591 591 } 592 592 593 - function atUriToUrl(uri, basePath, platform) { 593 + function atUriToUrl(uri, basePath, platform, path) { 594 594 var m = uri.match(/^at:\/\/(did:[^/]+)\/([^/]+)\/(.+)$/); 595 595 if (!m) return null; 596 596 var did = m[1], collection = m[2], rkey = m[3]; 597 597 if (platform === 'whitewind' || collection.startsWith('com.whtwnd.')) return 'https://whtwnd.com/' + did + '/' + rkey; 598 + // leaflet uses rkey directly 599 + if (platform === 'leaflet' && basePath) return 'https://' + basePath + '/' + rkey; 600 + // other platforms (pckt, offprint, etc.) use path slug when available 601 + if (basePath && path) { 602 + var sep = path.charAt(0) === '/' ? '' : '/'; 603 + return 'https://' + basePath + sep + path; 604 + } 598 605 if (basePath) return 'https://' + basePath + '/' + rkey; 599 606 return 'https://pds.pub/at/' + encodeURIComponent(uri); 600 607 }