extremely claude-assisted go game based on atproto! working on cleaning up and giving a more unique design, still has a bit of a slop vibe to it.
0
fork

Configure Feed

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

Fix Constellation response parsing: field is 'records' not 'links'

The getBacklinks API returns { records, total, cursor }, not { links }.
Also handle cursor being null instead of undefined.

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

+8 -8
+8 -8
src/lib/atproto-client.ts
··· 98 98 } 99 99 100 100 interface ConstellationBacklinksResponse { 101 - links: Array<{ uri: string; value: any }>; 101 + records: Array<{ uri: string; value: any }>; 102 102 total: number; 103 - cursor?: string; 103 + cursor: string | null; 104 104 } 105 105 106 106 /** Fetch all moves for a game from Constellation backlinks. */ ··· 127 127 if (!res.ok) break; 128 128 129 129 const body: ConstellationBacklinksResponse = await res.json(); 130 - for (const link of body.links) { 131 - allMoves.push(link.value as MoveRecord); 130 + for (const rec of body.records) { 131 + allMoves.push(rec.value as MoveRecord); 132 132 } 133 - cursor = body.cursor; 133 + cursor = body.cursor ?? undefined; 134 134 } while (cursor); 135 135 } catch (err) { 136 136 console.error('Failed to fetch game moves from Constellation:', err); ··· 164 164 if (!res.ok) break; 165 165 166 166 const body: ConstellationBacklinksResponse = await res.json(); 167 - for (const link of body.links) { 168 - allPasses.push(link.value as PassRecord); 167 + for (const rec of body.records) { 168 + allPasses.push(rec.value as PassRecord); 169 169 } 170 - cursor = body.cursor; 170 + cursor = body.cursor ?? undefined; 171 171 } while (cursor); 172 172 } catch (err) { 173 173 console.error('Failed to fetch game passes from Constellation:', err);