From cc409a928828134a74a5bd1e4dee016ea2219fb2 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Mon, 25 May 2026 22:01:47 +0200 Subject: [PATCH] bug-fixes --- .../AdvancedEventLabDialog.tsx | 24 +++++----- src/components/EventPowLabel/index.tsx | 10 ++-- src/components/KindFilter/index.tsx | 7 +-- src/components/LiveActivitiesStrip.tsx | 5 ++ src/components/NormalFeed/index.tsx | 47 ++++++++----------- src/components/Note/index.tsx | 4 +- src/components/NoteList/index.tsx | 26 ++++++---- src/components/RefreshButton/index.tsx | 2 +- src/components/ReplyNote/index.tsx | 2 +- src/components/Tabs/index.tsx | 21 +++++---- .../ZapDialog/PostPaymentMessagePrompt.tsx | 6 +-- .../ZapDialog/PublicMessageForm.tsx | 20 ++++---- .../ZapDialog/SuperchatRequestForm.tsx | 22 +++++---- src/constants.ts | 7 +++ src/lib/console-log-buffer.ts | 3 ++ src/lib/error-suppression.ts | 31 ++++++++++++ src/services/client-events.service.ts | 12 +++-- 17 files changed, 151 insertions(+), 98 deletions(-) diff --git a/src/components/AdvancedEventLab/AdvancedEventLabDialog.tsx b/src/components/AdvancedEventLab/AdvancedEventLabDialog.tsx index ea1c3eb6..c2510276 100644 --- a/src/components/AdvancedEventLab/AdvancedEventLabDialog.tsx +++ b/src/components/AdvancedEventLab/AdvancedEventLabDialog.tsx @@ -705,19 +705,19 @@ export default function AdvancedEventLabDialog({ minHeight: '12rem', fontFamily: 'var(--font-mono, ui-monospace, monospace)' }, - // LanguageTool hits: drop default thin SVG underline, use thick wavy line (see `LT_GRAMMAR_MARK_CLASS`). + // LanguageTool hits: subtle wavy underline (default CM lint SVG is hidden). [`.cm-lintRange.${LT_GRAMMAR_MARK_CLASS}`]: { backgroundImage: 'none', - paddingBottom: '2px', + paddingBottom: '1px', textDecoration: 'underline', textDecorationSkipInk: 'none', textDecorationStyle: 'wavy', - textDecorationColor: '#ea580c', - textDecorationThickness: '3px', - textUnderlineOffset: '3px' + textDecorationColor: 'rgba(234, 88, 12, 0.45)', + textDecorationThickness: '1.5px', + textUnderlineOffset: '2px' }, [`.cm-lintRange-active.${LT_GRAMMAR_MARK_CLASS}`]: { - backgroundColor: 'rgba(234, 88, 12, 0.22)' + backgroundColor: 'rgba(234, 88, 12, 0.1)' } }), EditorView.updateListener.of((update) => { @@ -742,16 +742,16 @@ export default function AdvancedEventLabDialog({ EditorView.theme({ [`.cm-lintRange.${LT_GRAMMAR_MARK_CLASS}`]: { backgroundImage: 'none', - paddingBottom: '2px', + paddingBottom: '1px', textDecoration: 'underline', textDecorationSkipInk: 'none', textDecorationStyle: 'wavy', - textDecorationColor: '#fdba74', - textDecorationThickness: '3px', - textUnderlineOffset: '3px' + textDecorationColor: 'rgba(251, 146, 60, 0.5)', + textDecorationThickness: '1.5px', + textUnderlineOffset: '2px' }, [`.cm-lintRange-active.${LT_GRAMMAR_MARK_CLASS}`]: { - backgroundColor: 'rgba(251, 146, 60, 0.28)' + backgroundColor: 'rgba(251, 146, 60, 0.12)' } }) ) @@ -988,7 +988,7 @@ export default function AdvancedEventLabDialog({
diff --git a/src/components/EventPowLabel/index.tsx b/src/components/EventPowLabel/index.tsx index a41d7914..893282fb 100644 --- a/src/components/EventPowLabel/index.tsx +++ b/src/components/EventPowLabel/index.tsx @@ -20,16 +20,14 @@ export default function EventPowLabel({ return ( - + {t('POW {{difficulty}}', { difficulty })} ) diff --git a/src/components/KindFilter/index.tsx b/src/components/KindFilter/index.tsx index d0046330..b3ee3174 100644 --- a/src/components/KindFilter/index.tsx +++ b/src/components/KindFilter/index.tsx @@ -166,8 +166,9 @@ export default function KindFilter({
- {webReactionParentUrl ? (
diff --git a/src/components/NoteList/index.tsx b/src/components/NoteList/index.tsx index a1437751..44a0d75a 100644 --- a/src/components/NoteList/index.tsx +++ b/src/components/NoteList/index.tsx @@ -4,7 +4,8 @@ import { ExtendedKind, FAST_READ_RELAY_URLS, FIRST_RELAY_RESULT_GRACE_MS, - PROFILE_MEDIA_TAB_KINDS, + HOME_GALLERY_TAB_KINDS, + HOME_GALLERY_TAB_KIND_SET, SINGLE_RELAY_KINDLESS_EOSE_TIMEOUT_MS, SINGLE_RELAY_KINDLESS_REQ_LIMIT } from '@/constants' @@ -1369,6 +1370,10 @@ const NoteList = forwardRef( if (extraShouldHideEvent?.(evt)) return true + if (homeFeedListMode === 'media' && !HOME_GALLERY_TAB_KIND_SET.has(evt.kind)) { + return true + } + if ( homeFeedActiveSeenOnAllowlist && homeFeedListMode === 'posts' && @@ -2607,7 +2612,7 @@ const NoteList = forwardRef( } try { - const hits = client.eventService.listSessionEventsByKinds([...PROFILE_MEDIA_TAB_KINDS], { + const hits = client.eventService.listSessionEventsByKinds([...HOME_GALLERY_TAB_KINDS], { limit: 800 }) mergeLayer(hits as Event[], 'gallery_session_local') @@ -2619,7 +2624,7 @@ const NoteList = forwardRef( try { const since = dayjs().subtract(120, 'day').unix() const rows = await indexedDb.scanEventArchiveByKinds({ - kinds: [...PROFILE_MEDIA_TAB_KINDS], + kinds: [...HOME_GALLERY_TAB_KINDS], since, maxRowsScanned: 28_000, maxMatches: 220 @@ -3111,7 +3116,7 @@ const NoteList = forwardRef( ...(runtimeSnapshot.rawCount === 0 ? { emptyHint: - 'All sub-batches returned 0 events: relays may not index these kinds for this author, the query may have timed out before slow relays EOSEd, or posts are kind 1 with links (this tab uses native media kinds only: picture, NIP-71 video regular/addressable, voice).' + 'All sub-batches returned 0 events: relays may not index these kinds for this author, the query may have timed out before slow relays EOSEd, or posts are kind 1 with links (Gallery uses kinds 20, 21, 22, 34235 only).' } : {}) }) @@ -4485,7 +4490,7 @@ const NoteList = forwardRef( useFeedFilterTabRowPortal && feedClientFilterTabRowHost const feedClientFilterPanelSurfaceClass = feedClientFilterPanelPortalMode - ? 'absolute top-full right-0 z-50 mt-1 w-[min(100vw-1rem,28rem)] max-w-[calc(100vw-1rem)] space-y-3 rounded-lg border border-border bg-background p-3 shadow-lg' + ? 'space-y-3 border-b border-border/80 bg-background/95 px-2 py-3 backdrop-blur supports-[backdrop-filter]:bg-background/80' : 'space-y-3 border-t border-border/60 px-2 py-3' const feedClientFilterSectionClass = 'space-y-2 rounded-md border border-border/60 bg-muted/25 p-2.5' @@ -4685,10 +4690,7 @@ const NoteList = forwardRef( ) : null const feedClientFilterChrome = feedClientFilterPanelPortalMode ? ( -
- {feedClientFilterToggleButton} - {feedClientFilterPanel} -
+ feedClientFilterToggleButton ) : ( <>
{feedClientFilterToggleButton}
@@ -4696,6 +4698,10 @@ const NoteList = forwardRef( ) + /** Tab-row portal: toggle lives in the header; panel expands in-flow above the list. */ + const feedClientFilterPanelInList = + feedClientFilterPanelPortalMode ? feedClientFilterPanel : null + const feedClientFilterBarEmbedded = (
{feedClientFilterChrome} @@ -4892,6 +4898,7 @@ const NoteList = forwardRef(
) : null} {showFeedClientFilter ? feedClientFilterBar : null} + {feedClientFilterPanelInList} {list}
@@ -4906,6 +4913,7 @@ const NoteList = forwardRef( ) : null} {showFeedClientFilter ? feedClientFilterBar : null} + {feedClientFilterPanelInList} {list} )} diff --git a/src/components/RefreshButton/index.tsx b/src/components/RefreshButton/index.tsx index 57d84c0b..e29454c0 100644 --- a/src/components/RefreshButton/index.tsx +++ b/src/components/RefreshButton/index.tsx @@ -46,7 +46,7 @@ export function RefreshButton({ onClick() setTimeout(() => setRefreshing(false), 500) }} - className="text-muted-foreground focus:text-foreground [&_svg]:size-3 h-8 px-2 text-xs" + className="h-8 shrink-0 px-1.5 text-muted-foreground focus:text-foreground [&_svg]:size-3" > {refreshing ? ( diff --git a/src/components/ReplyNote/index.tsx b/src/components/ReplyNote/index.tsx index 5e245a7d..8cd4d025 100644 --- a/src/components/ReplyNote/index.tsx +++ b/src/components/ReplyNote/index.tsx @@ -142,12 +142,12 @@ export default function ReplyNote({ className="shrink-0" short={isSmallScreen} /> + - {webReactionParentUrl ? (
diff --git a/src/components/Tabs/index.tsx b/src/components/Tabs/index.tsx index 0b1b2d17..f219edd3 100644 --- a/src/components/Tabs/index.tsx +++ b/src/components/Tabs/index.tsx @@ -1,5 +1,5 @@ import { cn } from '@/lib/utils' -import { useDeepBrowsing } from '@/providers/DeepBrowsingProvider' +import { useDeepBrowsing } from '@/providers/DeepBrowsingProvider' import { ReactNode, useCallback, useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -40,7 +40,7 @@ export default function Tabs({ const activeTab = tabRefs.current[activeIndex] const tabsContainer = tabsContainerRef.current const { offsetWidth, offsetLeft, offsetHeight } = activeTab - const padding = 24 // 12px padding on each side + const padding = Math.min(24, Math.max(8, offsetWidth * 0.12)) // Get the container's top position relative to the viewport const containerTop = tabsContainer.getBoundingClientRect().top @@ -124,15 +124,15 @@ export default function Tabs({
threshold ? '-translate-y-[calc(100%+12rem)]' : '' )} > -
+
{tabs.map((tab, index) => ( ))}
- {options &&
{options}
} + {options ? ( +
{options}
+ ) : null}
) } diff --git a/src/components/ZapDialog/PostPaymentMessagePrompt.tsx b/src/components/ZapDialog/PostPaymentMessagePrompt.tsx index 21eb38e8..8fe5cbca 100644 --- a/src/components/ZapDialog/PostPaymentMessagePrompt.tsx +++ b/src/components/ZapDialog/PostPaymentMessagePrompt.tsx @@ -140,7 +140,7 @@ export default function PostPaymentMessagePrompt({ {t('Post payment prompt label')} ) : null} -
{body}
+
{body}
{step === 'choice' ? ( {choiceActions} ) : null} @@ -152,7 +152,7 @@ export default function PostPaymentMessagePrompt({ return ( e.preventDefault()} > @@ -161,7 +161,7 @@ export default function PostPaymentMessagePrompt({ {t('Post payment prompt label')} ) : null} -
{body}
+
{body}
{step === 'choice' ? ( {choiceActions} ) : null} diff --git a/src/components/ZapDialog/PublicMessageForm.tsx b/src/components/ZapDialog/PublicMessageForm.tsx index 09291248..23ce737e 100644 --- a/src/components/ZapDialog/PublicMessageForm.tsx +++ b/src/components/ZapDialog/PublicMessageForm.tsx @@ -94,15 +94,17 @@ export default function PublicMessageForm({ return (

{t('Tip notice prompt description')}

-