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.

2.0 KB
Raw Blame
import { urls } from 'scenes/urls'

import { FileSystemIconType } from '~/queries/schema/schema-general'

import { ActivityScope, FileSystemIconColor, ProductManifest } from '../../frontend/src/types'

export const manifest: ProductManifest = {
    name: 'Cohorts',
    activityDescribers: {
        [ActivityScope.COHORT]: () =>
            import('scenes/cohorts/activityDescriptions').then((module) => module.cohortActivityDescriber),
    },
    scenes: {
        CohortsStaffTools: {
            import: () => import('./frontend/staff/CohortsStaffToolsScene'),
            instanceLevel: true,
            name: 'Cohorts staff tools',
        },
    },
    routes: {
        '/feature-flags/staff/cohorts': ['CohortsStaffTools', 'cohortsStaffTools'],
    },
    urls: {
        cohort: (id: string | number): string => `/cohorts/${id}`,
        cohorts: (): string => '/cohorts',
        cohortCalculationHistory: (id: string | number): string => `/cohorts/${id}/calculation-history`,
        cohortsStaffTools: (cohortId?: number): string =>
            `/feature-flags/staff/cohorts${cohortId ? `?cohort_id=${cohortId}` : ''}`,
    },
    fileSystemTypes: {
        cohort: {
            name: 'Cohort',
            iconType: 'cohort' as FileSystemIconType,
            iconColor: [
                'var(--color-product-cohorts-light)',
                'var(--color-product-cohorts-dark)',
            ] as FileSystemIconColor,
            href: (ref: string) => urls.cohort(ref),
            listHref: () => urls.cohorts(),
            listSearchParam: 'search',
            filterKey: 'cohort',
        },
    },
    treeItemsNew: [
        {
            path: `Cohort`,
            type: 'cohort',
            href: urls.cohort('new'),
            iconType: 'cohort' as FileSystemIconType,
            iconColor: [
                'var(--color-product-cohorts-light)',
                'var(--color-product-cohorts-dark)',
            ] as FileSystemIconColor,
            sceneKeys: ['Cohorts', 'Cohort'],
        },
    ],
    treeItemsProducts: [],
    treeItemsMetadata: [],
}