: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
import { MakeLogicType, actions, kea, path, reducers } from 'kea'
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface modalsLogicValues {
isCopyToProjectModalOpen: boolean
isCupedModalOpen: boolean
isDescriptionModalOpen: boolean
isDistributionModalOpen: boolean
isDuplicateExperimentModalOpen: boolean
isEditConclusionModalOpen: boolean
isExposureCriteriaModalOpen: boolean
isFinishExperimentModalOpen: boolean
isPauseExperimentModalOpen: boolean
isQuickSurveyModalOpen: boolean
isReleaseConditionsModalOpen: boolean
isResumeExperimentModalOpen: boolean
isRunningTimeConfigModalOpen: boolean
isStatsEngineModalOpen: boolean
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface modalsLogicActions {
closeAllModals: () => {
value: true
}
closeCopyToProjectModal: () => {
value: true
}
closeCupedModal: () => {
value: true
}
closeDescriptionModal: () => {
value: true
}
closeDistributionModal: () => {
value: true
}
closeDuplicateExperimentModal: () => {
value: true
}
closeEditConclusionModal: () => {
value: true
}
closeExposureCriteriaModal: () => {
value: true
}
closeFinishExperimentModal: () => {
value: true
}
closePauseExperimentModal: () => {
value: true
}
closeQuickSurveyModal: () => {
value: true
}
closeReleaseConditionsModal: () => {
value: true
}
closeResumeExperimentModal: () => {
value: true
}
closeRunningTimeConfigModal: () => {
value: true
}
closeStatsEngineModal: () => {
value: true
}
openCopyToProjectModal: () => {
value: true
}
openCupedModal: () => {
value: true
}
openDescriptionModal: () => {
value: true
}
openDistributionModal: () => {
value: true
}
openDuplicateExperimentModal: () => {
value: true
}
openEditConclusionModal: () => {
value: true
}
openExposureCriteriaModal: () => {
value: true
}
openFinishExperimentModal: () => {
value: true
}
openPauseExperimentModal: () => {
value: true
}
openQuickSurveyModal: () => {
value: true
}
openReleaseConditionsModal: () => {
value: true
}
openResumeExperimentModal: () => {
value: true
}
openRunningTimeConfigModal: () => {
value: true
}
openStatsEngineModal: () => {
value: true
}
}
export type modalsLogicType = MakeLogicType<modalsLogicValues, modalsLogicActions>
export const modalsLogic = kea<modalsLogicType>([
path(['scenes', 'experiments', 'modalsLogic']),
actions({
closeAllModals: true,
openExposureCriteriaModal: true,
closeExposureCriteriaModal: true,
openFinishExperimentModal: true,
closeFinishExperimentModal: true,
openPauseExperimentModal: true,
closePauseExperimentModal: true,
openResumeExperimentModal: true,
closeResumeExperimentModal: true,
openEditConclusionModal: true,
closeEditConclusionModal: true,
openDistributionModal: true,
closeDistributionModal: true,
openReleaseConditionsModal: true,
closeReleaseConditionsModal: true,
openDescriptionModal: true,
closeDescriptionModal: true,
openStatsEngineModal: true,
closeStatsEngineModal: true,
openCupedModal: true,
closeCupedModal: true,
openRunningTimeConfigModal: true,
closeRunningTimeConfigModal: true,
openDuplicateExperimentModal: true,
closeDuplicateExperimentModal: true,
openCopyToProjectModal: true,
closeCopyToProjectModal: true,
openQuickSurveyModal: true,
closeQuickSurveyModal: true,
}),
reducers({
isExposureCriteriaModalOpen: [
false,
{
openExposureCriteriaModal: () => true,
closeExposureCriteriaModal: () => false,
closeAllModals: () => false,
},
],
isFinishExperimentModalOpen: [
false,
{
openFinishExperimentModal: () => true,
closeFinishExperimentModal: () => false,
closeAllModals: () => false,
},
],
isPauseExperimentModalOpen: [
false,
{
openPauseExperimentModal: () => true,
closePauseExperimentModal: () => false,
closeAllModals: () => false,
},
],
isResumeExperimentModalOpen: [
false,
{
openResumeExperimentModal: () => true,
closeResumeExperimentModal: () => false,
closeAllModals: () => false,
},
],
isEditConclusionModalOpen: [
false,
{
openEditConclusionModal: () => true,
closeEditConclusionModal: () => false,
closeAllModals: () => false,
},
],
isDistributionModalOpen: [
false,
{
openDistributionModal: () => true,
closeDistributionModal: () => false,
closeAllModals: () => false,
},
],
isReleaseConditionsModalOpen: [
false,
{
openReleaseConditionsModal: () => true,
closeReleaseConditionsModal: () => false,
closeAllModals: () => false,
},
],
isDescriptionModalOpen: [
false,
{
openDescriptionModal: () => true,
closeDescriptionModal: () => false,
closeAllModals: () => false,
},
],
isStatsEngineModalOpen: [
false,
{
openStatsEngineModal: () => true,
closeStatsEngineModal: () => false,
closeAllModals: () => false,
},
],
isCupedModalOpen: [
false,
{
openCupedModal: () => true,
closeCupedModal: () => false,
closeAllModals: () => false,
},
],
isRunningTimeConfigModalOpen: [
false,
{
openRunningTimeConfigModal: () => true,
closeRunningTimeConfigModal: () => false,
closeAllModals: () => false,
},
],
isDuplicateExperimentModalOpen: [
false,
{
openDuplicateExperimentModal: () => true,
closeDuplicateExperimentModal: () => false,
closeAllModals: () => false,
},
],
isCopyToProjectModalOpen: [
false,
{
openCopyToProjectModal: () => true,
closeCopyToProjectModal: () => false,
closeAllModals: () => false,
},
],
isQuickSurveyModalOpen: [
false,
{
openQuickSurveyModal: () => true,
closeQuickSurveyModal: () => false,
closeAllModals: () => false,
},
],
}),
])