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(insights): set draft row last viewed to its edit timestamp (#74141)

Thomas Obermüller39e2f05d67cc
diff --git a/frontend/src/scenes/saved-insights/draftInsight.ts b/frontend/src/scenes/saved-insights/draftInsight.ts
index edaf131e2b17..40764fb9f5d4 100644
--- a/frontend/src/scenes/saved-insights/draftInsight.ts
+++ b/frontend/src/scenes/saved-insights/draftInsight.ts
@@ -65,7 +65,8 @@ export function draftInsightListItem(draft: DraftInsightQuery, currentUser: User
updated_at: timestamp,
last_modified_at: timestamp,
last_modified_by: user,
- last_viewed_at: null,
+ // The draft has no InsightViewed record, but its author saw it when they last edited it
+ last_viewed_at: timestamp,
tags: [],
favorited: false,
user_access_level: AccessControlLevel.Viewer,