Diagnostics for atproto PDS hosts, DIDs, and handles: https://debug.hose.cam

Compare changes

Choose any two refs to compare.

+147 -49
index.html
··· 89 89 hostname: 'relay1.us-west.bsky.network', 90 90 }, 91 91 ]; 92 + 93 + window.regionalModAccounts = [ // https://github.com/mary-ext/atproto-scraping?tab=readme-ov-file#bluesky-labelers 94 + 'https://mod-br.bsky.app', 95 + 'https://mod-de.bsky.app', 96 + 'https://mod-in.bsky.app', 97 + 'https://mod-ru.bsky.app', 98 + 'https://mod-tr.bsky.app', 99 + ]; 100 + 101 + window.bskyAccountDeathLabels = { 102 + ['needs-review']: 'Automated action, cleared by manual review from Bluesky moderation team. Your content can ve accessed via direct links on Bluesky, but invisible in feeds and replies to posts.', 103 + ['!suspend']: 'Moderation action from Bluesky moderation team. Makes your content inaccessible on the Bluesky app.', 104 + ['!takedown']: 'Moderation action from Bluesky moderation team. Makes your content inaccessible on the Bluesky app.', 105 + ['!hide']: 'Almost always used with !takedown, makes your content inaccessible on the Bluesky app.', 106 + // other labels shouldn't cause problems that make you think your pds is broken 107 + // 'spam': just hides replies by default + makes your posts click-through 108 + // 'intolerant', etc: similar to spam 109 + }; 110 + 111 + if (window.blehYeahReady) blehYeahReady(); 112 + else window.yeahBlehIsReady = true; 92 113 </script> 93 114 115 + <style> 116 + body:not(.ready) .hide-until-ready, 117 + body.ready .show-until-ready { 118 + display: none; 119 + } 120 + </style> 121 + 94 122 <script> 95 123 document.addEventListener('alpine:init', () => { 124 + if (window.yeahBlehIsReady) { 125 + document.body.classList.add('ready'); 126 + } else { 127 + window.blehYeahReady = () => document.body.classList.add('ready'); 128 + } 129 + 96 130 Alpine.data('debug', () => ({ 97 131 // form input 98 132 identifier: '', ··· 487 521 Alpine.data('modLabels', did => ({ 488 522 loading: false, 489 523 error: null, 524 + regionalErrors: [], 490 525 labels: [], 491 526 492 527 async init() { 493 528 this.loading = true; 494 529 this.error = null; 530 + this.regionalErrors = []; 495 531 this.labels = []; 496 532 497 533 const query = window.SimpleQuery('https://mod.bsky.app'); ··· 502 538 }); 503 539 this.labels = res.labels ?? []; 504 540 // TODO: handle cursors? 541 + 542 + for (const region of window.regionalModAccounts) { 543 + // intentionally no await, these come in async 544 + // (...and could get messy if we start re-checking labels before they're done) 545 + this.checkRegionLabels(region); 546 + } 505 547 } catch (e) { 506 548 if (window.isXrpcErr(e)) { 507 549 this.error = e.error; ··· 512 554 } 513 555 this.loading = false; 514 556 }, 557 + 558 + async checkRegionLabels(labeler) { 559 + const query = window.SimpleQuery(labeler); 560 + try { 561 + const res = await query('com.atproto.label.queryLabels', { 562 + params: { uriPatterns: [did] }, 563 + }); 564 + if (res?.labels?.length > 0) this.labels.push(...res.labels); 565 + } catch (e) { 566 + if (window.isXrpcErr(e)) { 567 + this.regionalErrors.push(`${labeler}: ${e.error}`); 568 + } else { 569 + this.regionalErrors.push(`Failed to check ${labeler} (see console)`); 570 + console.error(`labeler: ${labeler}`, e); 571 + } 572 + } 573 + } 515 574 })); 516 575 517 576 Alpine.data('pdsHistory', (did, currentPds) => ({ ··· 606 665 <div class="hero bg-base-200 p-8"> 607 666 <div class="hero-content flex-col"> 608 667 <h1 class="text-2xl mb-8">PDS Debugger</h1> 609 - <form @submit.prevent="await diagnose()"> 668 + <p class="show-until-ready"><em>Loading&hellip;</em></p> 669 + <form class="hide-until-ready" @submit.prevent="await diagnose()"> 610 670 <label class="text-sm text-primary" for="identifier"> 611 671 atproto handle, DID, or HTTPS PDS URL 612 672 </label> ··· 885 945 ></a> 886 946 </td> 887 947 </tr> 948 + <!--<tr> 949 + <td 950 + class="text-sm" 951 + x-data="repoMonitor(did, pds)" 952 + > 953 + <button 954 + class="btn btn-xs btn-success" 955 + >Start live monitoring</button> 956 + </td> 957 + </tr>--> 888 958 </tbody> 889 959 </table> 890 960 </div> ··· 998 1068 </template> 999 1069 <template x-if="!loading && !error && labels.length === 0"> 1000 1070 <tr> 1001 - <td class="text-sm"> 1002 - <em>no labels applied by mod.bsky.app</em> 1071 + <td class="text-xs"> 1072 + <em>No Bluesky moderation labels found</em> 1003 1073 </td> 1004 1074 </tr> 1005 1075 </template> 1006 1076 <template x-for="label in labels"> 1007 1077 <template x-if="!!label"> 1008 - <template x-if="label.neg"> 1009 - <tr> 1010 - <td> 1011 - removed 1012 - <code 1013 - x-text="label.cts.split('T')[0]" 1014 - :title="label.cts" 1015 - ></code> 1016 - </td> 1017 - <td></td> 1018 - <td> 1019 - <code 1020 - x-text="label.val" 1021 - class="badge badge-sm badge-soft badge-neutral line-through" 1022 - :title="label negated" 1023 - ></code> 1024 - </td> 1025 - </tr> 1026 - </template> 1027 - <template x-if="!label.neg"> 1028 - <tr x-data="{ expired: isBeforeNow(label.exp) }"> 1029 - <td> 1030 - <code 1031 - x-text="label.cts.split('T')[0]" 1032 - :title="label.cts" 1033 - ></code> 1034 - </td> 1035 - <td> 1078 + <tr x-data="{ expired: isBeforeNow(label.exp) }"> 1079 + <td> 1080 + <span x-show="label.neg">removed</span> 1081 + <code 1082 + x-text="label.cts.split('T')[0]" 1083 + :title="label.cts" 1084 + ></code> 1085 + </td> 1086 + <td> 1087 + <template x-if="!!label.exp"> 1036 1088 <span x-text="expired ? 'expired' : 'expires'"></span> 1037 1089 <code 1038 1090 x-text="label.exp.split('T')[0]" 1039 1091 :title="label.exp" 1040 1092 ></code> 1041 - </td> 1042 - <td> 1043 - <code 1044 - x-text="label.val" 1045 - class="badge badge-sm badge-soft" 1046 - :class="expired ? 'badge-neutral line-through' : 'badge-warning'" 1047 - :title="expired ? 'Label expired' : ''" 1048 - ></code> 1049 - </td> 1050 - </tr> 1051 - </template> 1093 + </template> 1094 + </td> 1095 + <td> 1096 + <code 1097 + x-text="label.val" 1098 + class="badge badge-sm badge-soft" 1099 + :class="(label.neg || expired) 1100 + ? 'badge-neutral line-through' 1101 + : !!window.bskyAccountDeathLabels[label.val] 1102 + ? 'badge-warning' 1103 + : 'badge-info'" 1104 + :title="label.neg 1105 + ? 'label negated' 1106 + : expired 1107 + ? 'label expired' 1108 + : window.bskyAccountDeathLabels[label.val] ?? ''" 1109 + ></code> 1110 + </td> 1111 + <td 1112 + x-data="didToHandle(label.src)" 1113 + x-intersect:enter.once="load" 1114 + > 1115 + <span x-show="loading">Loading&hellip;</span> 1116 + <span x-show="error !== null" x-text="error"></span> 1117 + <a 1118 + href="#" 1119 + class="link" 1120 + @click.prevent="goto(handle)" 1121 + x-show="handle !== null" 1122 + x-text="`@${handle}`" 1123 + ></a> 1124 + </td> 1125 + </tr> 1052 1126 </template> 1053 1127 </template> 1054 1128 </tbody> 1055 1129 </table> 1056 1130 </div> 1131 + <template x-for="error in regionalErrors"> 1132 + <p 1133 + x-text="error" 1134 + class="text-xs text-warning" 1135 + ></p> 1136 + </template> 1057 1137 </div> 1058 1138 1059 1139 <template x-if="did.startsWith('did:plc:')"> ··· 1238 1318 1239 1319 <div class="footer text-xs sm:footer-horizontal text-neutral mt-32 p-8 max-w-2xl mx-auto"> 1240 1320 <nav> 1241 - <h3 class="footer-title">Current limitations</h3> 1242 - <p>PDS hosts without CORS will fail tests</p> 1243 - <p>Bluesky relay is missing API endpoints</p> 1244 - <p>Blacksky relay is also missing API endpoints</p> 1245 - <p>The requestCrawl button is not well tested</p> 1321 + <h3 class="footer-title mt-3">Current limitations</h3> 1322 + <p>PDS hosts without CORS will fail tests.</p> 1323 + <p>Bluesky relay is missing API endpoints.</p> 1324 + <p>Blacksky relay is also missing API endpoints.</p> 1325 + <p>The requestCrawl button is not well tested.</p> 1326 + 1327 + <h3 class="footer-title mt-3">Future features</h3> 1328 + <p>Firehose listener</p> 1329 + <p>URL routing</p> 1330 + <p>Less strict identity resolution</p> 1246 1331 </nav> 1332 + 1247 1333 <nav> 1334 + <h3 class="footer-title mt-3">Places</h3> 1335 + <p><a href="https://tangled.org/microcosm.blue/pds-debug">Source code (tangled.org)</a></p> 1336 + <p><a href="https://discord.gg/Vwamex5UFS">Discord (microcosm)</a></p> 1337 + <p><a href="https://pdsmoover.com/">PDS Moover</a></p> 1338 + <p><a href="https://microcosm.blue">microcosm</a></p> 1248 1339 1249 - <h3 class="footer-title">Future features</h3> 1250 - <p>Account label lookup</p> 1340 + <h3 class="footer-title mt-3">Made by</h3> 1341 + <p> 1342 + <a href="https://bsky.app/profile/did:plc:hdhoaan3xa3jiuq4fg4mefid">fig</a> 1343 + <a href="https://github.com/sponsors/uniphil">(sponsor)</a> 1344 + </p> 1345 + <p> 1346 + <a href="https://bsky.app/profile/did:plc:rnpkyqnmsw4ipey6eotbdnnf">bailey</a> 1347 + <a href="https://github.com/sponsors/fatfingers23">(sponsor)</a> 1348 + </p> 1251 1349 </nav> 1252 1350 </div> 1253 1351
+5
readme.md
··· 1 + # PDS Debugger 2 + 3 + https://debug.hose.cam 4 + 5 + Diagnostics for atproto PDS hosts, DIDs, and handles
+13
useful-accounts.txt
··· 1 + some accounts that show things useful for testing the debugger 2 + 3 + 4 + Labels 5 + 6 + - did:plc:bnwrgnvwkg2n5cbvk4xodb3h | !hide | no other labels 7 + - did:plc:qhl3vg5tmwey536z2fil2lrh | !hide | from moderation-tr.bsky.app 8 + - did:plc:fsmaoqqnm6knqh4cuphb4jow | !hide, ~!takedown | takedown negated 9 + - did:plc:iv3yod6zf2j4zaakq6qyiz46 | !takedown | 10 + - did:plc:nwrcwcrhpkgrqqvkg3lmaqky | ~needs-review, ~!takedown | both negated 11 + - did:plc:2tinwgqvf4asiwh36ii6ko7l | needs-review | expired 12 + - did:plc:5plqrpw3x6j5wzaosssqams7 | spam | no other labels 13 + - did:plc:tqww7jdpqx5tb3w435fugmxi | intolerant |