diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodePlaylist.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodePlaylist.tsx index 9256f192ecab8..7c854998efc6f 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodePlaylist.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodePlaylist.tsx @@ -1,5 +1,5 @@ import { createPostHogWidgetNode } from 'scenes/notebooks/Nodes/NodeWrapper' -import { FilterType, NotebookNodeType, RecordingFilters } from '~/types' +import { FilterType, NotebookNodeType, RecordingFilters, ReplayTabs } from '~/types' import { SessionRecordingPlaylistLogicProps, addedAdvancedFilters, @@ -165,6 +165,14 @@ export const NotebookNodePlaylist = createPostHogWidgetNode { + const url = new URL(match[0]) + const filters = url.searchParams.get('filters') + return { filters: filters ? JSON.parse(filters) : {}, pinned: [] } + }, + }, Settings, }) diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index 07073be4f5ef8..9589712745280 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -36,6 +36,9 @@ const Component = ({ const { expanded } = useValues(nodeLogic) const { setTitlePlaceholder } = useActions(nodeLogic) const summarizeInsight = useSummarizeInsight() + const { insightName } = useValues( + insightLogic({ dashboardItemId: query.kind === NodeKind.SavedInsightNode ? query.shortId : 'new' }) + ) useEffect(() => { let title = 'Query' @@ -58,13 +61,13 @@ const Component = ({ } } } + if (query.kind === NodeKind.SavedInsightNode) { - const logic = insightLogic.findMounted({ dashboardItemId: query.shortId }) - title = (logic?.values.insight.name || logic?.values.insight.derived_name) ?? 'Saved Insight' + title = insightName ?? 'Saved Insight' } setTitlePlaceholder(title) - }, [query]) + }, [query, insightName]) const modifiedQuery = useMemo(() => { const modifiedQuery = { ...query, full: false } diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx index 095277d8a2d3a..ec1515df9fba6 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeRecording.tsx @@ -157,7 +157,7 @@ export const NotebookNodeRecording = createPostHogWidgetNode { return { id: match[1], noInspector: false } },