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(error-tracking): shared assignee and status picker components (2/5) (#61748)

Matt Pua67ae04f54936
diff --git a/.agents/skills/dashboard-widgets/references/composition.md b/.agents/skills/dashboard-widgets/references/composition.md
index abeae5fdc5d8..d797c87a5599 100644
--- a/.agents/skills/dashboard-widgets/references/composition.md
+++ b/.agents/skills/dashboard-widgets/references/composition.md
@@ -151,6 +151,7 @@ Per-type stories: `widgets/<product>/<Component>.stories.tsx` under **Widget typ
- Meta `title` must be a **string literal** matching `DASHBOARD_WIDGET_GROUP_LABELS[groupId]` / `label` (CSF rejects dynamic titles)
- Compose with `WidgetCard` + `WidgetCardHeader` + `WidgetCardBody` + catalog header metadata — see `ErrorTrackingWidget.stories.tsx`
- Product setup state: Kea seed helpers live in `widgetCardStoryFixtures.tsx` (`withErrorTrackingProjectState`, etc.) — do not export decorators from `*.stories.tsx` (Storybook treats exports as stories)
+- Frozen dates: spread `widgetStorybookParameters` in story `parameters` and align fixture timestamps in `widgetOverviewStoryFixtures.ts` to `WIDGET_STORYBOOK_MOCK_DATE` so TZLabel / relative copy stays stable in visual review
- Stack decorators carefully: story-level `withErrorTrackingProjectState(false)` must not be overridden by a meta decorator that seeds `true`
## Unknown / deploy-skew widget types
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 5db6a27080af..f486e4a6986e 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -1485,9 +1485,9 @@ snapshots:
components-verticalnesteddnd--base--light:
hash: v1.k794b7964.b210ce352a085f9ed57aed4675cc78d23db5d2312f276ec790040b2ce27e293a.duU6Lgj4ID4h_Qo76s2bErUZYu2IuRIHoy4D7_tCGT4
dashboards-dashboard-widgets-overview--all-widget-types--dark:
- hash: v1.k794b7964.df644170c7e3b94a3ee029ce20a13f3748017c1679ae6ce3b653bc252f5ee272.czpDUOb7VbwR1ai5GFTonORmHxeonG1_8vostqsUeY4
+ hash: v1.k794b7964.d8fb73a9d12018dabe304134e94103565a858b3e07b2f8629fee870ab0299d21.3MD1OvLnswqhNYqUY5R1XXeOVqZkGR8Si688strKe6g
dashboards-dashboard-widgets-overview--all-widget-types--light:
- hash: v1.k794b7964.27c34dd030497662e0054c74af15da59ec9919f8d3d11abbe027dafd5d6b8647.p02F6ZeldXRYLORbR39-qwdrCgnkam5DP6eG58vnuVc
+ hash: v1.k794b7964.c83be8c292d11f14670cbd097912d6d37aa3071e1386152113ba7bcb13166e2a.vFeA7LlQU1EddQ5yACEWeaLfK9HE911ZvL9CUBTUm4Q
dashboards-dashboard-widgets-widget-types-error-tracking-top-issues--empty--dark:
hash: v1.k794b7964.37b0f3093591c5d717106e98dc91ca4288d2562cdb240750c1223ae2bce4f8af.K92XY4q1UjFlYZ0DhQ8G02rowmJ7Ed0FxirKIANkTog
dashboards-dashboard-widgets-widget-types-error-tracking-top-issues--empty--light:
diff --git a/products/dashboards/frontend/components/WidgetCard/DashboardWidgetsOverview.stories.tsx b/products/dashboards/frontend/components/WidgetCard/DashboardWidgetsOverview.stories.tsx
index efb7e0b276b0..6ce29464bda0 100644
--- a/products/dashboards/frontend/components/WidgetCard/DashboardWidgetsOverview.stories.tsx
+++ b/products/dashboards/frontend/components/WidgetCard/DashboardWidgetsOverview.stories.tsx
@@ -13,7 +13,7 @@ import { getDashboardWidgetDefinition } from '../../widgets/registry'
import { WidgetCard } from './WidgetCard'
import { WidgetCardBody } from './WidgetCardBody'
import { WidgetCardHeader, widgetCardShouldHideMoreButton } from './WidgetCardHeader'
-import { mockMoreOverlay, withErrorTrackingProjectState } from './widgetCardStoryFixtures'
+import { mockMoreOverlay, widgetStorybookParameters, withErrorTrackingProjectState } from './widgetCardStoryFixtures'
import { getWidgetOverviewDemoState } from './widgetOverviewStoryFixtures'
// Dashboard grid row height — see DashboardItems BASE_ROW_HEIGHT.
@@ -104,6 +104,7 @@ const meta: Meta<typeof DashboardWidgetsOverview> = {
component: DashboardWidgetsOverview,
parameters: {
layout: 'fullscreen',
+ ...widgetStorybookParameters,
docs: {
description: {
component:
diff --git a/products/dashboards/frontend/components/WidgetCard/WidgetCard.stories.tsx b/products/dashboards/frontend/components/WidgetCard/WidgetCard.stories.tsx
index b4d74bc64b43..41ee30843ebc 100644
--- a/products/dashboards/frontend/components/WidgetCard/WidgetCard.stories.tsx
+++ b/products/dashboards/frontend/components/WidgetCard/WidgetCard.stories.tsx
@@ -10,6 +10,7 @@ import {
dashboardTileTopHeading,
mockMoreOverlay,
sampleListBody,
+ widgetStorybookParameters,
widgetTileFrameDecorator,
} from './widgetCardStoryFixtures'
@@ -69,6 +70,7 @@ const meta: Meta<typeof WidgetCardStory> = {
component: WidgetCardStory,
parameters: {
layout: 'padded',
+ ...widgetStorybookParameters,
},
decorators: widgetTileFrameDecorator,
args: {
diff --git a/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx b/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx
index 3408326a0681..3ee4d0ecf922 100644
--- a/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx
+++ b/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx
@@ -16,6 +16,14 @@ import { WidgetCardContent } from './WidgetCardBody'
export const TILE_WIDTH = 560
export const TILE_HEIGHT = 480
+/** Freeze Storybook/VR "now" — keeps relative dates stable. Matches fixture timestamps in widgetOverviewStoryFixtures. */
+export const WIDGET_STORYBOOK_MOCK_DATE = '2026-05-26T10:00:00'
+
+/** Spread into story `parameters` so `withMockDate` pins TZLabel / relative copy in VR snapshots. */
+export const widgetStorybookParameters = {
+ mockDate: WIDGET_STORYBOOK_MOCK_DATE,
+} as const
+
export function WidgetTileFrame({ children }: { children: React.ReactNode }): JSX.Element {
return (
<div
diff --git a/products/dashboards/frontend/widgets/error_tracking/EditErrorTrackingWidgetModal.stories.tsx b/products/dashboards/frontend/widgets/error_tracking/EditErrorTrackingWidgetModal.stories.tsx
index 2fa32c7b5406..a7b455bda84a 100644
--- a/products/dashboards/frontend/widgets/error_tracking/EditErrorTrackingWidgetModal.stories.tsx
+++ b/products/dashboards/frontend/widgets/error_tracking/EditErrorTrackingWidgetModal.stories.tsx
@@ -1,6 +1,9 @@
import type { Meta, StoryObj } from '@storybook/react'
-import { withErrorTrackingProjectState } from '../../components/WidgetCard/widgetCardStoryFixtures'
+import {
+ widgetStorybookParameters,
+ withErrorTrackingProjectState,
+} from '../../components/WidgetCard/widgetCardStoryFixtures'
import { getDashboardWidgetCatalogEntry } from '../../widget_types/catalog'
import type { DashboardWidgetEditModalProps } from '../registry'
import { EditErrorTrackingWidgetModal } from './EditErrorTrackingWidgetModal'
@@ -40,6 +43,7 @@ const meta: Meta<typeof EditErrorTrackingWidgetModalStory> = {
component: EditErrorTrackingWidgetModalStory,
parameters: {
layout: 'fullscreen',
+ ...widgetStorybookParameters,
},
decorators: [],
args: {
diff --git a/products/dashboards/frontend/widgets/error_tracking/ErrorTrackingWidget.stories.tsx b/products/dashboards/frontend/widgets/error_tracking/ErrorTrackingWidget.stories.tsx
index 989117d7d1de..e0c105c06c3e 100644
--- a/products/dashboards/frontend/widgets/error_tracking/ErrorTrackingWidget.stories.tsx
+++ b/products/dashboards/frontend/widgets/error_tracking/ErrorTrackingWidget.stories.tsx
@@ -8,9 +8,11 @@ import { WidgetCardBody } from '../../components/WidgetCard/WidgetCardBody'
import { WidgetCardHeader, widgetCardShouldHideMoreButton } from '../../components/WidgetCard/WidgetCardHeader'
import {
mockMoreOverlay,
+ widgetStorybookParameters,
widgetTileFrameDecorator,
withErrorTrackingProjectState,
} from '../../components/WidgetCard/widgetCardStoryFixtures'
+import { errorTrackingSampleIssues } from '../../components/WidgetCard/widgetOverviewStoryFixtures'
import { getDashboardWidgetCatalogEntry, getDashboardWidgetGroupLabel } from '../../widget_types/catalog'
import type { DashboardWidgetComponentProps } from '../registry'
import { ErrorTrackingWidget } from './ErrorTrackingWidget'
@@ -56,68 +58,13 @@ function ErrorTrackingWidgetTileStory({
)
}
-const sampleIssues = [
- {
- id: 'issue-1',
- name: 'TypeError: Cannot read properties of undefined',
- description: 'User profile settings fail to load when the session cache is empty.',
- function: 'loadProfile',
- source: 'https://app.example.test/static/js/settings.js',
- library: 'web',
- status: 'active',
- assignee: null,
- first_seen: '2026-05-01T10:00:00.000Z',
- last_seen: '2026-05-26T08:00:00.000Z',
- aggregations: {
- occurrences: 42,
- sessions: 18,
- users: 12,
- volume_buckets: [
- { label: '2026-05-20T00:00:00.000Z', value: 2 },
- { label: '2026-05-21T00:00:00.000Z', value: 4 },
- { label: '2026-05-22T00:00:00.000Z', value: 8 },
- { label: '2026-05-23T00:00:00.000Z', value: 12 },
- { label: '2026-05-24T00:00:00.000Z', value: 6 },
- { label: '2026-05-25T00:00:00.000Z', value: 5 },
- { label: '2026-05-26T00:00:00.000Z', value: 5 },
- ],
- },
- },
- {
- id: 'issue-2',
- name: 'NetworkError: Failed to fetch',
- description: 'Checkout requests fail when the payment API is unavailable.',
- function: 'fetch',
- source: 'https://app.example.test/static/js/api.js',
- library: 'web',
- status: 'pending_release',
- assignee: null,
- first_seen: '2026-05-10T10:00:00.000Z',
- last_seen: '2026-05-25T12:00:00.000Z',
- aggregations: {
- occurrences: 18,
- sessions: 9,
- users: 7,
- volume_buckets: [
- { label: '2026-05-20T00:00:00.000Z', value: 1 },
- { label: '2026-05-21T00:00:00.000Z', value: 2 },
- { label: '2026-05-22T00:00:00.000Z', value: 3 },
- { label: '2026-05-23T00:00:00.000Z', value: 2 },
- { label: '2026-05-24T00:00:00.000Z', value: 4 },
- { label: '2026-05-25T00:00:00.000Z', value: 3 },
- { label: '2026-05-26T00:00:00.000Z', value: 3 },
- ],
- },
- },
-]
-
// Storybook CSF requires a string literal `title` derived from catalog groupLabel/label.
const meta: Meta<typeof ErrorTrackingWidgetTileStory> = {
title: 'Dashboards/Dashboard Widgets/Widget types/Error tracking/Top issues',
component: ErrorTrackingWidgetTileStory,
parameters: {
layout: 'padded',
- mockDate: '2026-05-26T10:00:00',
+ ...widgetStorybookParameters,
},
decorators: [...widgetTileFrameDecorator],
args: {
@@ -141,7 +88,7 @@ export const Populated: Story = {
config: { ...DEFAULT_CONFIG, orderBy: 'occurrences' },
loading: false,
result: {
- results: sampleIssues,
+ results: errorTrackingSampleIssues,
hasMore: true,
limit: 10,
},
diff --git a/products/dashboards/frontend/widgets/previews/ErrorTrackingWidgetPreview.tsx b/products/dashboards/frontend/widgets/previews/ErrorTrackingWidgetPreview.tsx
index 066b7786f28f..2351e8a8f176 100644
--- a/products/dashboards/frontend/widgets/previews/ErrorTrackingWidgetPreview.tsx
+++ b/products/dashboards/frontend/widgets/previews/ErrorTrackingWidgetPreview.tsx
@@ -2,88 +2,9 @@ import { ErrorTrackingIssue } from '~/queries/schema/schema-general'
import { ErrorTrackingIssueList } from 'products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList'
-const PREVIEW_ISSUES: ErrorTrackingIssue[] = [
- {
- id: 'preview-1',
- name: 'Checkout API timeout',
- description:
- 'Checkout requests occasionally time out while creating a payment session, preventing upgrades from completing.',
- function: 'fetch',
- source: 'https://app.hedgebox.test/static/js/api.js',
- library: 'web',
- status: 'active',
- assignee: null,
- first_seen: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),
- last_seen: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(),
- aggregations: {
- occurrences: 42,
- sessions: 18,
- users: 12,
- volume_buckets: [
- { label: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString(), value: 2 },
- { label: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(), value: 4 },
- { label: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString(), value: 3 },
- { label: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(), value: 8 },
- { label: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(), value: 12 },
- { label: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(), value: 6 },
- { label: new Date().toISOString(), value: 4 },
- ],
- },
- },
- {
- id: 'preview-2',
- name: 'File preview render failure',
- description:
- 'Preview rendering fails for some uploaded PDFs, leaving customers unable to inspect files before sharing them.',
- function: 'renderPreview',
- source: 'https://app.hedgebox.test/static/js/workers/pdf.js',
- library: 'web',
- status: 'active',
- assignee: null,
- first_seen: new Date(Date.now() - 14 * 24 * 60 * 60 * 1000).toISOString(),
- last_seen: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(),
- aggregations: {
- occurrences: 18,
- sessions: 9,
- users: 7,
- volume_buckets: [
- { label: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString(), value: 1 },
- { label: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(), value: 1 },
- { label: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString(), value: 2 },
- { label: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(), value: 3 },
- { label: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(), value: 2 },
- { label: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(), value: 1 },
- { label: new Date().toISOString(), value: 1 },
- ],
- },
- },
- {
- id: 'preview-3',
- name: 'TypeError: Cannot read properties of undefined',
- description: 'User profile settings fail to load when the session cache is empty.',
- function: 'loadProfile',
- source: 'https://app.hedgebox.test/static/js/settings.js',
- library: 'web',
- status: 'pending_release',
- assignee: null,
- first_seen: new Date(Date.now() - 21 * 24 * 60 * 60 * 1000).toISOString(),
- last_seen: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(),
- aggregations: {
- occurrences: 9,
- sessions: 4,
- users: 3,
- volume_buckets: [
- { label: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString(), value: 0 },
- { label: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(), value: 1 },
- { label: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString(), value: 0 },
- { label: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(), value: 2 },
- { label: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(), value: 1 },
- { label: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(), value: 0 },
- { label: new Date().toISOString(), value: 0 },
- ],
- },
- },
-]
+import { errorTrackingSampleIssues } from '../../components/WidgetCard/widgetOverviewStoryFixtures'
+
+const PREVIEW_ISSUES = errorTrackingSampleIssues as ErrorTrackingIssue[]
export function ErrorTrackingWidgetPreview(): JSX.Element {
return (
diff --git a/products/dashboards/frontend/widgets/session_replay/EditSessionReplayWidgetModal.stories.tsx b/products/dashboards/frontend/widgets/session_replay/EditSessionReplayWidgetModal.stories.tsx
index 974c69f6e945..f81c2c77a3dd 100644
--- a/products/dashboards/frontend/widgets/session_replay/EditSessionReplayWidgetModal.stories.tsx
+++ b/products/dashboards/frontend/widgets/session_replay/EditSessionReplayWidgetModal.stories.tsx
@@ -1,6 +1,9 @@
import type { Meta, StoryObj } from '@storybook/react'
-import { withSessionReplayProjectState } from '../../components/WidgetCard/widgetCardStoryFixtures'
+import {
+ widgetStorybookParameters,
+ withSessionReplayProjectState,
+} from '../../components/WidgetCard/widgetCardStoryFixtures'
import { getDashboardWidgetCatalogEntry } from '../../widget_types/catalog'
import type { DashboardWidgetEditModalProps } from '../registry'
import { EditSessionReplayWidgetModal } from './EditSessionReplayWidgetModal'
@@ -39,6 +42,7 @@ const meta: Meta<typeof EditSessionReplayWidgetModalStory> = {
component: EditSessionReplayWidgetModalStory,
parameters: {
layout: 'fullscreen',
+ ...widgetStorybookParameters,
},
decorators: [],
args: {
diff --git a/products/dashboards/frontend/widgets/session_replay/SessionReplayWidget.stories.tsx b/products/dashboards/frontend/widgets/session_replay/SessionReplayWidget.stories.tsx
index 53c914e619e8..e6a6290b0995 100644
--- a/products/dashboards/frontend/widgets/session_replay/SessionReplayWidget.stories.tsx
+++ b/products/dashboards/frontend/widgets/session_replay/SessionReplayWidget.stories.tsx
@@ -8,6 +8,7 @@ import { WidgetCardBody } from '../../components/WidgetCard/WidgetCardBody'
import { WidgetCardHeader, widgetCardShouldHideMoreButton } from '../../components/WidgetCard/WidgetCardHeader'
import {
mockMoreOverlay,
+ widgetStorybookParameters,
widgetTileFrameDecorator,
withSessionReplayProjectState,
} from '../../components/WidgetCard/widgetCardStoryFixtures'
@@ -63,6 +64,7 @@ const meta: Meta<typeof SessionReplayWidgetTileStory> = {
component: SessionReplayWidgetTileStory,
parameters: {
layout: 'padded',
+ ...widgetStorybookParameters,
},
decorators: [...widgetTileFrameDecorator],
args: {
diff --git a/products/error_tracking/frontend/components/Assignee/AssigneeSelect.tsx b/products/error_tracking/frontend/components/Assignee/AssigneeSelect.tsx
index f779f8c49ebc..6a1437b5af47 100644
--- a/products/error_tracking/frontend/components/Assignee/AssigneeSelect.tsx
+++ b/products/error_tracking/frontend/components/Assignee/AssigneeSelect.tsx
@@ -13,10 +13,13 @@ export const AssigneeSelect = ({
assignee,
onChange,
children,
+ fullWidth = false,
}: {
assignee: ErrorTrackingIssue['assignee']
onChange: (assignee: ErrorTrackingIssue['assignee']) => void
children: (assignee: Assignee, isOpen: boolean) => JSX.Element
+ /** When true, the trigger fills its container (e.g. a grid column). Default is content width for filter bars. */
+ fullWidth?: boolean
}): JSX.Element => {
const { setSearch, ensureAssigneeTypesLoaded } = useActions(assigneeSelectLogic)
const [showPopover, setShowPopover] = useState(false)
@@ -39,7 +42,7 @@ export const AssigneeSelect = ({
onVisibilityChange={(visible) => setShowPopover(visible)}
overlay={<AssigneeDropdown assignee={assignee} onChange={_onChange} />}
>
- <div>
+ <div className={fullWidth ? 'w-full' : 'w-fit'}>
<AssigneeResolver assignee={assignee}>
{({ assignee: resolvedAssignee }) => children(resolvedAssignee, showPopover)}
</AssigneeResolver>
diff --git a/products/error_tracking/frontend/components/Assignee/ErrorTrackingAssigneeSelectButton.tsx b/products/error_tracking/frontend/components/Assignee/ErrorTrackingAssigneeSelectButton.tsx
new file mode 100644
index 000000000000..d53da16579d0
--- /dev/null
+++ b/products/error_tracking/frontend/components/Assignee/ErrorTrackingAssigneeSelectButton.tsx
@@ -0,0 +1,49 @@
+import { useActions, useValues } from 'kea'
+
+import { LemonButton } from '@posthog/lemon-ui'
+
+import { ErrorTrackingIssue } from '~/queries/schema/schema-general'
+
+import { issueQueryOptionsLogic } from '../IssueQueryOptions/issueQueryOptionsLogic'
+import { AssigneeIconDisplay, AssigneeLabelDisplay } from './AssigneeDisplay'
+import { AssigneeSelect } from './AssigneeSelect'
+
+type ErrorTrackingAssigneeSelectButtonProps = {
+ assignee: ErrorTrackingIssue['assignee']
+ onChange: (assignee: ErrorTrackingIssue['assignee']) => void
+ placeholder?: string
+ fullWidth?: boolean
+}
+
+export function ErrorTrackingAssigneeSelectButton({
+ assignee,
+ onChange,
+ placeholder = 'Any assignee',
+ fullWidth,
+}: ErrorTrackingAssigneeSelectButtonProps): JSX.Element {
+ return (
+ <AssigneeSelect assignee={assignee ?? null} onChange={onChange} fullWidth={fullWidth}>
+ {(displayAssignee) => (
+ <LemonButton type="secondary" size="small" fullWidth={fullWidth}>
+ <span className="flex items-center gap-1 min-w-0">
+ <AssigneeIconDisplay assignee={displayAssignee} size="small" />
+ <AssigneeLabelDisplay
+ assignee={displayAssignee}
+ placeholder={placeholder}
+ size="small"
+ className="truncate"
+ />
+ </span>
+ </LemonButton>
+ )}
+ </AssigneeSelect>
+ )
+}
+
+/** Issues tab filter bar — wires shared button to issueQueryOptionsLogic. */
+export function AssigneeFilter(): JSX.Element {
+ const { assignee } = useValues(issueQueryOptionsLogic)
+ const { setAssignee } = useActions(issueQueryOptionsLogic)
+
+ return <ErrorTrackingAssigneeSelectButton assignee={assignee ?? null} onChange={(value) => setAssignee(value)} />
+}
diff --git a/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.test.tsx b/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.test.tsx
index 09046dae5930..d26b880cd383 100644
--- a/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.test.tsx
+++ b/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.test.tsx
@@ -39,13 +39,25 @@ describe('ErrorTrackingIssueListRow', () => {
cleanup()
})
- it('links to the error tracking issue page with last_seen timestamp', () => {
+ it('renders read-only status and assignee when canMutateIssues is false', () => {
+ render(
+ <Provider>
+ <ErrorTrackingIssueListRow issue={ISSUE} canMutateIssues={false} />
+ </Provider>
+ )
+
+ expect(screen.queryByRole('button', { name: /Unassigned/i })).not.toBeInTheDocument()
+ expect(screen.getAllByRole('link')).toHaveLength(1)
+ })
+
+ it('links only the issue title to the error tracking issue page with last_seen timestamp', () => {
render(
<Provider>
<ErrorTrackingIssueListRow issue={ISSUE} />
</Provider>
)
+ expect(screen.getAllByRole('link')).toHaveLength(1)
const link = screen.getByRole('link', { name: /TypeError: undefined is not a function/i })
expect(link.getAttribute('href')).toMatch(
/\/error_tracking\/issue-abc\?timestamp=2026-05-26T08%3A00%3A00\.000Z$/
diff --git a/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.tsx b/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.tsx
index 6ab34b1a03be..d183451acfa6 100644
--- a/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.tsx
+++ b/products/error_tracking/frontend/components/ErrorTrackingIssueList/ErrorTrackingIssueList.tsx
@@ -1,5 +1,7 @@
+import { useActions } from 'kea'
import { useMemo } from 'react'
+import { IconChevronDown, IconChevronRight } from '@posthog/icons'
import { Link } from '@posthog/lemon-ui'
import { getRuntimeFromLib } from 'lib/components/Errors/utils'
@@ -14,7 +16,10 @@ import { useSparklineData } from '../../hooks/use-sparkline-data'
import { errorTrackingIssueSceneLogic } from '../../scenes/ErrorTrackingIssueScene/errorTrackingIssueSceneLogic'
import { ERROR_TRACKING_LISTING_RESOLUTION, sourceDisplay } from '../../utils'
import { AssigneeIconDisplay, AssigneeLabelDisplay, AssigneeResolver } from '../Assignee/AssigneeDisplay'
+import { AssigneeSelect } from '../Assignee/AssigneeSelect'
import { StatusIndicator } from '../Indicators'
+import { issueActionsLogic } from '../IssueActions/issueActionsLogic'
+import { IssueStatusSelect } from '../IssueStatusSelect'
import { RuntimeIcon } from '../RuntimeIcon'
import { CustomSeparator } from '../TableColumns'
import { VolumeSparkline } from '../VolumeSparkline/VolumeSparkline'
@@ -46,7 +51,16 @@ function prefetchIssueScene(issue: ErrorTrackingIssue): void {
issueLogic.actions.setIssue(issue)
}
-export function ErrorTrackingIssueListRow({ issue }: { issue: ErrorTrackingIssue }): JSX.Element {
+export function ErrorTrackingIssueListRow({
+ issue,
+ orderBy = 'last_seen',
+ canMutateIssues = true,
+}: {
+ issue: ErrorTrackingIssue
+ orderBy?: string
+ canMutateIssues?: boolean
+}): JSX.Element {
+ const { updateIssueAssignee, updateIssueStatus } = useActions(issueActionsLogic)
const runtime = getRuntimeFromLib(issue.library)
const sparklineKey = issue.id ?? 'issue-unknown'
const sparklineData = useSparklineData(issue.aggregations, ERROR_TRACKING_LISTING_RESOLUTION)
@@ -61,19 +75,21 @@ export function ErrorTrackingIssueListRow({ issue }: { issue: ErrorTrackingIssue
)
return (
- <Link
- to={issueUrl}
+ <div
className={cn(
- 'grid items-start gap-3 border-b border-primary px-3 py-2 last:border-b-0 text-primary transition-colors hover:bg-fill-button-tertiary-hover',
+ 'grid items-start gap-3 border-b border-primary px-3 py-2 last:border-b-0 transition-colors hover:bg-fill-button-tertiary-hover',
ERROR_TRACKING_ISSUE_LIST_GRID_COLS
)}
- onClick={() => prefetchIssueScene(issue)}
>
<div className="flex min-w-0 flex-col gap-0.5">
- <div className="flex items-center gap-2 text-sm">
+ <Link
+ to={issueUrl}
+ className="flex items-center gap-2 text-sm text-primary"
+ onClick={() => prefetchIssueScene(issue)}
+ >
<RuntimeIcon className="shrink-0" runtime={runtime} fontSize="0.75rem" />
<span className="line-clamp-1 font-semibold">{issue.name || 'Unknown Type'}</span>
- </div>
+ </Link>
{issue.description ? (
<div title={issue.description} className="line-clamp-1 text-xs font-medium text-muted">
{issue.description}
@@ -86,22 +102,63 @@ export function ErrorTrackingIssueListRow({ issue }: { issue: ErrorTrackingIssue
</div>
) : null}
<div className="flex items-center gap-1 text-secondary">
- <StatusIndicator status={issue.status} size="xsmall" className="ml-0 text-xs text-secondary" />
+ {canMutateIssues ? (
+ <IssueStatusSelect
+ status={issue.status}
+ onChange={(status) => updateIssueStatus(issue.id, status)}
+ />
+ ) : (
+ <StatusIndicator status={issue.status} size="small" />
+ )}
<CustomSeparator />
- <AssigneeResolver assignee={issue.assignee}>
- {({ assignee }) => (
- <div className="ml-1 flex items-center text-xs text-secondary">
- <AssigneeIconDisplay assignee={assignee} size="xsmall" />
- <AssigneeLabelDisplay
- assignee={assignee}
- className="ml-1 text-xs text-secondary"
- size="xsmall"
- placeholder="Unassigned"
- />
- </div>
- )}
- </AssigneeResolver>
+ {canMutateIssues ? (
+ <AssigneeSelect
+ assignee={issue.assignee}
+ onChange={(assignee) => updateIssueAssignee(issue.id, assignee)}
+ >
+ {(anyAssignee) => (
+ <div
+ className="ml-1 flex cursor-pointer items-center rounded p-[0.1rem] text-xs text-secondary hover:bg-fill-button-tertiary-hover"
+ role="button"
+ >
+ <AssigneeIconDisplay assignee={anyAssignee} size="xsmall" />
+ <AssigneeLabelDisplay
+ assignee={anyAssignee}
+ className="ml-1 text-xs text-secondary"
+ size="xsmall"
+ placeholder="Unassigned"
+ />
+ <IconChevronDown />
+ </div>
+ )}
+ </AssigneeSelect>
+ ) : (
+ <AssigneeResolver assignee={issue.assignee}>
+ {({ assignee: resolvedAssignee }) => (
+ <div className="ml-1 flex items-center text-xs text-secondary">
+ <AssigneeIconDisplay assignee={resolvedAssignee} size="xsmall" />
+ <AssigneeLabelDisplay
+ assignee={resolvedAssignee}
+ className="ml-1 text-xs text-secondary"
+ size="xsmall"
+ placeholder="Unassigned"
+ />
+ </div>
+ )}
+ </AssigneeResolver>
+ )}
<CustomSeparator />
+ {orderBy === 'first_seen' && issue.first_seen ? (
+ <>
+ <TZLabel
+ time={issue.first_seen}
+ className="ml-1 border-b border-dotted text-xs"
+ suffix="old"
+ delayMs={750}
+ />
+ <IconChevronRight className="mx-0.5 text-quaternary" fontSize="0.75rem" />
+ </>
+ ) : null}
{issue.last_seen ? (
<TZLabel time={issue.last_seen} className="ml-1 border-b border-dotted text-xs" delayMs={750} />
) : null}
@@ -118,27 +175,40 @@ export function ErrorTrackingIssueListRow({ issue }: { issue: ErrorTrackingIssue
/>
</div>
</div>
- <div className="pt-1 text-center text-base font-medium tabular-nums">
+ <div className="pt-1 text-center text-base font-medium tabular-nums text-primary">
{humanFriendlyLargeNumber(occurrences)}
</div>
- </Link>
+ </div>
)
}
type ErrorTrackingIssueListProps = {
issues: ErrorTrackingIssue[]
+ orderBy?: string
+ canMutateIssues?: boolean
className?: string
listClassName?: string
}
-export function ErrorTrackingIssueList({ issues, className, listClassName }: ErrorTrackingIssueListProps): JSX.Element {
+export function ErrorTrackingIssueList({
+ issues,
+ orderBy,
+ canMutateIssues = true,
+ className,
+ listClassName,
+}: ErrorTrackingIssueListProps): JSX.Element {
return (
<div className={cn('min-w-0 w-full max-w-full overflow-x-auto rounded border bg-surface-primary', className)}>
<div className="w-full min-w-0">
<ErrorTrackingIssueListHeader />
<div className={listClassName} data-attr="error-tracking-issue-row">
{issues.map((issue) => (
- <ErrorTrackingIssueListRow key={issue.id} issue={issue} />
+ <ErrorTrackingIssueListRow
+ key={issue.id}
+ issue={issue}
+ orderBy={orderBy}
+ canMutateIssues={canMutateIssues}
+ />
))}
</div>
</div>
diff --git a/products/error_tracking/frontend/components/IssueFilters/Assignee.tsx b/products/error_tracking/frontend/components/IssueFilters/Assignee.tsx
deleted file mode 100644
index 7097f8ed160b..000000000000
--- a/products/error_tracking/frontend/components/IssueFilters/Assignee.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { LemonButton } from '@posthog/lemon-ui'
-
-import { AssigneeLabelDisplay } from '../Assignee/AssigneeDisplay'
-import { AssigneeSelect } from '../Assignee/AssigneeSelect'
-import { issueQueryOptionsLogic } from '../IssueQueryOptions/issueQueryOptionsLogic'
-
-export const AssigneeFilter = (): JSX.Element => {
- const { assignee } = useValues(issueQueryOptionsLogic)
- const { setAssignee } = useActions(issueQueryOptionsLogic)
-
- return (
- <AssigneeSelect assignee={assignee ?? null} onChange={(assignee) => setAssignee(assignee)}>
- {(displayAssignee) => (
- <LemonButton type="secondary" size="small">
- <AssigneeLabelDisplay assignee={displayAssignee} placeholder="Any assignee" />
- </LemonButton>
- )}
- </AssigneeSelect>
- )
-}
diff --git a/products/error_tracking/frontend/components/IssueFilters/Status.tsx b/products/error_tracking/frontend/components/IssueFilters/Status.tsx
index eb35a66a6469..5f3c385eb96a 100644
--- a/products/error_tracking/frontend/components/IssueFilters/Status.tsx
+++ b/products/error_tracking/frontend/components/IssueFilters/Status.tsx
@@ -1,40 +1,61 @@
import { useActions, useValues } from 'kea'
-import { LemonSelect } from '@posthog/lemon-ui'
+import { LemonSelect, type LemonSelectProps } from '@posthog/lemon-ui'
import { ErrorTrackingIssue } from '~/queries/schema/schema-general'
import { LabelIndicator, StatusIndicator } from '../Indicators'
import { issueQueryOptionsLogic } from '../IssueQueryOptions/issueQueryOptionsLogic'
-type Option = ErrorTrackingIssue['status'] | 'all' | null
+export type ErrorTrackingStatusSelectValue = ErrorTrackingIssue['status'] | 'all'
-export const StatusFilter = (): JSX.Element => {
- const { status } = useValues(issueQueryOptionsLogic)
- const { setStatus } = useActions(issueQueryOptionsLogic)
+const STATUS_OPTIONS: ErrorTrackingStatusSelectValue[] = ['all', 'active', 'resolved', 'suppressed']
- const label = (key: Option) => {
- switch (key) {
- case 'all':
- case null:
- return <LabelIndicator intent="muted" label="All" size="small" />
- default:
- return <StatusIndicator status={key} size="small" withTooltip="right" />
- }
+function statusOptionLabel(key: ErrorTrackingStatusSelectValue): JSX.Element {
+ if (key === 'all') {
+ return <LabelIndicator intent="muted" label="All" size="small" />
}
+ return <StatusIndicator status={key} size="small" withTooltip="right" />
+}
- const options: Option[] = ['all', 'active', 'resolved', 'suppressed']
-
+type ErrorTrackingStatusSelectProps = {
+ value: ErrorTrackingStatusSelectValue
+ onChange: (value: ErrorTrackingStatusSelectValue) => void
+} & Pick<LemonSelectProps<ErrorTrackingStatusSelectValue>, 'fullWidth' | 'size' | 'disabled' | 'disabledReason'>
+
+export function ErrorTrackingStatusSelect({
+ value,
+ onChange,
+ fullWidth,
+ size = 'small',
+ disabled,
+ disabledReason,
+}: ErrorTrackingStatusSelectProps): JSX.Element {
return (
<LemonSelect
- onChange={(value) => setStatus(value || undefined)}
- value={status || null}
+ fullWidth={fullWidth}
+ size={size}
+ disabled={disabled}
+ disabledReason={disabledReason}
+ value={value}
+ onChange={(next) => {
+ if (next) {
+ onChange(next)
+ }
+ }}
placeholder="Select status"
- options={options.map((key) => ({
+ options={STATUS_OPTIONS.map((key) => ({
value: key,
- label: label(key),
+ label: statusOptionLabel(key),
}))}
- size="small"
/>
)
}
+
+/** Issues tab filter bar — wires shared select to issueQueryOptionsLogic. */
+export const StatusFilter = (): JSX.Element => {
+ const { status } = useValues(issueQueryOptionsLogic)
+ const { setStatus } = useActions(issueQueryOptionsLogic)
+
+ return <ErrorTrackingStatusSelect value={status ?? 'active'} onChange={(value) => setStatus(value)} />
+}
diff --git a/products/error_tracking/frontend/components/IssueFilters/index.tsx b/products/error_tracking/frontend/components/IssueFilters/index.tsx
index d5a767f1a45f..268975278d47 100644
--- a/products/error_tracking/frontend/components/IssueFilters/index.tsx
+++ b/products/error_tracking/frontend/components/IssueFilters/index.tsx
@@ -1,4 +1,4 @@
-import { AssigneeFilter } from './Assignee'
+import { AssigneeFilter } from '../Assignee/ErrorTrackingAssigneeSelectButton'
import { DateRangeFilter } from './DateRange'
import { FilterGroup } from './FilterGroup'
import { InternalAccountsFilter } from './InternalAccounts'