From 08f75a902d140cc0faec720e1213cb6adff00896 Mon Sep 17 00:00:00 2001 From: woikos Date: Mon, 5 Jan 2026 20:38:28 +0100 Subject: [PATCH] Release v0.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-search after QR scan in search bar. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude/settings.local.json | 7 + package.json | 2 +- src/App.tsx | 11 +- src/components/KindFilter/index.tsx | 52 ++++++- src/components/NormalFeed/index.tsx | 4 + src/components/NoteList/index.tsx | 20 ++- src/components/NpubQrCode/index.tsx | 53 ++++++-- src/components/SearchBar/index.tsx | 21 +++ src/components/SearchInput/index.tsx | 85 ++++++++---- src/components/SocialGraphFilter/index.tsx | 127 ++++++++++++++++++ .../StuffStats/KeyboardShortcut.tsx | 13 ++ src/components/StuffStats/LikeButton.tsx | 5 +- src/components/StuffStats/ReplyButton.tsx | 3 +- src/components/StuffStats/RepostButton.tsx | 3 +- src/components/StuffStats/ZapButton.tsx | 3 +- src/components/Username/index.tsx | 43 +++--- src/constants.ts | 2 + src/pages/primary/MePage/index.tsx | 1 + src/pages/primary/NoteListPage/PinnedFeed.tsx | 2 +- src/pages/primary/NoteListPage/RelaysFeed.tsx | 1 + src/providers/DMProvider.tsx | 43 +++++- src/providers/SocialGraphFilterProvider.tsx | 114 ++++++++++++++++ src/services/local-storage.service.ts | 35 +++++ 23 files changed, 572 insertions(+), 78 deletions(-) create mode 100644 .claude/settings.local.json create mode 100644 src/components/SocialGraphFilter/index.tsx create mode 100644 src/components/StuffStats/KeyboardShortcut.tsx create mode 100644 src/providers/SocialGraphFilterProvider.tsx diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..dbc76e0e --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "additionalDirectories": [ + "/home/mleku/src/git.mleku.dev/mleku/coracle" + ] + } +} diff --git a/package.json b/package.json index 2dce8881..67395362 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smesh", - "version": "0.4.0", + "version": "0.4.1", "description": "A user-friendly Nostr client for exploring relay feeds", "private": true, "type": "module", diff --git a/src/App.tsx b/src/App.tsx index d161d99b..2ddb2464 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import { FavoriteRelaysProvider } from '@/providers/FavoriteRelaysProvider' import { FeedProvider } from '@/providers/FeedProvider' import { FollowListProvider } from '@/providers/FollowListProvider' import { KindFilterProvider } from '@/providers/KindFilterProvider' +import { SocialGraphFilterProvider } from '@/providers/SocialGraphFilterProvider' import { MediaUploadServiceProvider } from '@/providers/MediaUploadServiceProvider' import { MuteListProvider } from '@/providers/MuteListProvider' import { NostrProvider } from '@/providers/NostrProvider' @@ -51,10 +52,12 @@ export default function App(): JSX.Element { - - - - + + + + + + diff --git a/src/components/KindFilter/index.tsx b/src/components/KindFilter/index.tsx index c4c8103f..fb3e12f4 100644 --- a/src/components/KindFilter/index.tsx +++ b/src/components/KindFilter/index.tsx @@ -3,10 +3,13 @@ import { Checkbox } from '@/components/ui/checkbox' import { Drawer, DrawerContent, DrawerHeader, DrawerTrigger } from '@/components/ui/drawer' import { Label } from '@/components/ui/label' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' +import { Separator } from '@/components/ui/separator' +import SocialGraphFilter from '@/components/SocialGraphFilter' import { ExtendedKind } from '@/constants' import { cn } from '@/lib/utils' import { useKindFilter } from '@/providers/KindFilterProvider' import { useScreenSize } from '@/providers/ScreenSizeProvider' +import { useSocialGraphFilter } from '@/providers/SocialGraphFilterProvider' import { ListFilter } from 'lucide-react' import { kinds } from 'nostr-tools' import { useEffect, useMemo, useState } from 'react' @@ -34,22 +37,35 @@ const ALL_KINDS = KIND_FILTER_OPTIONS.flatMap(({ kindGroup }) => kindGroup) export default function KindFilter({ showKinds, - onShowKindsChange + onShowKindsChange, + showSocialGraphFilter = false }: { showKinds: number[] onShowKindsChange: (kinds: number[]) => void + showSocialGraphFilter?: boolean }) { const { t } = useTranslation() const { isSmallScreen } = useScreenSize() const { showKinds: savedShowKinds } = useKindFilter() + const { + proximityLevel: savedProximity, + includeMode: savedIncludeMode, + updateProximityLevel, + updateIncludeMode + } = useSocialGraphFilter() const [open, setOpen] = useState(false) const { updateShowKinds } = useKindFilter() const [temporaryShowKinds, setTemporaryShowKinds] = useState(showKinds) + const [temporaryProximity, setTemporaryProximity] = useState(savedProximity) + const [temporaryIncludeMode, setTemporaryIncludeMode] = useState(savedIncludeMode) const [isPersistent, setIsPersistent] = useState(false) - const isDifferentFromSaved = useMemo( - () => !isSameKindFilter(showKinds, savedShowKinds), - [showKinds, savedShowKinds] - ) + + const isDifferentFromSaved = useMemo(() => { + const kindsDifferent = !isSameKindFilter(showKinds, savedShowKinds) + const proximityDifferent = showSocialGraphFilter && savedProximity !== null + return kindsDifferent || proximityDifferent + }, [showKinds, savedShowKinds, savedProximity, showSocialGraphFilter]) + const isTemporaryDifferentFromSaved = useMemo( () => !isSameKindFilter(temporaryShowKinds, savedShowKinds), [temporaryShowKinds, savedShowKinds] @@ -57,8 +73,10 @@ export default function KindFilter({ useEffect(() => { setTemporaryShowKinds(showKinds) + setTemporaryProximity(savedProximity) + setTemporaryIncludeMode(savedIncludeMode) setIsPersistent(false) - }, [open]) + }, [open, savedProximity, savedIncludeMode]) const handleApply = () => { if (temporaryShowKinds.length === 0) { @@ -71,6 +89,16 @@ export default function KindFilter({ onShowKindsChange(newShowKinds) } + // Apply social graph filter changes + if (showSocialGraphFilter) { + if (temporaryProximity !== savedProximity) { + updateProximityLevel(temporaryProximity) + } + if (temporaryIncludeMode !== savedIncludeMode) { + updateIncludeMode(temporaryIncludeMode) + } + } + if (isPersistent) { updateShowKinds(newShowKinds) } @@ -155,6 +183,18 @@ export default function KindFilter({ + {showSocialGraphFilter && ( + <> + + + + )} +