: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(replay-vision): pin vision menu for beta and bugfix (#62886)
Hayne Ryu8209f5397d45
diff --git a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsxindex 6b50dec24ffd..ce282566fa4d 100644--- a/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx+++ b/frontend/src/layout/panel-layout/ProjectTree/projectTreeDataLogic.tsx@@ -1136,6 +1136,19 @@ export const projectTreeDataLogic = kea<projectTreeDataLogicType>([}).filter((p): p is FileSystemImport => p !== null)+ // Auto-pin items the manifest marks `pinnedByDefault` once their flag is on.+ for (const product of allProducts) {+ if (+ product.pinnedByDefault &&+ product.flag &&+ (featureFlags as Record<string, boolean>)[product.flag] &&+ !selectedProductPaths.has(product.path)+ ) {+ selectedProductPaths.add(product.path)+ selectedProducts.push(product)+ }+ }+return convertFileSystemEntryToTreeDataItem({root: 'custom-products://',imports: selectedProductsdiff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex 31a44ba1ca57..57fff6a8a961 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -1931,6 +1931,7 @@ export const getTreeItemsProducts = (): FileSystemImport[] => [href: urls.replayVision(),tags: ['beta'],flag: FEATURE_FLAGS.REPLAY_VISION,+ pinnedByDefault: true,sceneKey: 'ReplayVision',sceneKeys: ['ReplayVision', 'ReplayVisionScanner'],},diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.jsonindex 09d2c2863372..fcfd6a8512f2 100644--- a/frontend/src/queries/schema.json+++ b/frontend/src/queries/schema.json@@ -20826,6 +20826,10 @@"description": "Object's name and folder","type": "string"},+ "pinnedByDefault": {+ "description": "Auto-include in the user's pinned sidebar when `flag` is on, even without an explicit UserProductList row",+ "type": "boolean"+ },"protocol": {"description": "Protocol of the item, defaults to \"project://\"","type": "string"diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.tsindex 49d6119553c2..f22e4e575079 100644--- a/frontend/src/queries/schema/schema-general.ts+++ b/frontend/src/queries/schema/schema-general.ts@@ -3446,6 +3446,8 @@ export interface FileSystemImport extends Omit<FileSystemEntry, 'id'> {reasonText?: string | null/** Display label override — when set, shown in the nav instead of the last segment of `path` */displayLabel?: string+ /** Auto-include in the user's pinned sidebar when `flag` is on, even without an explicit UserProductList row */+ pinnedByDefault?: boolean}export interface FileSystemViewLogEntry {diff --git a/posthog/schema.py b/posthog/schema.pyindex fdee04e97fc8..9b251bcdf96a 100644--- a/posthog/schema.py+++ b/posthog/schema.py@@ -7564,6 +7564,12 @@ class FileSystemImport(BaseModel):last_viewed_at: str | None = Field(default=None, description="Timestamp when the file system entry was last viewed")meta: dict[str, Any] | None = Field(default=None, description="Metadata")path: str = Field(..., description="Object's name and folder")+ pinnedByDefault: bool | None = Field(+ default=None,+ description=(+ "Auto-include in the user's pinned sidebar when `flag` is on, even without an explicit UserProductList row"+ ),+ )protocol: str | None = Field(default=None, description='Protocol of the item, defaults to "project://"')reason: UserProductListReason | None = Field(default=None,diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerInsightsChart.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerInsightsChart.tsxindex 50bbd2b17d06..c2c7867a2e7a 100644--- a/products/replay_vision/frontend/replay_scanners/components/ScannerInsightsChart.tsx+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerInsightsChart.tsx@@ -92,20 +92,19 @@ function buildQuery(}}if (scannerType === 'scorer') {- const scoreSeries = (math: PropertyMathType, name: string): TrendsQuery['series'][number] => ({+ const scoreSeries = (math: PropertyMathType): TrendsQuery['series'][number] => ({kind: NodeKind.EventsNode,event: RECORDING_OBSERVED_EVENT,math,math_property: 'scanner_output_score',- name,properties: [base],})return {kind: NodeKind.TrendsQuery,series: [- scoreSeries(PropertyMathType.Median, 'p50'),- scoreSeries(PropertyMathType.P90, 'p90'),- scoreSeries(PropertyMathType.Average, 'avg'),+ scoreSeries(PropertyMathType.Median),+ scoreSeries(PropertyMathType.P90),+ scoreSeries(PropertyMathType.Average),],trendsFilter: { display: ChartDisplayType.ActionsLineGraph },dateRange,diff --git a/products/replay_vision/manifest.tsx b/products/replay_vision/manifest.tsxindex 6b335f1d3367..f134aa27ebe6 100644--- a/products/replay_vision/manifest.tsx+++ b/products/replay_vision/manifest.tsx@@ -76,6 +76,7 @@ export const manifest: ProductManifest = {href: urls.replayVision(),tags: ['beta'],flag: FEATURE_FLAGS.REPLAY_VISION,+ pinnedByDefault: true,sceneKey: 'ReplayVision',sceneKeys: ['ReplayVision', 'ReplayVisionScanner'],},