slack status without the slack status.zzstoatzz.io/
quickslice

perf: use actorHandle from graphql on homepage

fetch statuses first and get handle from actorHandle field,
eliminating PLC lookup for users with existing statuses.
falls back to PLC lookup only for new users with no statuses.

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

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

Changed files
+27 -23
site
+27 -23
site/app.js
··· 764 764 window.location.reload(); 765 765 return; 766 766 } 767 - const handle = await resolveDidToHandle(user.did) || user.did; 767 + 768 + // Load statuses first (includes actorHandle to avoid PLC lookup) 769 + const res = await fetch(`${CONFIG.server}/graphql`, { 770 + method: 'POST', 771 + headers: { 'Content-Type': 'application/json' }, 772 + body: JSON.stringify({ 773 + query: ` 774 + query GetUserStatuses($did: String!) { 775 + ioZzstoatzzStatusRecord( 776 + first: 100 777 + where: { did: { eq: $did } } 778 + sortBy: [{ field: "createdAt", direction: DESC }] 779 + ) { 780 + edges { node { uri did actorHandle emoji text createdAt expires } } 781 + } 782 + } 783 + `, 784 + variables: { did: user.did } 785 + }) 786 + }); 787 + const json = await res.json(); 788 + const statuses = json.data.ioZzstoatzzStatusRecord.edges.map(e => e.node); 789 + 790 + // Get handle from statuses if available, otherwise fall back to PLC lookup 791 + const handle = statuses.length > 0 && statuses[0].actorHandle 792 + ? statuses[0].actorHandle 793 + : (await resolveDidToHandle(user.did) || user.did); 768 794 769 795 // Load and apply preferences, set up settings/logout buttons 770 796 const prefs = await loadPreferences(); ··· 800 826 801 827 // Set page title with Bluesky profile link 802 828 document.getElementById('page-title').innerHTML = `<a href="https://bsky.app/profile/${handle}" target="_blank">@${handle}</a>`; 803 - 804 - // Load user's statuses (full history) 805 - const res = await fetch(`${CONFIG.server}/graphql`, { 806 - method: 'POST', 807 - headers: { 'Content-Type': 'application/json' }, 808 - body: JSON.stringify({ 809 - query: ` 810 - query GetUserStatuses($did: String!) { 811 - ioZzstoatzzStatusRecord( 812 - first: 100 813 - where: { did: { eq: $did } } 814 - sortBy: [{ field: "createdAt", direction: DESC }] 815 - ) { 816 - edges { node { uri did emoji text createdAt expires } } 817 - } 818 - } 819 - `, 820 - variables: { did: user.did } 821 - }) 822 - }); 823 - const json = await res.json(); 824 - const statuses = json.data.ioZzstoatzzStatusRecord.edges.map(e => e.node); 825 829 826 830 let currentHtml = '<span class="big-emoji">-</span>'; 827 831 let historyHtml = '';