Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(today): add the unread dot to the status filters like desktop (#109822)

Shy Alter5023863fdab2
diff --git a/frontend/src/layout/today/TodayRecentRadioSubmenu.tsx b/frontend/src/layout/today/TodayRecentRadioSubmenu.tsx
index 9b21b80f38c7..1d571591b304 100644
--- a/frontend/src/layout/today/TodayRecentRadioSubmenu.tsx
+++ b/frontend/src/layout/today/TodayRecentRadioSubmenu.tsx
@@ -1,10 +1,10 @@
-import { DropdownMenuRadioGroup, DropdownMenuRadioItem } from '@posthog/quill'
+import { DropdownMenuRadioGroup, DropdownMenuRadioItem, cn } from '@posthog/quill'
import { TodayRecentFilterSubmenu } from './TodayRecentFilterSubmenu'
interface TodayRecentRadioSubmenuProps<T extends string> {
label: string
- options: { value: T; label: string }[]
+ options: { value: T; label: string; dotClassName?: string }[]
value: T
defaultValue: T
onChange: (value: T) => void
@@ -28,7 +28,12 @@ export function TodayRecentRadioSubmenu<T extends string>({
<DropdownMenuRadioGroup value={value} onValueChange={(next) => onChange(next as T)}>
{options.map((option) => (
<DropdownMenuRadioItem key={option.value} value={option.value} data-attr={dataAttr}>
- {option.label}
+ <span className="flex items-center gap-2">
+ {option.dotClassName && (
+ <span aria-hidden className={cn('size-2 shrink-0 rounded-full', option.dotClassName)} />
+ )}
+ {option.label}
+ </span>
</DropdownMenuRadioItem>
))}
</DropdownMenuRadioGroup>
diff --git a/frontend/src/layout/today/todayRecentFilters.ts b/frontend/src/layout/today/todayRecentFilters.ts
index 542f865b6eea..0aacbed21d09 100644
--- a/frontend/src/layout/today/todayRecentFilters.ts
+++ b/frontend/src/layout/today/todayRecentFilters.ts
@@ -29,12 +29,12 @@ export interface TodayRecentFilterContext {
pinnedIds: Set<string>
}
-type FilterOptions<T extends string> = { value: T; label: string }[]
+type FilterOptions<T extends string> = { value: T; label: string; dotClassName?: string }[]
// Like PostHog Desktop. The web has no "Needs input" signal, so Status offers unread only.
export const RECENT_STATUS_OPTIONS: FilterOptions<TodayRecentStatusFilter> = [
{ value: 'any', label: 'Any status' },
- { value: 'unread', label: 'Unread' },
+ { value: 'unread', label: 'Unread', dotClassName: 'bg-primary' },
]
export const RECENT_CREATED_BY_OPTIONS: FilterOptions<TodayRecentCreatedByFilter> = [
diff --git a/products/tasks/frontend/spaces/SpaceFeedFilterMenu.tsx b/products/tasks/frontend/spaces/SpaceFeedFilterMenu.tsx
index f8b77805c64d..14cbfbbb351d 100644
--- a/products/tasks/frontend/spaces/SpaceFeedFilterMenu.tsx
+++ b/products/tasks/frontend/spaces/SpaceFeedFilterMenu.tsx
@@ -3,7 +3,7 @@ import { useActions, useValues } from 'kea'
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from '@posthog/quill'
import { TodayFilterMenuTrigger } from '~/layout/today/TodayFilterMenuTrigger'
-import { RECENT_CREATED_BY_OPTIONS } from '~/layout/today/todayRecentFilters'
+import { RECENT_CREATED_BY_OPTIONS, RECENT_STATUS_OPTIONS } from '~/layout/today/todayRecentFilters'
import { DEFAULT_RECENT_SORT, RECENT_SORT_OPTIONS } from '~/layout/today/todayRecentOrder'
import { TodayRecentRadioSubmenu } from '~/layout/today/TodayRecentRadioSubmenu'
import { TodayRecentSourceSubmenu } from '~/layout/today/TodayRecentSourceSubmenu'
@@ -13,7 +13,6 @@ import {
SpaceFeedEnvironmentFilter,
SpaceFeedGrouping,
SpaceFeedPinnedFilter,
- SpaceFeedStatusFilter,
} from './spaceFeedEntries'
import { spaceFeedViewLogic } from './spaceFeedViewLogic'
@@ -22,11 +21,6 @@ const GROUPING_OPTIONS: { value: SpaceFeedGrouping; label: string }[] = [
{ value: 'repository', label: 'Repository' },
]
-const STATUS_OPTIONS: { value: SpaceFeedStatusFilter; label: string }[] = [
- { value: 'any', label: 'Any status' },
- { value: 'unread', label: 'Unread' },
-]
-
const PINNED_OPTIONS: { value: SpaceFeedPinnedFilter; label: string }[] = [
{ value: 'any', label: 'All sessions' },
{ value: 'pinned', label: 'Pinned only' },
@@ -66,7 +60,7 @@ export function SpaceFeedFilterMenu({ sourceOptions }: { sourceOptions: string[]
<DropdownMenuSeparator />
<TodayRecentRadioSubmenu
label="Status"
- options={STATUS_OPTIONS}
+ options={RECENT_STATUS_OPTIONS}
value={filters.status}
defaultValue={DEFAULT_SPACE_FEED_FILTERS.status}
onChange={(status) => setFilters({ ...filters, status })}