: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
perf(frontend): load activity log describers on demand (#63365)
Paul D'Ambra77e11b4159be
diff --git a/frontend/bin/check-eager-graph.mjs b/frontend/bin/check-eager-graph.mjsindex a9d7922ea98d..b2dded02c30e 100644--- a/frontend/bin/check-eager-graph.mjs+++ b/frontend/bin/check-eager-graph.mjs@@ -34,14 +34,14 @@ const ROOTS = [label: 'entry (logged-out pages, app bootstrap)',// master 2026-06-12: 14.62 MiB / 751 filesbudgetBytes: 16_000_000,- forbidden: ['node_modules/monaco-editor/'],+ forbidden: ['node_modules/monaco-editor/', 'src/lib/components/ActivityLog/describers'],},{root: 'src/scenes/AuthenticatedShell.tsx',label: 'authenticated shell (every logged-in page)',- // master 2026-06-12: 34.44 MiB / 5,381 files (post #62957 / #62967 / #63142 / #63146)- budgetBytes: 38_000_000,- forbidden: ['node_modules/monaco-editor/'],+ // 2026-06-13: 30.86 MiB / 5,083 files (post lazy activity describers)+ budgetBytes: 34_000_000,+ forbidden: ['node_modules/monaco-editor/', 'src/lib/components/ActivityLog/describers'],},]diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsxindex a3487774f866..feface92f0b7 100644--- a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx@@ -3,7 +3,11 @@ import { lazyLoaders } from 'kea-loaders'import { subscriptions } from 'kea-subscriptions'import api, { PaginatedResponse } from 'lib/api'-import { activityLogTransforms, describerFor } from 'lib/components/ActivityLog/activityLogLogic'+import {+ activityLogTransforms,+ describerFor,+ ensureActivityDescribersLoaded,+} from 'lib/components/ActivityLog/activityLogLogic'import { ActivityLogItem, HumanizedActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'import { projectLogic } from 'scenes/projectLogic'@@ -93,7 +97,10 @@ export const sidePanelActivityLogic = kea<sidePanelActivityLogicType>([loadAllActivity: async (_, breakpoint) => {const filters = values.activeFilters ?? {}const expandedFilters = activityLogTransforms.expandListScopes(filters)- const response = await api.activity.list(expandedFilters)+ const [response] = await Promise.all([+ api.activity.list(expandedFilters),+ ensureActivityDescribersLoaded(),+ ])breakpoint()return responsediff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsxindex 4e9e913f3210..330bd43836a7 100644--- a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx@@ -4,7 +4,7 @@ import { router } from 'kea-router'import posthog, { JsonRecord } from 'posthog-js'import api from 'lib/api'-import { describerFor } from 'lib/components/ActivityLog/activityLogLogic'+import { describerFor, ensureActivityDescribersLoaded } from 'lib/components/ActivityLog/activityLogLogic'import { HumanizedActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'import { showCriticalNotificationToast } from 'lib/components/NotificationsMenu/notificationToasts'import { FEATURE_FLAGS } from 'lib/constants'@@ -262,10 +262,13 @@ export const sidePanelNotificationsLogic = kea<sidePanelNotificationsLogicType>(await breakpoint(1)try {- const response = await api.get<ChangesResponse>(- `api/projects/${values.currentProjectId}/my_notifications?` +- toParams({ unread: onlyUnread })- )+ const [response] = await Promise.all([+ api.get<ChangesResponse>(+ `api/projects/${values.currentProjectId}/my_notifications?` ++ toParams({ unread: onlyUnread })+ ),+ ensureActivityDescribersLoaded(),+ ])actions.clearErrorCount()return responsediff --git a/frontend/src/lib/Chart.ts b/frontend/src/lib/Chart.tsindex 579cc8b32402..95cfd9d7e7e3 100644--- a/frontend/src/lib/Chart.ts+++ b/frontend/src/lib/Chart.ts@@ -1,4 +1,6 @@/* oxlint-disable no-restricted-imports */+import 'chartjs-adapter-dayjs-3'+import { BoxAndWiskers, BoxPlotController } from '@sgratzl/chartjs-chart-boxplot'import { ChartType, DefaultDataPoint, Chart as RawChart, Tooltip, registerables } from 'chart.js'import CrosshairPlugin from 'chartjs-plugin-crosshair'diff --git a/frontend/src/lib/components/ActivityLog/activityLogLogic.notebook.test.tsx b/frontend/src/lib/components/ActivityLog/activityLogLogic.notebook.test.tsxindex 10e0235399bb..dcb6785bcf58 100644--- a/frontend/src/lib/components/ActivityLog/activityLogLogic.notebook.test.tsx+++ b/frontend/src/lib/components/ActivityLog/activityLogLogic.notebook.test.tsx@@ -2,13 +2,17 @@ import '@testing-library/jest-dom'import { render } from '@testing-library/react'-import { describerFor } from 'lib/components/ActivityLog/activityLogLogic'+import { describerFor, ensureActivityDescribersLoaded } from 'lib/components/ActivityLog/activityLogLogic'import { ActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'import { ActivityScope, InsightShortId } from '~/types'describe('the activity log logic', () => {describe('humanizing notebooks', () => {+ beforeEach(async () => {+ await ensureActivityDescribersLoaded()+ })+it('can handle notebook changes', async () => {const notebookChange = {user: {diff --git a/frontend/src/lib/components/ActivityLog/activityLogLogic.test.tsx b/frontend/src/lib/components/ActivityLog/activityLogLogic.test.tsxindex 8cc3503d74c7..8111492a5416 100644--- a/frontend/src/lib/components/ActivityLog/activityLogLogic.test.tsx+++ b/frontend/src/lib/components/ActivityLog/activityLogLogic.test.tsx@@ -6,7 +6,11 @@ import { router } from 'kea-router'import { expectLogic } from 'kea-test-utils'import { featureFlagsActivityResponseJson } from 'lib/components/ActivityLog/__mocks__/activityLogMocks'-import { activityLogLogic, describerFor } from 'lib/components/ActivityLog/activityLogLogic'+import {+ activityLogLogic,+ describerFor,+ ensureActivityDescribersLoaded,+} from 'lib/components/ActivityLog/activityLogLogic'import { ActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'import { flagActivityDescriber } from 'scenes/feature-flags/activityDescriptions'@@ -17,6 +21,10 @@ import { ActivityScope } from '~/types'describe('the activity log logic', () => {let logic: ReturnType<typeof activityLogLogic.build>+ beforeEach(async () => {+ await ensureActivityDescribersLoaded()+ })+describe('when not scoped by ID', () => {beforeEach(() => {useMocks({diff --git a/frontend/src/lib/components/ActivityLog/activityLogLogic.tsx b/frontend/src/lib/components/ActivityLog/activityLogLogic.tsxindex 9d8b3f4b7e2a..83bd8f521705 100644--- a/frontend/src/lib/components/ActivityLog/activityLogLogic.tsx+++ b/frontend/src/lib/components/ActivityLog/activityLogLogic.tsx@@ -2,11 +2,7 @@ import { actions, events, kea, key, listeners, path, props, reducers, selectorsimport { loaders } from 'kea-loaders'import { router, urlToAction } from 'kea-router'-import { ActivityDescriber as errorTrackingActivityDescriber } from '@posthog/products-error-tracking/frontend/components/ActivityDescriber'-import api, { ActivityLogPaginatedResponse } from 'lib/api'-import { instanceSettingActivityDescriber } from 'lib/components/ActivityLog/activityDescriptions/instanceSettingActivityDescriber'-import { tagActivityDescriber } from 'lib/components/ActivityLog/activityDescriptions/tagActivityDescriber'import {ActivityLogItem,Describer,@@ -16,47 +12,10 @@ import {} from 'lib/components/ActivityLog/humanizeActivity'import { ACTIVITY_PAGE_SIZE } from 'lib/constants'import { PaginationManual } from 'lib/lemon-ui/PaginationControl'-import { actionActivityDescriber } from 'scenes/actions/actionActivityDescriber'-import { alertConfigurationActivityDescriber } from 'scenes/alerts/activityDescriptions'-import { annotationActivityDescriber } from 'scenes/annotations/activityDescriptions'-import { userActivityDescriber } from 'scenes/authentication/shared/activityDescriptions'-import { cohortActivityDescriber } from 'scenes/cohorts/activityDescriptions'-import { dashboardActivityDescriber } from 'scenes/dashboard/dashboardActivityDescriber'-import { dataManagementActivityDescriber } from 'scenes/data-management/dataManagementDescribers'-import { batchExportActivityDescriber } from 'scenes/data-pipelines/batch-exports/activityDescriptions'-import { batchImportActivityDescriber } from 'scenes/data-pipelines/batch-imports/activityDescriptions'-import { dataWarehouseSavedQueryActivityDescriber } from 'scenes/data-warehouse/saved_queries/activityDescriptions'-import { experimentActivityDescriber } from 'scenes/experiments/experimentActivityDescriber'-import { flagActivityDescriber } from 'scenes/feature-flags/activityDescriptions'-import { groupActivityDescriber } from 'scenes/groups/activityDescriptions'-import { hogFunctionActivityDescriber } from 'scenes/hog-functions/misc/activityDescriptions'-import { notebookActivityDescriber } from 'scenes/notebooks/Notebook/notebookActivityDescriber'-import { personActivityDescriber } from 'scenes/persons/activityDescriptions'-import { productTourActivityDescriber } from 'scenes/product-tours/activityDescriptions'-import { insightActivityDescriber } from 'scenes/saved-insights/activityDescriptions'-import { replayActivityDescriber } from 'scenes/session-recordings/activityDescription'-import {- legalDocumentActivityDescriber,- organizationActivityDescriber,- organizationDomainActivityDescriber,-} from 'scenes/settings/organization/activityDescriptions'-import { projectSecretAPIKeyActivityDescriber } from 'scenes/settings/project/activityDescriptions'-import {- oauthApplicationActivityDescriber,- personalAPIKeyActivityDescriber,-} from 'scenes/settings/user/activityDescriptions'-import { surveyActivityDescriber } from 'scenes/surveys/surveyActivityDescriber'-import { teamActivityDescriber } from 'scenes/team-activity/teamActivityDescriber'import { urls } from 'scenes/urls'import { ActivityScope } from '~/types'-import { ticketActivityDescriber } from 'products/conversations/frontend/activityDescriber'-import { externalDataSourceActivityDescriber } from 'products/data_warehouse/frontend/shared/components/activityDescriptions'-import { endpointActivityDescriber } from 'products/endpoints/frontend/activityDescriber'-import { signalScoutConfigActivityDescriber } from 'products/signals/frontend/activityDescriber'-import { workflowActivityDescriber } from 'products/workflows/frontend/Workflows/misc/workflowActivityDescriber'-import type { activityLogLogicType } from './activityLogLogicType'// Define which scopes should be expanded to include multiple scopes@@ -110,94 +69,42 @@ export const activityLogTransforms = {},}+let loadedDescriberFor: ((logItem?: ActivityLogItem) => Describer | undefined) | null = null+let describersImport: Promise<void> | null = null++/**+ * The describer registry statically imports every product's describer — a large graph+ * (insight cards, chart.js, validators) that must stay out of the eagerly-loaded app shell,+ * so it is loaded on demand here. Loaders that fetch activity items await this before+ * returning, which guarantees `describerFor` resolves real describers by the time any+ * selector humanizes those items.+ *+ * Never rejects: if the chunk fails to load (e.g. a stale tab after a deploy), the loader+ * still resolves and `describerFor` degrades to `defaultDescriber`; the next call retries.+ */+export function ensureActivityDescribersLoaded(): Promise<void> {+ describersImport ??= import('./describers')+ .then((registry) => {+ loadedDescriberFor = registry.describerFor+ })+ .catch((error) => {+ describersImport = null+ console.error('Failed to load activity describers, falling back to default descriptions', error)+ })+ return describersImport+}+/*** Having this function inside the `humanizeActivity module was causing very weird test errors in other modules* see https://github.com/PostHog/posthog/pull/12062* So, we inject the function instead* **/export const describerFor = (logItem?: ActivityLogItem): Describer | undefined => {- switch (logItem?.scope) {- case ActivityScope.ACTION:- return actionActivityDescriber- case ActivityScope.ALERT_CONFIGURATION:- return alertConfigurationActivityDescriber- case ActivityScope.ANNOTATION:- return annotationActivityDescriber- case ActivityScope.BATCH_EXPORT:- return batchExportActivityDescriber- case ActivityScope.BATCH_IMPORT:- return batchImportActivityDescriber- case ActivityScope.DASHBOARD:- return dashboardActivityDescriber- case ActivityScope.FEATURE_FLAG:- return flagActivityDescriber- case ActivityScope.HOG_FUNCTION:- return hogFunctionActivityDescriber- case ActivityScope.HOG_FLOW:- return workflowActivityDescriber- case ActivityScope.COHORT:- return cohortActivityDescriber- case ActivityScope.INSIGHT:- return insightActivityDescriber- case ActivityScope.INSTANCE_SETTING:- return instanceSettingActivityDescriber- case ActivityScope.PERSON:- return personActivityDescriber- case ActivityScope.PERSONAL_API_KEY:- return personalAPIKeyActivityDescriber- case ActivityScope.PROJECT_SECRET_API_KEY:- return projectSecretAPIKeyActivityDescriber- case ActivityScope.GROUP:- return groupActivityDescriber- case ActivityScope.EVENT_DEFINITION:- case ActivityScope.PROPERTY_DEFINITION:- return dataManagementActivityDescriber- case ActivityScope.NOTEBOOK:- return notebookActivityDescriber- case ActivityScope.TEAM:- return teamActivityDescriber- case ActivityScope.ORGANIZATION:- case ActivityScope.ORGANIZATION_MEMBERSHIP:- case ActivityScope.ORGANIZATION_INVITE:- return organizationActivityDescriber- case ActivityScope.ORGANIZATION_DOMAIN:- return organizationDomainActivityDescriber- case ActivityScope.OAUTH_APPLICATION:- return oauthApplicationActivityDescriber- case ActivityScope.LEGAL_DOCUMENT:- return legalDocumentActivityDescriber- case ActivityScope.SURVEY:- return surveyActivityDescriber- case ActivityScope.ERROR_TRACKING_ISSUE:- return errorTrackingActivityDescriber- case ActivityScope.DATA_WAREHOUSE_SAVED_QUERY:- return dataWarehouseSavedQueryActivityDescriber- case ActivityScope.REPLAY:- return replayActivityDescriber- case ActivityScope.HEATMAP:- return (logActivity, asNotification) => defaultDescriber(logActivity, asNotification)- case ActivityScope.EXPERIMENT:- return experimentActivityDescriber- case ActivityScope.TAG:- case ActivityScope.TAGGED_ITEM:- return tagActivityDescriber- case ActivityScope.EXTERNAL_DATA_SOURCE:- case ActivityScope.EXTERNAL_DATA_SCHEMA:- return externalDataSourceActivityDescriber- case ActivityScope.USER:- return userActivityDescriber- case ActivityScope.ENDPOINT:- case ActivityScope.ENDPOINT_VERSION:- return endpointActivityDescriber- case ActivityScope.PRODUCT_TOUR:- return productTourActivityDescriber- case ActivityScope.TICKET:- return ticketActivityDescriber- case ActivityScope.SIGNAL_SCOUT_CONFIG:- return signalScoutConfigActivityDescriber- default:- return (logActivity, asNotification) => defaultDescriber(logActivity, asNotification)+ if (!loadedDescriberFor) {+ void ensureActivityDescribersLoaded()+ return defaultDescriber}+ return loadedDescriberFor(logItem)}export type ActivityLogLogicProps = {@@ -222,7 +129,10 @@ export const activityLogLogic = kea<activityLogLogicType>([{fetchActivity: async () => {const transformedProps = activityLogTransforms.expandListLegacyScopes(props)- const response = await api.activity.listLegacy(transformedProps, values.page)+ const [response] = await Promise.all([+ api.activity.listLegacy(transformedProps, values.page),+ ensureActivityDescribersLoaded(),+ ])return { results: response.results, count: (response as any).total_count ?? response.count }},},diff --git a/frontend/src/lib/components/ActivityLog/describers.tsx b/frontend/src/lib/components/ActivityLog/describers.tsxnew file mode 100644index 000000000000..55ab22bb8dc7--- /dev/null+++ b/frontend/src/lib/components/ActivityLog/describers.tsx@@ -0,0 +1,129 @@+import { ActivityDescriber as errorTrackingActivityDescriber } from '@posthog/products-error-tracking/frontend/components/ActivityDescriber'++import { instanceSettingActivityDescriber } from 'lib/components/ActivityLog/activityDescriptions/instanceSettingActivityDescriber'+import { tagActivityDescriber } from 'lib/components/ActivityLog/activityDescriptions/tagActivityDescriber'+import { ActivityLogItem, Describer, defaultDescriber } from 'lib/components/ActivityLog/humanizeActivity'+import { actionActivityDescriber } from 'scenes/actions/actionActivityDescriber'+import { alertConfigurationActivityDescriber } from 'scenes/alerts/activityDescriptions'+import { annotationActivityDescriber } from 'scenes/annotations/activityDescriptions'+import { userActivityDescriber } from 'scenes/authentication/shared/activityDescriptions'+import { cohortActivityDescriber } from 'scenes/cohorts/activityDescriptions'+import { dashboardActivityDescriber } from 'scenes/dashboard/dashboardActivityDescriber'+import { dataManagementActivityDescriber } from 'scenes/data-management/dataManagementDescribers'+import { batchExportActivityDescriber } from 'scenes/data-pipelines/batch-exports/activityDescriptions'+import { batchImportActivityDescriber } from 'scenes/data-pipelines/batch-imports/activityDescriptions'+import { dataWarehouseSavedQueryActivityDescriber } from 'scenes/data-warehouse/saved_queries/activityDescriptions'+import { experimentActivityDescriber } from 'scenes/experiments/experimentActivityDescriber'+import { flagActivityDescriber } from 'scenes/feature-flags/activityDescriptions'+import { groupActivityDescriber } from 'scenes/groups/activityDescriptions'+import { hogFunctionActivityDescriber } from 'scenes/hog-functions/misc/activityDescriptions'+import { notebookActivityDescriber } from 'scenes/notebooks/Notebook/notebookActivityDescriber'+import { personActivityDescriber } from 'scenes/persons/activityDescriptions'+import { productTourActivityDescriber } from 'scenes/product-tours/activityDescriptions'+import { insightActivityDescriber } from 'scenes/saved-insights/activityDescriptions'+import { replayActivityDescriber } from 'scenes/session-recordings/activityDescription'+import {+ legalDocumentActivityDescriber,+ organizationActivityDescriber,+ organizationDomainActivityDescriber,+} from 'scenes/settings/organization/activityDescriptions'+import { projectSecretAPIKeyActivityDescriber } from 'scenes/settings/project/activityDescriptions'+import {+ oauthApplicationActivityDescriber,+ personalAPIKeyActivityDescriber,+} from 'scenes/settings/user/activityDescriptions'+import { surveyActivityDescriber } from 'scenes/surveys/surveyActivityDescriber'+import { teamActivityDescriber } from 'scenes/team-activity/teamActivityDescriber'++import { ActivityScope } from '~/types'++import { ticketActivityDescriber } from 'products/conversations/frontend/activityDescriber'+import { externalDataSourceActivityDescriber } from 'products/data_warehouse/frontend/shared/components/activityDescriptions'+import { endpointActivityDescriber } from 'products/endpoints/frontend/activityDescriber'+import { signalScoutConfigActivityDescriber } from 'products/signals/frontend/activityDescriber'+import { workflowActivityDescriber } from 'products/workflows/frontend/Workflows/misc/workflowActivityDescriber'++export const describerFor = (logItem?: ActivityLogItem): Describer | undefined => {+ switch (logItem?.scope) {+ case ActivityScope.ACTION:+ return actionActivityDescriber+ case ActivityScope.ALERT_CONFIGURATION:+ return alertConfigurationActivityDescriber+ case ActivityScope.ANNOTATION:+ return annotationActivityDescriber+ case ActivityScope.BATCH_EXPORT:+ return batchExportActivityDescriber+ case ActivityScope.BATCH_IMPORT:+ return batchImportActivityDescriber+ case ActivityScope.DASHBOARD:+ return dashboardActivityDescriber+ case ActivityScope.FEATURE_FLAG:+ return flagActivityDescriber+ case ActivityScope.HOG_FUNCTION:+ return hogFunctionActivityDescriber+ case ActivityScope.HOG_FLOW:+ return workflowActivityDescriber+ case ActivityScope.COHORT:+ return cohortActivityDescriber+ case ActivityScope.INSIGHT:+ return insightActivityDescriber+ case ActivityScope.INSTANCE_SETTING:+ return instanceSettingActivityDescriber+ case ActivityScope.PERSON:+ return personActivityDescriber+ case ActivityScope.PERSONAL_API_KEY:+ return personalAPIKeyActivityDescriber+ case ActivityScope.PROJECT_SECRET_API_KEY:+ return projectSecretAPIKeyActivityDescriber+ case ActivityScope.GROUP:+ return groupActivityDescriber+ case ActivityScope.EVENT_DEFINITION:+ case ActivityScope.PROPERTY_DEFINITION:+ return dataManagementActivityDescriber+ case ActivityScope.NOTEBOOK:+ return notebookActivityDescriber+ case ActivityScope.TEAM:+ return teamActivityDescriber+ case ActivityScope.ORGANIZATION:+ case ActivityScope.ORGANIZATION_MEMBERSHIP:+ case ActivityScope.ORGANIZATION_INVITE:+ return organizationActivityDescriber+ case ActivityScope.ORGANIZATION_DOMAIN:+ return organizationDomainActivityDescriber+ case ActivityScope.OAUTH_APPLICATION:+ return oauthApplicationActivityDescriber+ case ActivityScope.LEGAL_DOCUMENT:+ return legalDocumentActivityDescriber+ case ActivityScope.SURVEY:+ return surveyActivityDescriber+ case ActivityScope.ERROR_TRACKING_ISSUE:+ return errorTrackingActivityDescriber+ case ActivityScope.DATA_WAREHOUSE_SAVED_QUERY:+ return dataWarehouseSavedQueryActivityDescriber+ case ActivityScope.REPLAY:+ return replayActivityDescriber+ case ActivityScope.HEATMAP:+ return defaultDescriber+ case ActivityScope.EXPERIMENT:+ return experimentActivityDescriber+ case ActivityScope.TAG:+ case ActivityScope.TAGGED_ITEM:+ return tagActivityDescriber+ case ActivityScope.EXTERNAL_DATA_SOURCE:+ case ActivityScope.EXTERNAL_DATA_SCHEMA:+ return externalDataSourceActivityDescriber+ case ActivityScope.USER:+ return userActivityDescriber+ case ActivityScope.ENDPOINT:+ case ActivityScope.ENDPOINT_VERSION:+ return endpointActivityDescriber+ case ActivityScope.PRODUCT_TOUR:+ return productTourActivityDescriber+ case ActivityScope.TICKET:+ return ticketActivityDescriber+ case ActivityScope.SIGNAL_SCOUT_CONFIG:+ return signalScoutConfigActivityDescriber+ default:+ return defaultDescriber+ }+}diff --git a/frontend/src/lib/components/Cards/InsightCard/CompactUniversalFiltersDisplay.tsx b/frontend/src/lib/components/Cards/InsightCard/CompactUniversalFiltersDisplay.tsxindex b0fd949538b4..3419e6658a09 100644--- a/frontend/src/lib/components/Cards/InsightCard/CompactUniversalFiltersDisplay.tsx+++ b/frontend/src/lib/components/Cards/InsightCard/CompactUniversalFiltersDisplay.tsx@@ -1,3 +1,5 @@+import './InsightDetails.scss'+import { useValues } from 'kea'import React from 'react'diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss b/frontend/src/lib/components/Cards/InsightCard/InsightCard.scssindex 5c1a6f67cb9c..19ba2c780e04 100644--- a/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss+++ b/frontend/src/lib/components/Cards/InsightCard/InsightCard.scss@@ -59,125 +59,3 @@min-height: var(--insight-viz-min-height);}}--.InsightDetails,-.CardMeta .InsightDetails {- // Including .CardMeta to increase specificity there, specifically for h5- font-size: 0.8125rem;- line-height: 1.5rem;-- h5 {- margin-bottom: 0.125rem;- line-height: 1.5rem;- }-- section:not(:last-child) {- margin-bottom: 0.5rem;- }-- .LemonRow {- min-height: 2rem;- font-size: inherit;- }-}--.InsightDetails__footer {- display: flex;- flex-wrap: wrap;- gap: 0.5rem 2rem;-- .profile-package {- vertical-align: middle;- }-- .taxonomic-breakdown-filter.tag-pill {- padding: 0;- font-size: 0.8125rem;- vertical-align: unset;- background: none;- border: none;- border-radius: 0;- }-}--.SeriesDisplay {- display: flex;- gap: 0.375rem;- align-items: start;- min-height: 1.5rem;-- &:not(:last-child) {- margin-bottom: 0.25rem;- }-}--.SeriesDisplay__raw-name {- display: inline-flex;- align-items: center;- height: 1.25rem;- padding: 0 0.25rem;- margin: 0 0.25rem;- font-size: 0.6875rem;- font-weight: 600;- line-height: 1rem;- color: var(--color-text-secondary);- vertical-align: middle;- background: var(--color-accent-highlight-secondary);- border: 1px solid var(--color-accent-highlight-secondary-border);- border-radius: var(--radius-sm);-- &.SeriesDisplay__raw-name--event::before,- &.SeriesDisplay__raw-name--action::before,- &.SeriesDisplay__raw-name--data-warehouse::before {- display: flex;- flex-shrink: 0;- align-items: center;- justify-content: center;- width: 1rem;- height: calc(100% + 2px);- margin-top: -1px;- margin-right: 0.25rem;- margin-left: calc(-0.25rem - 1px); // Align to overlay the container's border on the left- font-size: 0.625rem;- font-weight: 700;- line-height: 1rem;- color: var(--color-bg-surface-primary);- text-align: center;- background: var(--color-accent);- border-radius: inherit;- }-- &.SeriesDisplay__raw-name--event::before {- content: 'E';- }-- &.SeriesDisplay__raw-name--action::before {- content: 'A';- }-- &.SeriesDisplay__raw-name--data-warehouse::before {- content: 'D';- }-}--.SeriesDisplay__value {- display: inline-flex;- align-items: center;- height: 1.25rem;- padding: 0 0.125rem;- background: var(--color-bg-surface-secondary);- border-width: 1px;- border-radius: var(--radius-sm);-}--.SeriesDisplay__condition {- display: flex;- line-height: 1.5rem;-}--.SeriesDisplay__arrow {- flex-shrink: 0;- margin-right: 0.25rem;- font-size: 1.25rem;- color: var(--color-text-secondary);-}diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightDetails.scss b/frontend/src/lib/components/Cards/InsightCard/InsightDetails.scssnew file mode 100644index 000000000000..c9a58505e75b--- /dev/null+++ b/frontend/src/lib/components/Cards/InsightCard/InsightDetails.scss@@ -0,0 +1,121 @@+.InsightDetails,+.CardMeta .InsightDetails {+ // Including .CardMeta to increase specificity there, specifically for h5+ font-size: 0.8125rem;+ line-height: 1.5rem;++ h5 {+ margin-bottom: 0.125rem;+ line-height: 1.5rem;+ }++ section:not(:last-child) {+ margin-bottom: 0.5rem;+ }++ .LemonRow {+ min-height: 2rem;+ font-size: inherit;+ }+}++.InsightDetails__footer {+ display: flex;+ flex-wrap: wrap;+ gap: 0.5rem 2rem;++ .profile-package {+ vertical-align: middle;+ }++ .taxonomic-breakdown-filter.tag-pill {+ padding: 0;+ font-size: 0.8125rem;+ vertical-align: unset;+ background: none;+ border: none;+ border-radius: 0;+ }+}++.SeriesDisplay {+ display: flex;+ gap: 0.375rem;+ align-items: start;+ min-height: 1.5rem;++ &:not(:last-child) {+ margin-bottom: 0.25rem;+ }+}++.SeriesDisplay__raw-name {+ display: inline-flex;+ align-items: center;+ height: 1.25rem;+ padding: 0 0.25rem;+ margin: 0 0.25rem;+ font-size: 0.6875rem;+ font-weight: 600;+ line-height: 1rem;+ color: var(--color-text-secondary);+ vertical-align: middle;+ background: var(--color-accent-highlight-secondary);+ border: 1px solid var(--color-accent-highlight-secondary-border);+ border-radius: var(--radius-sm);++ &.SeriesDisplay__raw-name--event::before,+ &.SeriesDisplay__raw-name--action::before,+ &.SeriesDisplay__raw-name--data-warehouse::before {+ display: flex;+ flex-shrink: 0;+ align-items: center;+ justify-content: center;+ width: 1rem;+ height: calc(100% + 2px);+ margin-top: -1px;+ margin-right: 0.25rem;+ margin-left: calc(-0.25rem - 1px); // Align to overlay the container's border on the left+ font-size: 0.625rem;+ font-weight: 700;+ line-height: 1rem;+ color: var(--color-bg-surface-primary);+ text-align: center;+ background: var(--color-accent);+ border-radius: inherit;+ }++ &.SeriesDisplay__raw-name--event::before {+ content: 'E';+ }++ &.SeriesDisplay__raw-name--action::before {+ content: 'A';+ }++ &.SeriesDisplay__raw-name--data-warehouse::before {+ content: 'D';+ }+}++.SeriesDisplay__value {+ display: inline-flex;+ align-items: center;+ height: 1.25rem;+ padding: 0 0.125rem;+ background: var(--color-bg-surface-secondary);+ border-width: 1px;+ border-radius: var(--radius-sm);+}++.SeriesDisplay__condition {+ display: flex;+ line-height: 1.5rem;+}++.SeriesDisplay__arrow {+ flex-shrink: 0;+ margin-right: 0.25rem;+ font-size: 1.25rem;+ color: var(--color-text-secondary);+}diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightDetails.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightDetails.tsxindex 66818ab8fc99..742308ec396a 100644--- a/frontend/src/lib/components/Cards/InsightCard/InsightDetails.tsx+++ b/frontend/src/lib/components/Cards/InsightCard/InsightDetails.tsx@@ -1,3 +1,5 @@+import './InsightDetails.scss'+import { useValues } from 'kea'import React from 'react'diff --git a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsxindex b561c74f9314..24a277b114e4 100644--- a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx+++ b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx@@ -1,8 +1,6 @@// TODO: Move the below scss to somewhere more commonimport '../../../../../scenes/insights/InsightTooltip/InsightTooltip.scss'-import 'chartjs-adapter-dayjs-3'-import annotationPlugin, { AnnotationPluginOptions, LineAnnotationOptions } from 'chartjs-plugin-annotation'import dataLabelsPlugin from 'chartjs-plugin-datalabels'import ChartjsPluginStacked100 from 'chartjs-plugin-stacked100'diff --git a/frontend/src/queries/nodes/InsightViz/InsightViz.tsx b/frontend/src/queries/nodes/InsightViz/InsightViz.tsxindex f487abd9d3e6..06ad3c04a9b9 100644--- a/frontend/src/queries/nodes/InsightViz/InsightViz.tsx+++ b/frontend/src/queries/nodes/InsightViz/InsightViz.tsx@@ -4,6 +4,9 @@ import clsx from 'clsx'import { BindLogic, BuiltLogic, LogicWrapper } from 'kea'import { useState } from 'react'+// InsightViz renders the .InsightCard__viz wrapper whose styles live in InsightCard.scss.+// Import it here so the viz is sized correctly wherever it renders, not only inside an InsightCard.+import 'lib/components/Cards/InsightCard/InsightCard.scss'import { useAttachedLogic } from 'lib/logic/scenes/useAttachedLogic'import { insightDataLogic } from 'scenes/insights/insightDataLogic'import { insightLogic } from 'scenes/insights/insightLogic'diff --git a/frontend/src/scenes/audit-logs/advancedActivityLogsLogic.tsx b/frontend/src/scenes/audit-logs/advancedActivityLogsLogic.tsxindex 2d8c549a2071..99b22d8d8e0c 100644--- a/frontend/src/scenes/audit-logs/advancedActivityLogsLogic.tsx+++ b/frontend/src/scenes/audit-logs/advancedActivityLogsLogic.tsx@@ -3,6 +3,7 @@ import { loaders } from 'kea-loaders'import { actionToUrl, router, urlToAction } from 'kea-router'import api, { CountedPaginatedResponse } from 'lib/api'+import { ensureActivityDescribersLoaded } from 'lib/components/ActivityLog/activityLogLogic'import { ActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'import { ADVANCED_ACTIVITY_PAGE_SIZE, OrganizationMembershipLevel } from 'lib/constants'import { lemonToast } from 'lib/lemon-ui/LemonToast'@@ -278,7 +279,10 @@ export const advancedActivityLogsLogic = kea<advancedActivityLogsLogicType>([params.append('page', (values.filters.page || 1).toString())params.append('page_size', ADVANCED_ACTIVITY_PAGE_SIZE.toString())- const response = await api.get(`${values.advancedActivityLogsBaseUrl}/?${params}`)+ const [response] = await Promise.all([+ api.get(`${values.advancedActivityLogsBaseUrl}/?${params}`),+ ensureActivityDescribersLoaded(),+ ])return response},},diff --git a/frontend/src/scenes/billing/BillingLineGraph.tsx b/frontend/src/scenes/billing/BillingLineGraph.tsxindex 5a35d7e9cb35..ba55d0b61cbc 100644--- a/frontend/src/scenes/billing/BillingLineGraph.tsx+++ b/frontend/src/scenes/billing/BillingLineGraph.tsx@@ -1,7 +1,5 @@import './BillingLineGraph.scss'-import 'chartjs-adapter-dayjs-3'-import annotationPlugin from 'chartjs-plugin-annotation'import { useValues } from 'kea'import { useCallback, useEffect, useRef, useState } from 'react'diff --git a/frontend/src/scenes/cohorts/activityDescriptions.tsx b/frontend/src/scenes/cohorts/activityDescriptions.tsxindex 38ec5b35663c..23580c469476 100644--- a/frontend/src/scenes/cohorts/activityDescriptions.tsx+++ b/frontend/src/scenes/cohorts/activityDescriptions.tsx@@ -1,5 +1,3 @@-import '../../lib/components/Cards/InsightCard/InsightCard.scss'-import {ActivityChange,ActivityLogItem,diff --git a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsxindex 76a19ba2c4cb..345c6c994205 100644--- a/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx+++ b/frontend/src/scenes/insights/views/LineGraph/LineGraph.tsx@@ -1,5 +1,3 @@-import 'chartjs-adapter-dayjs-3'-import annotationPlugin from 'chartjs-plugin-annotation'import ChartDataLabels from 'chartjs-plugin-datalabels'import ChartjsPluginStacked100, { ExtendedChartData } from 'chartjs-plugin-stacked100'diff --git a/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx b/frontend/src/scenes/insights/views/LineGraph/PieChart.tsxindex 0e91e4473cb0..7c98ebaf0883 100644--- a/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx+++ b/frontend/src/scenes/insights/views/LineGraph/PieChart.tsx@@ -1,5 +1,3 @@-import 'chartjs-adapter-dayjs-3'-import ChartDataLabels, { Context } from 'chartjs-plugin-datalabels'import { useActions, useValues } from 'kea'diff --git a/frontend/src/scenes/saved-insights/activityDescriptions.tsx b/frontend/src/scenes/saved-insights/activityDescriptions.tsxindex 76085b3a46af..9d9380bdaa28 100644--- a/frontend/src/scenes/saved-insights/activityDescriptions.tsx+++ b/frontend/src/scenes/saved-insights/activityDescriptions.tsx@@ -1,5 +1,3 @@-import '../../lib/components/Cards/InsightCard/InsightCard.scss'-import posthog from 'posthog-js'import { Fragment } from 'react'