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.

fix(signals): show the sorted time on inbox report cards (#115681)

posthog[bot]534f723c4e1c
diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
index d9aaad81029c..aa866c29b7c6 100644
--- a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
+++ b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
@@ -23,7 +23,7 @@ import { ReportCard } from './ReportCard'
jest.mock('posthog-js')
jest.mock('lib/components/TZLabel', () => ({
- TZLabel: ({ time }: { time: string }) => <span>{time}</span>,
+ TZLabel: ({ time, title }: { time: string; title?: string }) => <span title={title}>{time}</span>,
}))
function makeReport(id: string, overrides: Partial<SignalReport> = {}): SignalReport {
@@ -377,14 +377,24 @@ describe('ReportCard', () => {
expect(screen.getByText('42')).toBeInTheDocument()
})
- it('keeps the timestamp on a redesigned row that has no figure', () => {
+ it.each([
+ ['the update time by default', true, undefined, '2026-07-01T10:00:00Z', 'Last updated'],
+ ['the creation time under a created sort', true, 'created_at', '2026-06-11T10:00:00Z', 'Created'],
+ ['the update time under an updated sort', false, 'updated_at', '2026-07-01T10:00:00Z', 'Last updated'],
+ ['the creation time without the impact column', false, 'created_at', '2026-06-11T10:00:00Z', 'Created'],
+ ] as const)('shows %s', (_name, impactColumn, timestampField, time, title) => {
// The harness renders a card for every test; these assert against their own.
cleanup()
- enableRedesign()
- const { container } = render(<ReportCard report={makeReport('r-2', { metrics: [] })} />)
+ enableRedesign(impactColumn)
+ const { container } = render(
+ <ReportCard
+ report={makeReport('r-2', { metrics: [], updated_at: '2026-07-01T10:00:00Z' })}
+ timestampField={timestampField}
+ />
+ )
expect(container.querySelector('[data-attr="report-card-impact-metric"]')).toBeNull()
- expect(screen.getByText('2026-06-11T10:00:00Z')).toBeInTheDocument()
+ expect(screen.getByText(time)).toHaveAttribute('title', title)
})
it('uses the primary snapshot when there is no affected-user snapshot', () => {
diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.tsx
index 267ea1c9dc34..a691b0037398 100644
--- a/products/signals/frontend/inbox/components/cards/ReportCard.tsx
+++ b/products/signals/frontend/inbox/components/cards/ReportCard.tsx
@@ -125,6 +125,7 @@ function ReportCardRaw({
preview = false,
selectable = false,
rankingSortField = null,
+ timestampField = 'updated_at',
}: {
report: SignalReport
sectionKey?: InboxReportSectionKey
@@ -141,6 +142,8 @@ function ReportCardRaw({
selectable?: boolean
/** The active model sort, if any. The meta row then shows the report's probability for that head. */
rankingSortField?: InboxRankingSortField | null
+ /** The time the card shows. Match it to the active time sort, so the list reads in order. */
+ timestampField?: 'created_at' | 'updated_at'
}): JSX.Element {
// Keyed on status, not the section: the legacy Archive tab lists dismissed and resolved rows
// through one section key, and the two need different affordances.
@@ -158,6 +161,8 @@ function ReportCardRaw({
const conventionalTitle = parseConventionalCommitTitle(report.title)
const cardTitle = displayConventionalCommitTitle(report.title, hasPr ? 'Untitled pull request' : 'Untitled report')
const headline = deriveHeadline(report.summary)
+ const cardTime = timestampField === 'created_at' ? report.created_at : (report.updated_at ?? report.created_at)
+ const cardTimeTitle = timestampField === 'created_at' ? 'Created' : 'Last updated'
const redesign = useFeatureFlag('INBOX_REDESIGN')
const metricsEnabled = useFeatureFlag('SIGNALS_REPORT_METRICS')
// The impact column carries its own flag on top of the redesign: its figures come from live
@@ -304,9 +309,9 @@ function ReportCardRaw({
{rankingSortField && <ReportCardRankingTag report={report} sortField={rankingSortField} />}
{!showImpactColumn && (
<TZLabel
- time={report.updated_at ?? report.created_at}
+ time={cardTime}
className="ml-auto shrink-0 text-xs text-tertiary tabular-nums"
- title="Last updated"
+ title={cardTimeTitle}
/>
)}
</div>
@@ -318,9 +323,9 @@ function ReportCardRaw({
<div className="flex w-full items-center gap-3 @lg:relative @lg:w-auto @lg:min-h-23 @lg:min-w-39 @lg:flex-none @lg:justify-end">
<ReportCardImpactMetric metrics={report.metrics} />
<TZLabel
- time={report.updated_at ?? report.created_at}
+ time={cardTime}
className="ml-auto shrink-0 whitespace-nowrap text-xs leading-none text-tertiary tabular-nums @lg:absolute @lg:right-0 @lg:bottom-0 @lg:ml-0"
- title="Last updated"
+ title={cardTimeTitle}
/>
</div>
) : null}
diff --git a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
index 828e91459958..d95f6a5f8461 100644
--- a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
+++ b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
@@ -167,10 +167,12 @@ const ReportRow = memo(function ReportRow({
report,
sectionKey,
rankingSortField,
+ timestampField,
}: {
report: SignalReport
sectionKey: InboxReportSectionKey
rankingSortField: InboxRankingSortField | null
+ timestampField: 'created_at' | 'updated_at'
}): JSX.Element {
return (
<ReportContextMenu report={report} sectionKey={sectionKey}>
@@ -179,6 +181,7 @@ const ReportRow = memo(function ReportRow({
sectionKey={sectionKey}
selectable
rankingSortField={rankingSortField}
+ timestampField={timestampField}
onRestore={() =>
reportListLogic(sectionListLogicProps(sectionKey)).actions.restoreReport(report.id, 'list_row')
}
@@ -235,6 +238,7 @@ export function ReportsTab(): JSX.Element {
const { hasActiveFilters, visibleStateFilter, scope, activeSortField, activeSortDirection } =
useValues(inboxFiltersLogic)
const rankingSortField = isRankingSortField(activeSortField) ? activeSortField : null
+ const timestampField = activeSortField === 'created_at' ? 'created_at' : 'updated_at'
const sections = useSectionStates()
useInboxViewedEvent(sections)
@@ -402,7 +406,12 @@ export function ReportsTab(): JSX.Element {
{index > 0 && index === firstUnscoredIndex && (
<LemonDivider label="Not scored yet" className="my-2 text-xs text-tertiary" />
)}
- <ReportRow report={report} sectionKey={sectionKey} rankingSortField={rankingSortField} />
+ <ReportRow
+ report={report}
+ sectionKey={sectionKey}
+ rankingSortField={rankingSortField}
+ timestampField={timestampField}
+ />
</Fragment>
))}
{/* Skeleton cards continue the list while the next pages load – sleeker than a spinner. */}