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

Configure Feed

Select the types of activity you want to include in your feed.

fix histories

actually want every change, not every new previously unseen thing (pdss and handles can change back to previous values any time)

also including the latest one means a date is associated and probably keeps things clearer.

phil 7da96b45 4d572ecd

+33 -19
+33 -19
index.html
··· 407 407 const res = await fetch(`https://plc.directory/${did}/log/audit`); 408 408 if (res.ok) { 409 409 const log = await res.json(); 410 - const seen = new Set(); 411 - seen.add(currentPds); 410 + let prev = null; 412 411 for (op of log) { 413 412 const opPds = op.operation.services.atproto_pds.endpoint; 414 - if (seen.has(opPds)) continue; 415 - seen.add(opPds); 413 + if (opPds === prev) continue; 414 + prev = opPds; 416 415 this.history.push({ 417 416 pds: opPds, 418 417 date: op.createdAt, 419 418 }); 420 419 } 421 420 this.history.reverse(); 421 + if (this.history[0]) this.history[0].current = true; 422 422 } else { 423 423 this.error = `${res.status}: ${await res.text()}`; 424 424 } ··· 443 443 const res = await fetch(`https://plc.directory/${did}/log/audit`); 444 444 if (res.ok) { 445 445 const log = await res.json(); 446 - const seen = new Set(); 447 - seen.add(currentHandle); 446 + let prev = null; 448 447 for (op of log) { 449 448 let opHandle = null; 450 449 for (aka of op.operation.alsoKnownAs) { ··· 453 452 break; 454 453 } 455 454 } 456 - if (seen.has(opHandle)) continue; 457 - seen.add(opHandle); 455 + if (opHandle === prev) continue; 456 + prev = opHandle; 458 457 this.history.push({ 459 458 handle: opHandle, 460 459 date: op.createdAt, ··· 814 813 x-text="event.pds" 815 814 ></a> 816 815 </td> 817 - <td> 818 - <span 819 - x-show="state && !state.active" 820 - x-text="state && state.status" 821 - class="badge badge-sm badge-soft badge-success" 822 - ></span> 823 - <span 824 - x-show="state && state.active" 825 - class="badge badge-sm badge-soft badge-warning" 826 - >active</span> 827 - </td> 816 + <template x-if="event.current"> 817 + <td> 818 + <span 819 + x-show="state && !state.active" 820 + x-text="state && state.status" 821 + class="badge badge-sm badge-soft badge-warning" 822 + ></span> 823 + <span 824 + x-show="state && state.active" 825 + class="badge badge-sm badge-soft badge-success" 826 + >current</span> 827 + </td> 828 + </template> 829 + <template x-if="!event.current"> 830 + <td> 831 + <span 832 + x-show="state && !state.active" 833 + x-text="state && state.status" 834 + class="badge badge-sm badge-soft badge-success" 835 + ></span> 836 + <span 837 + x-show="state && state.active" 838 + class="badge badge-sm badge-soft badge-warning" 839 + >active</span> 840 + </td> 841 + </template> 828 842 </tr> 829 843 </template> 830 844 </tbody>