: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(logs): open the missing-link task in the side panel on the rail (#116242)
Jon McCallum8385a728eb5d
diff --git a/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.test.ts b/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.test.tsindex 314e22a88192..7f54e558243c 100644--- a/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.test.ts+++ b/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.test.ts@@ -44,7 +44,7 @@ describe('missingLinkInvestigateLogic', () => {{name: 'new view, rail',flags: [FEATURE_FLAGS.PHAI_SANDBOX_MODE, FEATURE_FLAGS.TODAY_RAIL_NAV],- route: 'ai-scene',+ route: 'side-panel-task',},{ name: 'legacy view, rail', flags: [FEATURE_FLAGS.TODAY_RAIL_NAV], route: 'ai-scene' },])('$name sends the prompt to PostHog AI', async ({ flags, route }) => {diff --git a/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.ts b/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.tsindex 41065851edc3..c68dba49811e 100644--- a/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.ts+++ b/products/logs/frontend/components/LogsViewer/LogContextLinks/missingLinkInvestigateLogic.ts@@ -64,7 +64,7 @@ export interface missingLinkInvestigateLogicActions {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface missingLinkInvestigateLogicMeta {__keaTypeGenInternalSelectorTypes: {- startsSidePanelTask: (effectivePhaiView: PhaiViewMode, todayRailEnabled: boolean) => boolean+ startsSidePanelTask: (effectivePhaiView: PhaiViewMode) => booleanlaunching: (seed: ComposerSeed | null, activeCreation: ActiveCreation | null) => boolean}}@@ -117,12 +117,11 @@ export const missingLinkInvestigateLogic = kea<missingLinkInvestigateLogicType>(}),selectors({- // Only the new view's side panel turns a seed into a task. The rail moves PostHog AI to its own- // scene, and the legacy view has no tasks, so both of those take the prompt as a chat question.+ // Only the new view's side panel turns a seed into a task. The legacy view has no tasks, so it takes+ // the prompt as a chat question. The rail still renders the side panel, so the task opens next to the log.startsSidePanelTask: [- (s) => [s.effectivePhaiView, s.todayRailEnabled],- (effectivePhaiView: PhaiViewMode, todayRailEnabled: boolean): boolean =>- effectivePhaiView === 'new' && !todayRailEnabled,+ (s) => [s.effectivePhaiView],+ (effectivePhaiView: PhaiViewMode): boolean => effectivePhaiView === 'new',],// The side panel holds a seed it has not taken yet, and submits it after any submission in flight,// so a second launch now would queue a duplicate task. A creation without a task ID is still@@ -139,15 +138,14 @@ export const missingLinkInvestigateLogic = kea<missingLinkInvestigateLogicType>(// The drawer and the logs modal sit above the side panel, so close them before it opens.closeHost()actions.closeLogsViewerModal()- if (values.todayRailEnabled) {- // The rail keeps PostHog AI in the /ai scene, in the same tab. Its `ask` seeds a task in the- // new view and starts a chat in the legacy view, and both remove the prompt from the URL.- router.actions.push(urls.ai(undefined, prompt))- return- }if (!values.startsSidePanelTask) {- // The legacy view: the shared ask path opens the question in a new PostHog AI tab.- actions.askSidePanelMax(prompt)+ if (values.todayRailEnabled) {+ // The rail keeps legacy PostHog AI in the /ai scene, in the same tab.+ router.actions.push(urls.ai(undefined, prompt))+ } else {+ // The shared ask path opens the question in a new PostHog AI tab.+ actions.askSidePanelMax(prompt)+ }return}if (values.launching) {