diff --git a/desktop/src/features/home/ui/FeedSection.tsx b/desktop/src/features/home/ui/FeedSection.tsx index 38ce0d4dac..b998a2b48a 100644 --- a/desktop/src/features/home/ui/FeedSection.tsx +++ b/desktop/src/features/home/ui/FeedSection.tsx @@ -122,7 +122,6 @@ type FeedSectionProps = { showDoneAction: boolean; onOpenItem: (item: FeedItem) => void; onMarkDone: (id: string) => void; - onUndoDone: (id: string) => void; }; export function FeedSection({ @@ -138,8 +137,10 @@ export function FeedSection({ showDoneAction, onOpenItem, onMarkDone, - onUndoDone, }: FeedSectionProps) { + const unreadItems = items.filter((item) => !doneSet.has(item.id)); + const readCount = items.length - unreadItems.length; + return (
@@ -147,10 +148,12 @@ export function FeedSection({

{title}

- {items.length} + + {unreadItems.length} +
- {items.length === 0 ? ( + {unreadItems.length === 0 ? (

{emptyTitle} @@ -161,16 +164,15 @@ export function FeedSection({

) : (
- {items.map((item) => { + {unreadItems.map((item) => { const channelId = item.channelId; const canOpenChannel = channelId !== null && availableChannelIds.has(channelId); - const isDone = doneSet.has(item.id); const mentionNames = resolveMentionNames(item.tags, profiles); return (
{canOpenChannel ? ( @@ -186,9 +188,7 @@ export function FeedSection({ ) : null}
- + {feedHeadline(item)} @@ -232,18 +232,14 @@ export function FeedSection({ {showDoneAction ? ( @@ -253,6 +249,12 @@ export function FeedSection({ })}
)} + + {readCount > 0 ? ( +
+ {readCount} read {readCount === 1 ? "message" : "messages"} hidden +
+ ) : null}
); } diff --git a/desktop/src/features/home/ui/HomeView.tsx b/desktop/src/features/home/ui/HomeView.tsx index a6e08a7dfc..2ef66ae2ea 100644 --- a/desktop/src/features/home/ui/HomeView.tsx +++ b/desktop/src/features/home/ui/HomeView.tsx @@ -4,6 +4,7 @@ import { AtSign, Bot, CircleAlert, + Inbox, RefreshCcw, Search, } from "lucide-react"; @@ -39,7 +40,7 @@ const RecentNotesSection = React.lazy(async () => { type HomeTab = "search" | "inbox" | "feed"; const tabTriggerClassName = - "h-8 rounded-full px-4 text-xs font-medium shadow-none transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"; + "h-8 rounded-full px-4 text-xs font-medium shadow-none transition-colors data-[state=active]:bg-foreground data-[state=active]:text-background data-[state=active]:shadow-sm"; function HomeLoadingState() { return ( @@ -126,7 +127,7 @@ export function HomeView({ }: HomeViewProps) { const [activeTab, setActiveTab] = React.useState("search"); const { settings: homeBackgroundSettings } = useHomeBackgroundSettings(); - const { doneSet, markDone, undoDone } = useFeedItemState(currentPubkey); + const { doneSet, markDone } = useFeedItemState(currentPubkey); // Defer Pulse feed queries until the shell is interactive and the tab is open. const startupReady = useDeferredStartup(); @@ -205,110 +206,90 @@ export function HomeView({ ); } - const priorityCount = - feed.feed.needsAction.length + feed.feed.mentions.length; + const openCount = [ + ...feed.feed.needsAction, + ...feed.feed.mentions, + ...(feed.feed.activity ?? []), + ...(feed.feed.agentActivity ?? []), + ].filter((item) => !doneSet.has(item.id)).length; return ( -
-
+
+
-
-
-
-
-
- -

- Priority inbox -

-
-

- Mentions and items waiting for you are grouped here first. -

+
+
+
+
+ +

+ Inbox board +

- - {priorityCount} open -
+ + {openCount} open + +
-
- - -
-
- -
-
-

- Everything else -

-

- Channel activity and agent updates that are useful, but not - urgent. -

-
- -
- - -
-
+
+ + + + +
@@ -381,7 +362,7 @@ export function HomeView({