Thread viewer for Bluesky

show parent link for posts with broken threading

For a post that breaks threadgate rules, AppView doesn't return a parent field, but it can be reconstructed from the parent.uri in the record

Changed files
+9
+9
thread_page.js
··· 65 65 if (root.parent) { 66 66 let p = this.buildParentLink(root.parent); 67 67 $id('thread').appendChild(p); 68 + } else if (root.parentReference) { 69 + let { repo, rkey } = atURI(root.parentReference.uri); 70 + let url = linkToPostById(repo, rkey); 71 + 72 + let handle = api.findHandleByDid(repo); 73 + let link = handle ? `See parent post (@${handle})` : "See parent post"; 74 + 75 + let p = $tag('p.back', { html: `<i class="fa-solid fa-reply"></i><a href="${url}">${link}</a>` }); 76 + $id('thread').appendChild(p); 68 77 } 69 78 } 70 79