diff --git a/src/components/LiveActivitiesStrip.tsx b/src/components/LiveActivitiesStrip.tsx
index c27f2f59..47f6d9f1 100644
--- a/src/components/LiveActivitiesStrip.tsx
+++ b/src/components/LiveActivitiesStrip.tsx
@@ -3,7 +3,7 @@ import { cn } from '@/lib/utils'
import { useLiveActivitiesOptional } from '@/providers/LiveActivitiesProvider'
import { useUserPreferences } from '@/providers/UserPreferencesProvider'
import { ExternalLink } from 'lucide-react'
-import { useEffect, useState } from 'react'
+import { useEffect, useLayoutEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
type TPlacement = 'sidebar' | 'mobile'
@@ -37,11 +37,21 @@ export default function LiveActivitiesStrip({ placement }: { placement: TPlaceme
return () => window.clearInterval(id)
}, [items.length, reduceMotion])
+ useLayoutEffect(() => {
+ if (items.length === 0) return
+ setSlide((s) => Math.min(s, items.length - 1))
+ }, [items.length])
+
if (!showLiveActivitiesBanner || items.length === 0) {
return null
}
- const current = items[slide]!
+ // `items` can shrink without a new array identity; `slide` may then be out of range until effects run.
+ const displayIndex = Math.min(slide, items.length - 1)
+ const current = items[displayIndex]
+ if (!current) {
+ return null
+ }
return (
{
e.preventDefault()
diff --git a/src/components/NormalFeed/index.tsx b/src/components/NormalFeed/index.tsx
index 0290c832..66a80154 100644
--- a/src/components/NormalFeed/index.tsx
+++ b/src/components/NormalFeed/index.tsx
@@ -28,10 +28,20 @@ const NormalFeed = forwardRef (
@@ -209,6 +223,8 @@ const NormalFeed = forwardRef
- !seeAllFeedEvents &&
- (!allowKindlessRelayExplore || (useFilterAsIs && clientSideKindFilter)),
- [seeAllFeedEvents, allowKindlessRelayExplore, useFilterAsIs, clientSideKindFilter]
+ () => withKindFilter && !showAllKinds && !seeAllFeedEvents,
+ [withKindFilter, showAllKinds, seeAllFeedEvents]
)
const shouldHideEvent = useCallback(
@@ -1304,15 +1318,14 @@ const NoteList = forwardRef(
}
/**
- * Kindless relay REQ (`allowKindlessRelayExplore`): never drop events here — relays return many kinds;
- * merging only rows in {@link showKinds} left almost nothing in the timeline (e.g. christpill 200 events → 1
- * visible) while relay explore showed the full firehose. {@link applyKindPickerInUi} / {@link filteredEvents}
- * still apply the kind picker for what the user sees.
+ * Kindless relay REQ: when {@link showAllKinds} is true (explorer / "All Events"), keep the full batch;
+ * otherwise narrow to {@link showKinds} so the merged timeline matches {@link applyKindPickerInUi}.
*/
const narrowLiveBatch = (evs: Event[]) => {
if (seeAllFeedEventsRef.current) return evs
- if (allowKindlessRelayExploreRef.current) return evs
+ if (allowKindlessRelayExploreRef.current && showAllKindsRef.current) return evs
if (!useFilterAsIsRef.current || !clientSideKindFilterRef.current) return evs
+ if (!withKindFilterRef.current) return evs
return evs.filter((e) => showKinds.includes(e.kind))
}
@@ -1349,7 +1362,13 @@ const NoteList = forwardRef(
let merged = [...byId.values()]
.sort((a, b) => b.created_at - a.created_at)
.slice(0, cap)
- if (useFilterAsIs && clientSideKindFilter && !seeAllFeedEventsRef.current) {
+ if (
+ useFilterAsIs &&
+ clientSideKindFilter &&
+ withKindFilter &&
+ !seeAllFeedEventsRef.current &&
+ (!allowKindlessRelayExplore || !showAllKinds)
+ ) {
merged = merged.filter((e) => showKinds.includes(e.kind))
}
if (sessionSnap?.length && !userPulledRefresh) {
@@ -1579,21 +1598,25 @@ const NoteList = forwardRef(
onNew: (event: Event) => {
if (!effectActive) return
feedRelayReturnedAnyEventRef.current = true
- if (!seeAllFeedEventsRef.current && !allowKindlessRelayExploreRef.current) {
- if (!useFilterAsIsRef.current && !showKinds.includes(event.kind)) return
- if (
- clientSideKindFilterRef.current &&
- useFilterAsIsRef.current &&
- !showKinds.includes(event.kind)
- )
- return
- if (event.kind === kinds.ShortTextNote) {
- const isReply = isReplyNoteEvent(event)
- if (isReply && !showKind1Replies) return
- if (!isReply && !showKind1OPs) return
+ if (!seeAllFeedEventsRef.current && withKindFilterRef.current) {
+ const kindlessFirehose =
+ allowKindlessRelayExploreRef.current && showAllKindsRef.current
+ if (!kindlessFirehose) {
+ if (!useFilterAsIsRef.current && !showKinds.includes(event.kind)) return
+ if (
+ clientSideKindFilterRef.current &&
+ useFilterAsIsRef.current &&
+ !showKinds.includes(event.kind)
+ )
+ return
+ if (event.kind === kinds.ShortTextNote) {
+ const isReply = isReplyNoteEvent(event)
+ if (isReply && !showKind1Replies) return
+ if (!isReply && !showKind1OPs) return
+ }
+ if (event.kind === ExtendedKind.COMMENT && !showKind1111) return
+ if (event.kind === ExtendedKind.GIT_RELEASE && !showKind1OPs) return
}
- if (event.kind === ExtendedKind.COMMENT && !showKind1111) return
- if (event.kind === ExtendedKind.GIT_RELEASE && !showKind1OPs) return
}
if (shouldHideEventRef.current(event)) return
if (pubkey && event.pubkey === pubkey) {
@@ -1693,6 +1716,8 @@ const NoteList = forwardRef(
oneShotFirstRelayGraceMs,
clientSideKindFilter,
allowKindlessRelayExplore,
+ showAllKinds,
+ withKindFilter,
onSingleRelayKindlessEmpty
])
@@ -1971,7 +1996,9 @@ const NoteList = forwardRef(
const narrowLoadMore =
useFilterAsIsRef.current &&
clientSideKindFilterRef.current &&
- !seeAllFeedEventsRef.current
+ withKindFilterRef.current &&
+ !seeAllFeedEventsRef.current &&
+ (!allowKindlessRelayExploreRef.current || !showAllKindsRef.current)
let toAppend = narrowLoadMore
? fetchBatch.filter((e) => showKindsRef.current.includes(e.kind))
: fetchBatch
diff --git a/src/components/Relay/index.tsx b/src/components/Relay/index.tsx
index f72c5c6b..388df45a 100644
--- a/src/components/Relay/index.tsx
+++ b/src/components/Relay/index.tsx
@@ -148,6 +148,7 @@ const Relay = forwardRef<
subRequests={relayFeedSubRequests}
useFilterAsIs
allowKindlessRelayExplore
+ showAllKinds
showFeedClientFilter
hostPrimaryPageName={hostPrimaryPageName}
/>
diff --git a/src/pages/primary/SpellsPage/index.tsx b/src/pages/primary/SpellsPage/index.tsx
index ec3eeee5..233c6d08 100644
--- a/src/pages/primary/SpellsPage/index.tsx
+++ b/src/pages/primary/SpellsPage/index.tsx
@@ -1689,7 +1689,9 @@ const SpellsPage = forwardRef(function SpellsPage(
subRequests={subRequests}
feedSubscriptionKey={spellFeedSubscriptionKey}
hostPrimaryPageName="spells"
- showKinds={showKinds}
+ showKinds={
+ selectedFauxSpell === 'notifications' ? NOTIFICATION_SPELL_KINDS : showKinds
+ }
spellFeedInstrumentToken={spellFeedInstrumentToken}
onSpellFeedFirstPaint={handleSpellFeedFirstPaint}
timelineLoadingSafetyTimeoutMs={