Instant thread display, faster fetches, trending always shows notes

Threads now render the focused note immediately instead of showing a
loading skeleton. Root + ancestors fetch in parallel, timeouts cut
from 10s to 5s per round-trip, ancestor lookups from 5s to 2s.

Trending feed adds a base recency score so notes always appear even
when engagement data times out from relays.
This commit is contained in:
Jure
2026-03-29 17:50:10 +02:00
parent 8e685f2d4b
commit 2bb1341eed
4 changed files with 27 additions and 23 deletions

View File

@@ -14,7 +14,7 @@ export function withTimeout<T>(promise: Promise<T>, ms: number, fallback: T): Pr
}
export const FEED_TIMEOUT = 8000; // 8s for feed fetches
export const THREAD_TIMEOUT = 10000; // 10s per thread round-trip
export const THREAD_TIMEOUT = 5000; // 5s per thread round-trip
export const SINGLE_TIMEOUT = 5000; // 5s for single event lookups
const EMPTY_SET = new Set<NDKEvent>();