A stream.place VOD client inspired by icarly.com
1
fork

Configure Feed

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

Fix favicon size and improve handle resolution reliability

jack ffad166c 8b964cdd

+21 -4
public/favicon-32.png

This is a binary file and will not be displayed.

public/favicon.ico

This is a binary file and will not be displayed.

+21 -4
src/components/HomeClient.tsx
··· 52 52 const data = await videosRes.json(); 53 53 const allVideos = data.records as { uri: string; cid: string; value: VideoRecord }[]; 54 54 55 + // Cache for resolved handles to avoid redundant requests 56 + const handleCache = new Map<string, string>(); 57 + 55 58 // Resolve handles with batching to avoid rate limits 56 59 const resolveHandle = async (did: string): Promise<string> => { 60 + // Check cache first 61 + if (handleCache.has(did)) { 62 + return handleCache.get(did)!; 63 + } 64 + 57 65 try { 58 66 // Add delay to avoid rate limiting 59 - await new Promise(resolve => setTimeout(resolve, 50)); 67 + await new Promise(resolve => setTimeout(resolve, 100)); 60 68 const handleRes = await fetch(`https://public.api.bsky.app/xrpc/com.atproto.identity.resolveDid?did=${did}`); 61 - if (!handleRes.ok) throw new Error('Failed to resolve handle'); 69 + 70 + if (!handleRes.ok) { 71 + // Silently cache the DID itself if resolution fails 72 + handleCache.set(did, did); 73 + return did; 74 + } 75 + 62 76 const handleData = await handleRes.json(); 63 - return handleData.handle || did; 77 + const handle = handleData.handle || did; 78 + handleCache.set(did, handle); 79 + return handle; 64 80 } catch (error) { 65 - console.warn(`Failed to resolve handle for ${did}:`, error); 81 + // Silently cache the DID itself on error to prevent repeated failed requests 82 + handleCache.set(did, did); 66 83 return did; 67 84 } 68 85 };