mirror of
https://github.com/baz-scm/awesome-reviewers.git
synced 2025-08-20 18:58:52 +03:00
196 lines
27 KiB
JSON
196 lines
27 KiB
JSON
[
|
|
{
|
|
"discussion_id": "2277342773",
|
|
"pr_number": 36655,
|
|
"pr_file": "frontend/src/scenes/onboarding/sdks/sdksLogic.tsx",
|
|
"created_at": "2025-08-14T17:45:25+00:00",
|
|
"commented_code": "values: [\n onboardingLogic,\n ['productKey'],\n- liveEventsTableLogic,\n+ liveEventsTableLogic({ tabId: 'sdks' }),",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"discussion_comments": [
|
|
{
|
|
"comment_id": "2277342773",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36655,
|
|
"pr_file": "frontend/src/scenes/onboarding/sdks/sdksLogic.tsx",
|
|
"discussion_id": "2277342773",
|
|
"commented_code": "@@ -47,7 +47,7 @@ export const sdksLogic = kea<sdksLogicType>([\n values: [\n onboardingLogic,\n ['productKey'],\n- liveEventsTableLogic,\n+ liveEventsTableLogic({ tabId: 'sdks' }),",
|
|
"comment_created_at": "2025-08-14T17:45:25+00:00",
|
|
"comment_author": "rafaeelaudibert",
|
|
"comment_body": "Same as above, what happens if we have several tabs open?",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2277373764",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36655,
|
|
"pr_file": "frontend/src/scenes/onboarding/sdks/sdksLogic.tsx",
|
|
"discussion_id": "2277342773",
|
|
"commented_code": "@@ -47,7 +47,7 @@ export const sdksLogic = kea<sdksLogicType>([\n values: [\n onboardingLogic,\n ['productKey'],\n- liveEventsTableLogic,\n+ liveEventsTableLogic({ tabId: 'sdks' }),",
|
|
"comment_created_at": "2025-08-14T18:00:05+00:00",
|
|
"comment_author": "mariusandra",
|
|
"comment_body": "Since both of these are for the onboarding scene, I think it makes sense to use the same logic, so renamed `sdks` -> `onboarding`. Now all onboarding pages will just talk to the same live events logic.",
|
|
"pr_file_module": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"discussion_id": "2269463763",
|
|
"pr_number": 36421,
|
|
"pr_file": "products/actions/frontend/components/NewActionButton.tsx",
|
|
"created_at": "2025-08-12T10:51:40+00:00",
|
|
"commented_code": "icon={<IconPencil />}\n onClick={() => {\n onSelectOption?.()\n- router.actions.push(urls.createAction())\n+ router.actions.push(productUrls.createAction())",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"discussion_comments": [
|
|
{
|
|
"comment_id": "2269463763",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36421,
|
|
"pr_file": "products/actions/frontend/components/NewActionButton.tsx",
|
|
"discussion_id": "2269463763",
|
|
"commented_code": "@@ -61,7 +61,7 @@ export function NewActionButton({ onSelectOption }: { onSelectOption?: () => voi\n icon={<IconPencil />}\n onClick={() => {\n onSelectOption?.()\n- router.actions.push(urls.createAction())\n+ router.actions.push(productUrls.createAction())",
|
|
"comment_created_at": "2025-08-12T10:51:40+00:00",
|
|
"comment_author": "mariusandra",
|
|
"comment_body": "Same comment for urls, here and elsewhere",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2270921589",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36421,
|
|
"pr_file": "products/actions/frontend/components/NewActionButton.tsx",
|
|
"discussion_id": "2269463763",
|
|
"commented_code": "@@ -61,7 +61,7 @@ export function NewActionButton({ onSelectOption }: { onSelectOption?: () => voi\n icon={<IconPencil />}\n onClick={() => {\n onSelectOption?.()\n- router.actions.push(urls.createAction())\n+ router.actions.push(productUrls.createAction())",
|
|
"comment_created_at": "2025-08-12T19:15:22+00:00",
|
|
"comment_author": "mariusandra",
|
|
"comment_body": "should be `urls`",
|
|
"pr_file_module": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"discussion_id": "2269183800",
|
|
"pr_number": 36351,
|
|
"pr_file": "frontend/src/scenes/max/maxGlobalLogic.tsx",
|
|
"created_at": "2025-08-12T08:59:18+00:00",
|
|
"commented_code": "import { sceneLogic } from 'scenes/sceneLogic'\n import { urls } from 'scenes/urls'\n import { router } from 'kea-router'\n-import { AssistantContextualTool, AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n+import { AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n import { routes } from 'scenes/scenes'\n-import { IconCompass } from '@posthog/icons'\n+import { IconBook, IconCompass, IconEye } from '@posthog/icons'\n import { Scene } from 'scenes/sceneTypes'\n import { SidePanelTab } from '~/types'\n import { sidePanelLogic } from '~/layout/navigation-3000/sidepanel/sidePanelLogic'\n import { featureFlagLogic } from 'lib/logic/featureFlagLogic'\n+import { TOOL_DEFINITIONS, ToolRegistration } from './max-constants'\n \n-export interface ToolDefinition {\n- /** A unique identifier for the tool */\n- name: AssistantContextualTool\n- /** A user-friendly display name for the tool. This must be a verb phrase, like \"Create smth\" or \"Search smth\" */\n- displayName: string\n- /** A user-friendly description for the tool */\n- description: `Max can ${string}`\n- /**\n- * Optional specific @posthog/icons icon\n- * @default <IconWrench />\n- */\n- icon?: React.ReactNode\n- /** Contextual data to be included for use by the LLM */\n- context: Record<string, any>\n- /**\n- * Optional: If this tool is the main one of the page, you can override Max's default intro headline and description when it's mounted.\n- *\n- * Note that if more than one mounted tool has an intro override, only one will take effect.\n- */\n- introOverride?: {\n- /** The default is something like \"How can I help you build?\" - stick true to this question form. */\n- headline: string\n- /** The default is \"Ask me about your product and your users.\" */\n- description: string\n- }\n- /** Optional: When in context, the tool can add items to the pool of Max's suggested questions */\n- suggestions?: string[] // TODO: Suggestions aren't used yet, pending a refactor of maxLogic's allSuggestions\n- /** The callback function that will be executed with the LLM's tool call output */\n- callback: (toolOutput: any) => void | Promise<void>\n-}\n+/** Tools available everywhere. These CAN be shadowed by contextual tools for scene-specific handling (e.g. to intercept insight creation). */\n+export const STATIC_TOOLS: ToolRegistration[] = [\n+ {\n+ identifier: 'navigate' as const,\n+ name: TOOL_DEFINITIONS['navigate'].name,\n+ description: TOOL_DEFINITIONS['navigate'].description,\n+ icon: <IconCompass />,\n+ context: { current_page: location.pathname },\n+ callback: async (toolOutput) => {\n+ const { page_key: pageKey } = toolOutput\n+ if (!(pageKey in urls)) {\n+ throw new Error(`${pageKey} not in urls`)\n+ }\n+ const url = urls[pageKey as AssistantNavigateUrls]()\n+ router.actions.push(url)\n+ // First wait for navigation to complete\n+ await new Promise<void>((resolve, reject) => {\n+ const NAVIGATION_TIMEOUT = 1000 // 1 second timeout\n+ const startTime = performance.now()\n+ const checkPathname = (): void => {\n+ if (sceneLogic.values.activeScene === routes[url]?.[0]) {\n+ resolve()\n+ } else if (performance.now() - startTime > NAVIGATION_TIMEOUT) {\n+ reject(new Error('Navigation timeout'))\n+ } else {\n+ setTimeout(checkPathname, 50)\n+ }\n+ }\n+ checkPathname()\n+ })\n+ },\n+ },\n+ {\n+ identifier: 'search_docs' as const,",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"discussion_comments": [
|
|
{
|
|
"comment_id": "2269183800",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36351,
|
|
"pr_file": "frontend/src/scenes/max/maxGlobalLogic.tsx",
|
|
"discussion_id": "2269183800",
|
|
"commented_code": "@@ -7,44 +7,60 @@ import type { maxGlobalLogicType } from './maxGlobalLogicType'\n import { sceneLogic } from 'scenes/sceneLogic'\n import { urls } from 'scenes/urls'\n import { router } from 'kea-router'\n-import { AssistantContextualTool, AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n+import { AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n import { routes } from 'scenes/scenes'\n-import { IconCompass } from '@posthog/icons'\n+import { IconBook, IconCompass, IconEye } from '@posthog/icons'\n import { Scene } from 'scenes/sceneTypes'\n import { SidePanelTab } from '~/types'\n import { sidePanelLogic } from '~/layout/navigation-3000/sidepanel/sidePanelLogic'\n import { featureFlagLogic } from 'lib/logic/featureFlagLogic'\n+import { TOOL_DEFINITIONS, ToolRegistration } from './max-constants'\n \n-export interface ToolDefinition {\n- /** A unique identifier for the tool */\n- name: AssistantContextualTool\n- /** A user-friendly display name for the tool. This must be a verb phrase, like \"Create smth\" or \"Search smth\" */\n- displayName: string\n- /** A user-friendly description for the tool */\n- description: `Max can ${string}`\n- /**\n- * Optional specific @posthog/icons icon\n- * @default <IconWrench />\n- */\n- icon?: React.ReactNode\n- /** Contextual data to be included for use by the LLM */\n- context: Record<string, any>\n- /**\n- * Optional: If this tool is the main one of the page, you can override Max's default intro headline and description when it's mounted.\n- *\n- * Note that if more than one mounted tool has an intro override, only one will take effect.\n- */\n- introOverride?: {\n- /** The default is something like \"How can I help you build?\" - stick true to this question form. */\n- headline: string\n- /** The default is \"Ask me about your product and your users.\" */\n- description: string\n- }\n- /** Optional: When in context, the tool can add items to the pool of Max's suggested questions */\n- suggestions?: string[] // TODO: Suggestions aren't used yet, pending a refactor of maxLogic's allSuggestions\n- /** The callback function that will be executed with the LLM's tool call output */\n- callback: (toolOutput: any) => void | Promise<void>\n-}\n+/** Tools available everywhere. These CAN be shadowed by contextual tools for scene-specific handling (e.g. to intercept insight creation). */\n+export const STATIC_TOOLS: ToolRegistration[] = [\n+ {\n+ identifier: 'navigate' as const,\n+ name: TOOL_DEFINITIONS['navigate'].name,\n+ description: TOOL_DEFINITIONS['navigate'].description,\n+ icon: <IconCompass />,\n+ context: { current_page: location.pathname },\n+ callback: async (toolOutput) => {\n+ const { page_key: pageKey } = toolOutput\n+ if (!(pageKey in urls)) {\n+ throw new Error(`${pageKey} not in urls`)\n+ }\n+ const url = urls[pageKey as AssistantNavigateUrls]()\n+ router.actions.push(url)\n+ // First wait for navigation to complete\n+ await new Promise<void>((resolve, reject) => {\n+ const NAVIGATION_TIMEOUT = 1000 // 1 second timeout\n+ const startTime = performance.now()\n+ const checkPathname = (): void => {\n+ if (sceneLogic.values.activeScene === routes[url]?.[0]) {\n+ resolve()\n+ } else if (performance.now() - startTime > NAVIGATION_TIMEOUT) {\n+ reject(new Error('Navigation timeout'))\n+ } else {\n+ setTimeout(checkPathname, 50)\n+ }\n+ }\n+ checkPathname()\n+ })\n+ },\n+ },\n+ {\n+ identifier: 'search_docs' as const,",
|
|
"comment_created_at": "2025-08-12T08:59:18+00:00",
|
|
"comment_author": "sortafreel",
|
|
"comment_body": "Nitpick: I assume `search_docs` equals to `search_documentation` on BE? A bit confused with naming.",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2269653011",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36351,
|
|
"pr_file": "frontend/src/scenes/max/maxGlobalLogic.tsx",
|
|
"discussion_id": "2269183800",
|
|
"commented_code": "@@ -7,44 +7,60 @@ import type { maxGlobalLogicType } from './maxGlobalLogicType'\n import { sceneLogic } from 'scenes/sceneLogic'\n import { urls } from 'scenes/urls'\n import { router } from 'kea-router'\n-import { AssistantContextualTool, AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n+import { AssistantNavigateUrls } from '~/queries/schema/schema-assistant-messages'\n import { routes } from 'scenes/scenes'\n-import { IconCompass } from '@posthog/icons'\n+import { IconBook, IconCompass, IconEye } from '@posthog/icons'\n import { Scene } from 'scenes/sceneTypes'\n import { SidePanelTab } from '~/types'\n import { sidePanelLogic } from '~/layout/navigation-3000/sidepanel/sidePanelLogic'\n import { featureFlagLogic } from 'lib/logic/featureFlagLogic'\n+import { TOOL_DEFINITIONS, ToolRegistration } from './max-constants'\n \n-export interface ToolDefinition {\n- /** A unique identifier for the tool */\n- name: AssistantContextualTool\n- /** A user-friendly display name for the tool. This must be a verb phrase, like \"Create smth\" or \"Search smth\" */\n- displayName: string\n- /** A user-friendly description for the tool */\n- description: `Max can ${string}`\n- /**\n- * Optional specific @posthog/icons icon\n- * @default <IconWrench />\n- */\n- icon?: React.ReactNode\n- /** Contextual data to be included for use by the LLM */\n- context: Record<string, any>\n- /**\n- * Optional: If this tool is the main one of the page, you can override Max's default intro headline and description when it's mounted.\n- *\n- * Note that if more than one mounted tool has an intro override, only one will take effect.\n- */\n- introOverride?: {\n- /** The default is something like \"How can I help you build?\" - stick true to this question form. */\n- headline: string\n- /** The default is \"Ask me about your product and your users.\" */\n- description: string\n- }\n- /** Optional: When in context, the tool can add items to the pool of Max's suggested questions */\n- suggestions?: string[] // TODO: Suggestions aren't used yet, pending a refactor of maxLogic's allSuggestions\n- /** The callback function that will be executed with the LLM's tool call output */\n- callback: (toolOutput: any) => void | Promise<void>\n-}\n+/** Tools available everywhere. These CAN be shadowed by contextual tools for scene-specific handling (e.g. to intercept insight creation). */\n+export const STATIC_TOOLS: ToolRegistration[] = [\n+ {\n+ identifier: 'navigate' as const,\n+ name: TOOL_DEFINITIONS['navigate'].name,\n+ description: TOOL_DEFINITIONS['navigate'].description,\n+ icon: <IconCompass />,\n+ context: { current_page: location.pathname },\n+ callback: async (toolOutput) => {\n+ const { page_key: pageKey } = toolOutput\n+ if (!(pageKey in urls)) {\n+ throw new Error(`${pageKey} not in urls`)\n+ }\n+ const url = urls[pageKey as AssistantNavigateUrls]()\n+ router.actions.push(url)\n+ // First wait for navigation to complete\n+ await new Promise<void>((resolve, reject) => {\n+ const NAVIGATION_TIMEOUT = 1000 // 1 second timeout\n+ const startTime = performance.now()\n+ const checkPathname = (): void => {\n+ if (sceneLogic.values.activeScene === routes[url]?.[0]) {\n+ resolve()\n+ } else if (performance.now() - startTime > NAVIGATION_TIMEOUT) {\n+ reject(new Error('Navigation timeout'))\n+ } else {\n+ setTimeout(checkPathname, 50)\n+ }\n+ }\n+ checkPathname()\n+ })\n+ },\n+ },\n+ {\n+ identifier: 'search_docs' as const,",
|
|
"comment_created_at": "2025-08-12T12:16:58+00:00",
|
|
"comment_author": "Twixes",
|
|
"comment_body": "Yes, `search_documentation` is the graph path, `search_docs` is the tool's identifier. Slight inconsistency",
|
|
"pr_file_module": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"discussion_id": "2250711770",
|
|
"pr_number": 36080,
|
|
"pr_file": "frontend/src/scenes/surveys/SurveyOverview.tsx",
|
|
"created_at": "2025-08-04T07:57:16+00:00",
|
|
"commented_code": "export function SurveyOverview(): JSX.Element {\n const { survey, selectedPageIndex, targetingFlagFilters } = useValues(surveyLogic)\n const { setSelectedPageIndex } = useActions(surveyLogic)\n- const { featureFlags } = useValues(featureFlagLogic)\n+\n+ const isExternalSurvey = survey.type === SurveyType.ExternalSurvey\n \n const { surveyUsesLimit, surveyUsesAdaptiveLimit } = useValues(surveyLogic)\n return (\n <div className=\"flex gap-4\">\n <dl className=\"flex flex-col gap-4 flex-1 overflow-hidden\">\n- <SurveyOption label=\"Display mode\">{SURVEY_TYPE_LABEL_MAP[survey.type]}</SurveyOption>\n+ <SurveyOption label=\"Display mode\">\n+ <div className=\"flex flex-col\">\n+ <div className=\"flex flex-row items-center gap-2\">\n+ {SURVEY_TYPE_LABEL_MAP[survey.type]}\n+ {isExternalSurvey && <CopySurveyLink surveyId={survey.id} className=\"w-fit\" />}\n+ </div>\n+ {isExternalSurvey && (\n+ <span>\n+ Track responses to users by adding{' '}",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"discussion_comments": [
|
|
{
|
|
"comment_id": "2250711770",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36080,
|
|
"pr_file": "frontend/src/scenes/surveys/SurveyOverview.tsx",
|
|
"discussion_id": "2250711770",
|
|
"commented_code": "@@ -54,13 +52,28 @@ const QuestionIconMap = {\n export function SurveyOverview(): JSX.Element {\n const { survey, selectedPageIndex, targetingFlagFilters } = useValues(surveyLogic)\n const { setSelectedPageIndex } = useActions(surveyLogic)\n- const { featureFlags } = useValues(featureFlagLogic)\n+\n+ const isExternalSurvey = survey.type === SurveyType.ExternalSurvey\n \n const { surveyUsesLimit, surveyUsesAdaptiveLimit } = useValues(surveyLogic)\n return (\n <div className=\"flex gap-4\">\n <dl className=\"flex flex-col gap-4 flex-1 overflow-hidden\">\n- <SurveyOption label=\"Display mode\">{SURVEY_TYPE_LABEL_MAP[survey.type]}</SurveyOption>\n+ <SurveyOption label=\"Display mode\">\n+ <div className=\"flex flex-col\">\n+ <div className=\"flex flex-row items-center gap-2\">\n+ {SURVEY_TYPE_LABEL_MAP[survey.type]}\n+ {isExternalSurvey && <CopySurveyLink surveyId={survey.id} className=\"w-fit\" />}\n+ </div>\n+ {isExternalSurvey && (\n+ <span>\n+ Track responses to users by adding{' '}",
|
|
"comment_created_at": "2025-08-04T07:57:16+00:00",
|
|
"comment_author": "marandaneto",
|
|
"comment_body": "same as https://github.com/PostHog/posthog/pull/36080/files#r2250709670\r\nwe are using multiple wording for track/collect/identify response/identify responses to users, etc, lets agree on something and use it everywhere",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2251680312",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 36080,
|
|
"pr_file": "frontend/src/scenes/surveys/SurveyOverview.tsx",
|
|
"discussion_id": "2250711770",
|
|
"commented_code": "@@ -54,13 +52,28 @@ const QuestionIconMap = {\n export function SurveyOverview(): JSX.Element {\n const { survey, selectedPageIndex, targetingFlagFilters } = useValues(surveyLogic)\n const { setSelectedPageIndex } = useActions(surveyLogic)\n- const { featureFlags } = useValues(featureFlagLogic)\n+\n+ const isExternalSurvey = survey.type === SurveyType.ExternalSurvey\n \n const { surveyUsesLimit, surveyUsesAdaptiveLimit } = useValues(surveyLogic)\n return (\n <div className=\"flex gap-4\">\n <dl className=\"flex flex-col gap-4 flex-1 overflow-hidden\">\n- <SurveyOption label=\"Display mode\">{SURVEY_TYPE_LABEL_MAP[survey.type]}</SurveyOption>\n+ <SurveyOption label=\"Display mode\">\n+ <div className=\"flex flex-col\">\n+ <div className=\"flex flex-row items-center gap-2\">\n+ {SURVEY_TYPE_LABEL_MAP[survey.type]}\n+ {isExternalSurvey && <CopySurveyLink surveyId={survey.id} className=\"w-fit\" />}\n+ </div>\n+ {isExternalSurvey && (\n+ <span>\n+ Track responses to users by adding{' '}",
|
|
"comment_created_at": "2025-08-04T14:30:08+00:00",
|
|
"comment_author": "lucasheriques",
|
|
"comment_body": "changed language to \"identify respondents\" on all places here (will do the same on docs)",
|
|
"pr_file_module": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"discussion_id": "2237904401",
|
|
"pr_number": 35754,
|
|
"pr_file": "frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx",
|
|
"created_at": "2025-07-28T21:33:28+00:00",
|
|
"commented_code": "actions: [supportLogic, ['submitZendeskTicket']],\n })),\n actions({\n- updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean) => ({ flagKey, enabled }),\n+ updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean, stage?: string) => ({\n+ flagKey,\n+ enabled,\n+ stage,\n+ }),",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"discussion_comments": [
|
|
{
|
|
"comment_id": "2237904401",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 35754,
|
|
"pr_file": "frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx",
|
|
"discussion_id": "2237904401",
|
|
"commented_code": "@@ -26,7 +26,11 @@ export const featurePreviewsLogic = kea<featurePreviewsLogicType>([\n actions: [supportLogic, ['submitZendeskTicket']],\n })),\n actions({\n- updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean) => ({ flagKey, enabled }),\n+ updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean, stage?: string) => ({\n+ flagKey,\n+ enabled,\n+ stage,\n+ }),",
|
|
"comment_created_at": "2025-07-28T21:33:28+00:00",
|
|
"comment_author": "dmarticus",
|
|
"comment_body": "minor, but should `stage` be an enum instead of a string? ",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2237925022",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 35754,
|
|
"pr_file": "frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx",
|
|
"discussion_id": "2237904401",
|
|
"commented_code": "@@ -26,7 +26,11 @@ export const featurePreviewsLogic = kea<featurePreviewsLogicType>([\n actions: [supportLogic, ['submitZendeskTicket']],\n })),\n actions({\n- updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean) => ({ flagKey, enabled }),\n+ updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean, stage?: string) => ({\n+ flagKey,\n+ enabled,\n+ stage,\n+ }),",
|
|
"comment_created_at": "2025-07-28T21:49:41+00:00",
|
|
"comment_author": "haacked",
|
|
"comment_body": "Looks like there's an existing enum:\r\n\r\n```ts\r\nexport enum EarlyAccessFeatureStage {\r\n Draft = 'draft',\r\n Concept = 'concept',\r\n Alpha = 'alpha',\r\n Beta = 'beta',\r\n GeneralAvailability = 'general-availability',\r\n Archived = 'archived',\r\n}\r\n```\r\n\r\nI noticed that in `posthog-js` there's also an enum, but it has less options:\r\n\r\n```ts\r\nexport type EarlyAccessFeatureStage = 'concept' | 'alpha' | 'beta' | 'general-availability'\r\n```\r\n\r\nSeems to me that these two should be the same and we should make use the enum type on both sides. Or should we let the js version continue to accept a string and only make the type change here?",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2237932526",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 35754,
|
|
"pr_file": "frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx",
|
|
"discussion_id": "2237904401",
|
|
"commented_code": "@@ -26,7 +26,11 @@ export const featurePreviewsLogic = kea<featurePreviewsLogicType>([\n actions: [supportLogic, ['submitZendeskTicket']],\n })),\n actions({\n- updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean) => ({ flagKey, enabled }),\n+ updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean, stage?: string) => ({\n+ flagKey,\n+ enabled,\n+ stage,\n+ }),",
|
|
"comment_created_at": "2025-07-28T21:55:47+00:00",
|
|
"comment_author": "dmarticus",
|
|
"comment_body": "ooh yeah they should be the same... annoying that the JS SDK is less-principled.\r\n\r\nIn an ideal world I would unite these enums across product + SDK. In reality... your call.",
|
|
"pr_file_module": null
|
|
},
|
|
{
|
|
"comment_id": "2252055074",
|
|
"repo_full_name": "PostHog/posthog",
|
|
"pr_number": 35754,
|
|
"pr_file": "frontend/src/layout/FeaturePreviews/featurePreviewsLogic.tsx",
|
|
"discussion_id": "2237904401",
|
|
"commented_code": "@@ -26,7 +26,11 @@ export const featurePreviewsLogic = kea<featurePreviewsLogicType>([\n actions: [supportLogic, ['submitZendeskTicket']],\n })),\n actions({\n- updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean) => ({ flagKey, enabled }),\n+ updateEarlyAccessFeatureEnrollment: (flagKey: string, enabled: boolean, stage?: string) => ({\n+ flagKey,\n+ enabled,\n+ stage,\n+ }),",
|
|
"comment_created_at": "2025-08-04T16:53:12+00:00",
|
|
"comment_author": "haacked",
|
|
"comment_body": "I'm going to leave it as a string for now. We can update this later as it sounds like we may be investing more in this area soon.",
|
|
"pr_file_module": null
|
|
}
|
|
]
|
|
}
|
|
] |