-
+ {!isDiscussion &&
}
>
)}
diff --git a/src/constants.ts b/src/constants.ts
index 32bbcd1f..fb694860 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -179,7 +179,6 @@ export const SEARCHABLE_RELAY_URLS = [
'wss://relay.noswhere.com',
'wss://relay.wikifreedia.xyz',
'wss://nostr.einundzwanzig.space',
- 'wss://relay.lumina.rocks',
'wss://nostrelites.org',
'wss://relay.nsec.app',
'wss://bucket.coracle.social',
diff --git a/src/lib/relay-list-builder.ts b/src/lib/relay-list-builder.ts
index 9c330c75..a9a1fdc6 100644
--- a/src/lib/relay-list-builder.ts
+++ b/src/lib/relay-list-builder.ts
@@ -230,6 +230,33 @@ export async function buildComprehensiveRelayList(options: RelayListBuilderOptio
return Array.from(relayUrls)
}
+/**
+ * Explore: Following's Favorites (kind 10012 batch) and Relay reviews tab.
+ * PROFILE_FETCH_RELAY_URLS plus the viewer's read/write and cache (10432) relays — no FAST_READ.
+ */
+export async function buildExploreProfileAndUserRelayList(
+ userPubkey: string | null | undefined
+): Promise {
+ if (!userPubkey) {
+ return Array.from(new Set([...PROFILE_FETCH_RELAY_URLS]))
+ }
+ try {
+ const built = await buildComprehensiveRelayList({
+ userPubkey,
+ includeUserOwnRelays: true,
+ includeProfileFetchRelays: true,
+ includeFastReadRelays: false,
+ includeFavoriteRelays: false,
+ includeLocalRelays: true,
+ includeFastWriteRelays: false,
+ includeSearchableRelays: false
+ })
+ return built.length > 0 ? built : Array.from(new Set([...PROFILE_FETCH_RELAY_URLS]))
+ } catch {
+ return Array.from(new Set([...PROFILE_FETCH_RELAY_URLS]))
+ }
+}
+
/**
* Build relay list for reading replies/comments
* READ from: FAST_READ_RELAY_URLS + user's inboxes + local relays + OP author's outboxes
diff --git a/src/pages/primary/SpellsPage/fauxSpellFeeds.ts b/src/pages/primary/SpellsPage/fauxSpellFeeds.ts
index 3da8819e..2f1c3090 100644
--- a/src/pages/primary/SpellsPage/fauxSpellFeeds.ts
+++ b/src/pages/primary/SpellsPage/fauxSpellFeeds.ts
@@ -17,6 +17,13 @@ const NOTIFICATION_LIMIT = 500
const DISCUSSION_LIMIT = 500
const MAX_BOOKMARK_IDS = 250
+/**
+ * Spells “Discussions” uses NoteList → subscribeTimeline → one live REQ per relay.
+ * The same merged list as DiscussionsPage’s one-shot query would open 80+ sockets and exhaust
+ * subscription slots; cap keeps first paint fast. Full coverage remains on /discussions.
+ */
+const DISCUSSION_FAUX_SPELL_MAX_RELAYS = 32
+
export const MEDIA_SPELL_KINDS = [
ExtendedKind.PICTURE,
ExtendedKind.VIDEO,
@@ -66,7 +73,10 @@ export function buildMentionsSpellFilter(pubkey: string): Filter {
}
}
-/** Relay set for discussion threads (kind 11), aligned with DiscussionsPage’s merged list (sync). */
+/**
+ * Relay set for Spells “Discussions” (kind 11): same merge order as DiscussionsPage, but capped
+ * for subscription-based loading (see DISCUSSION_FAUX_SPELL_MAX_RELAYS).
+ */
export function discussionRelayUrls(
relayList: TRelayList | null | undefined,
favoriteRelays: string[],
@@ -83,6 +93,7 @@ export function discussionRelayUrls(
if (!k || seen.has(k) || blocked.has(k)) continue
seen.add(k)
out.push(k)
+ if (out.length >= DISCUSSION_FAUX_SPELL_MAX_RELAYS) break
}
return out
}
diff --git a/src/services/client-replaceable-events.service.ts b/src/services/client-replaceable-events.service.ts
index df8a0e66..b0c13785 100644
--- a/src/services/client-replaceable-events.service.ts
+++ b/src/services/client-replaceable-events.service.ts
@@ -18,7 +18,7 @@ import indexedDb from './indexed-db.service'
import type { QueryService } from './client-query.service'
import logger from '@/lib/logger'
import client from './client.service'
-import { buildComprehensiveRelayList } from '@/lib/relay-list-builder'
+import { buildComprehensiveRelayList, buildExploreProfileAndUserRelayList } from '@/lib/relay-list-builder'
export class ReplaceableEventService {
private queryService: QueryService
@@ -436,6 +436,8 @@ export class ReplaceableEventService {
// For metadata with a logged-in user, merge defaults with {@link buildComprehensiveRelayList}: inboxes (read),
// local/cache relays (10432), favorite relays (10012), plus profile + fast read — same idea as favorites feed
// / inbox-scoped discovery without per-author relay list fetches.
+ // Following's Favorites (Explore): kind 10012 batch uses PROFILE_FETCH_RELAY_URLS + viewer's own relays only
+ // (no FAST_READ), so outbox data is queried where the user actually reads + profile-index relays.
let relayUrls: string[]
if (kind === kinds.Metadata) {
const userPk = client.pubkey
@@ -457,6 +459,8 @@ export class ReplaceableEventService {
} else {
relayUrls = Array.from(new Set([...PROFILE_FETCH_RELAY_URLS, ...FAST_READ_RELAY_URLS]))
}
+ } else if (kind === ExtendedKind.FAVORITE_RELAYS) {
+ relayUrls = await buildExploreProfileAndUserRelayList(client.pubkey)
} else {
relayUrls = [...FAST_READ_RELAY_URLS]
}