From a3ce37cdc275743d54f422b00bdf7db7db203819 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Sat, 18 Jul 2026 18:30:18 +0200 Subject: [PATCH] docs(filters): correct the split-context comment The prior wording claimed NotificationsPanel subscribes to actions only, but it reads filters (spreads them into setFilters). No consumer is actions-only today; describe the split's intent without the wrong example. --- frontend/src/components/FeedFiltersProvider.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/FeedFiltersProvider.tsx b/frontend/src/components/FeedFiltersProvider.tsx index d0622a8..a3a897f 100644 --- a/frontend/src/components/FeedFiltersProvider.tsx +++ b/frontend/src/components/FeedFiltersProvider.tsx @@ -17,10 +17,10 @@ import { accountKey, LS, readJSON, readMerged, writeJSON } from "../lib/storage" // through the tree. Mirrors NavigationProvider (split contexts + one-line hooks); composed in // main.tsx inside NavigationProvider, around . // -// TWO contexts on purpose: a STABLE actions context (setFilters never changes reference) and a -// CHANGING state context (the filters object). Context consumers re-render when their value changes, -// so a component that only mutates filters (e.g. NotificationsPanel) subscribes to actions ONLY and -// doesn't re-render on every filter tweak. +// TWO contexts on purpose (mirrors NavigationProvider): a STABLE actions context (setFilters never +// changes reference) and a CHANGING state context (the filters object). Context consumers re-render +// only when the context they read changes — so a component that dispatches filter changes without +// reading the current filters can subscribe to actions ONLY and skip re-rendering on every tweak. // // SCOPE NOTE: this owns the FEED's filters only. The channel detail page keeps its OWN isolated // filter state (ChannelPage) — it renders a channel-scoped catalog, not the global feed — and the