fix: fallback to direct file fetch in ActivityDetailLoader
If the index-based lookup fails (shard fetch silently failed, stale index state, etc.), try fetching the activity detail file directly from each user shard's _merged/activities/ directory. This makes private activities and newly-synced activities accessible even when the index resolution fails. Also add console.error logging when shards fail in resolveShards to help diagnose root causes.
This commit is contained in:
@@ -99,6 +99,13 @@ async function resolveShards(
|
||||
}),
|
||||
);
|
||||
|
||||
// Log shard fetch failures to help diagnose missing-activity issues
|
||||
shardResults.forEach((r, i) => {
|
||||
if (r.status === 'rejected') {
|
||||
console.error('[bincio] shard fetch failed:', index.shards[i]?.url, r.reason);
|
||||
}
|
||||
});
|
||||
|
||||
const own = index.activities ?? [];
|
||||
const fromShards = shardResults.flatMap(r => r.status === 'fulfilled' ? r.value : []);
|
||||
return [...own, ...fromShards];
|
||||
|
||||
Reference in New Issue
Block a user