mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
feat(devex): Introduce prettier-plugin-sort-imports to sort our imports (#35965)
This commit is contained in:
@@ -10,6 +10,7 @@ You are an expert product engineer specializing in PostHog's comprehensive activ
|
||||
Your expertise covers:
|
||||
|
||||
**Core Architecture Knowledge:**
|
||||
|
||||
- ActivityLog model with UUID primary keys, scope constraints, and optimized indexing
|
||||
- ActivityScope enum with 72+ predefined scopes and ChangeAction types
|
||||
- Signal-based capture system using ModelActivityMixin and model_activity_signal
|
||||
@@ -17,12 +18,14 @@ Your expertise covers:
|
||||
- Change detection engine with field comparison logic and exclusion hierarchies
|
||||
|
||||
**Frontend Integration:**
|
||||
|
||||
- React components (ActivityLog.tsx, ActivityLogRow.tsx) with PayGate integration
|
||||
- Kea-based state management in activityLogLogic.tsx
|
||||
- Activity describer system with 15+ specialized describers
|
||||
- API integration patterns and endpoint strategies
|
||||
|
||||
**Implementation Patterns:**
|
||||
|
||||
- Mixin-based integration (recommended) vs manual signal dispatch
|
||||
- Field and signal exclusions for performance optimization
|
||||
- Batch operations using mute_selected_signals() context manager
|
||||
|
||||
@@ -16,8 +16,12 @@ dist/
|
||||
node_modules/
|
||||
pnpm-lock.yaml
|
||||
posthog/templates/email/*
|
||||
posthog/templates/**/*.html
|
||||
common/hogvm/typescript/src/stl/bytecode.ts
|
||||
common/hogvm/__tests__/__snapshots__/*
|
||||
rust/
|
||||
livestream/
|
||||
cli/target/
|
||||
cli/tests/_cases/**/*
|
||||
frontend/src/products.tsx
|
||||
frontend/src/layout.html
|
||||
19
.prettierrc
19
.prettierrc
@@ -3,5 +3,22 @@
|
||||
"tabWidth": 4,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"printWidth": 120
|
||||
"printWidth": 120,
|
||||
"plugins": ["@trivago/prettier-plugin-sort-imports"],
|
||||
"importOrder": [
|
||||
"~/styles$",
|
||||
"\\.s?css$",
|
||||
"\\.mocks?$",
|
||||
"\\.spy$",
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"^@posthog.*$",
|
||||
"^lib/(.*)$|^scenes/(.*)$",
|
||||
"^~/(.*)$",
|
||||
"^public/(.*)$",
|
||||
"^products/(.*)$",
|
||||
"^storybook/(.*)$",
|
||||
"^\\.+/"
|
||||
],
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
- Python: Use type hints, follow mypy strict rules
|
||||
- Frontend: TypeScript required, explicit return types
|
||||
- Imports: Use simple-import-sort, avoid direct dayjs imports (use lib/dayjs)
|
||||
- Imports: Use prettier-plugin-sort-imports (automatically runs on format), avoid direct dayjs imports (use lib/dayjs)
|
||||
- CSS: Use tailwind utility classes instead of inline styles
|
||||
- Error handling: Prefer explicit error handling with typed errors
|
||||
- Naming: Use descriptive names, camelCase for JS/TS, snake_case for Python
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
# posthog-cli
|
||||
|
||||
## 0.4.2
|
||||
|
||||
- fix url encoded sourcemaps
|
||||
|
||||
## 0.4.1
|
||||
|
||||
- add remote url to release metadata
|
||||
|
||||
## 0.4.0
|
||||
|
||||
- extract sourcemap url from source code
|
||||
- add process command to inject and upload sourcemaps
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import fs from 'node:fs/promises'
|
||||
|
||||
import autoprefixer from 'autoprefixer'
|
||||
import chokidar from 'chokidar'
|
||||
import cors from 'cors'
|
||||
@@ -10,6 +8,7 @@ import { polyfillNode } from 'esbuild-plugin-polyfill-node'
|
||||
import { sassPlugin } from 'esbuild-sass-plugin'
|
||||
import express from 'express'
|
||||
import fse from 'fs-extra'
|
||||
import fs from 'node:fs/promises'
|
||||
import * as path from 'path'
|
||||
import postcss from 'postcss'
|
||||
import postcssPresetEnv from 'postcss-preset-env'
|
||||
@@ -310,12 +309,12 @@ export async function buildOrWatch(config) {
|
||||
? 'Building'
|
||||
: 'Rebuilding'
|
||||
: logOpts.success
|
||||
? buildCount === 1
|
||||
? 'Built'
|
||||
: 'Rebuilt'
|
||||
: buildCount === 1
|
||||
? 'Building failed'
|
||||
: 'Rebuilding failed '
|
||||
? buildCount === 1
|
||||
? 'Built'
|
||||
: 'Rebuilt'
|
||||
: buildCount === 1
|
||||
? 'Building failed'
|
||||
: 'Rebuilding failed '
|
||||
|
||||
console.info(`${icon} ${name ? `"${name}": ` : ''}${message}${timingSuffix}`)
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export function exec(input: any[] | VMState | Bytecodes, options?: ExecOptions):
|
||||
if (!rootBytecode || rootBytecode.length === 0 || (rootBytecode[0] !== '_h' && rootBytecode[0] !== '_H')) {
|
||||
throw new HogVMException("Invalid HogQL bytecode, must start with '_H'")
|
||||
}
|
||||
const version = rootBytecode[0] === '_H' ? rootBytecode[1] ?? 0 : 0
|
||||
const version = rootBytecode[0] === '_H' ? (rootBytecode[1] ?? 0) : 0
|
||||
|
||||
let temp: any
|
||||
let temp2: any
|
||||
@@ -125,7 +125,7 @@ export function exec(input: any[] | VMState | Bytecodes, options?: ExecOptions):
|
||||
const rootGlobals: Record<string, any> =
|
||||
bytecodes.root?.globals && options?.globals
|
||||
? { ...bytecodes.root.globals, ...options.globals }
|
||||
: bytecodes.root?.globals ?? options?.globals ?? {}
|
||||
: (bytecodes.root?.globals ?? options?.globals ?? {})
|
||||
|
||||
if (callStack.length === 0) {
|
||||
callStack.push({
|
||||
|
||||
@@ -73,7 +73,7 @@ export type Telemetry = [
|
||||
/** Opcode */
|
||||
string,
|
||||
/** Debug */
|
||||
string
|
||||
string,
|
||||
]
|
||||
|
||||
export interface ExecResult {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
import * as path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { buildInParallel } from '@posthog/esbuilder'
|
||||
|
||||
export const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { MOCK_DEFAULT_TEAM, MOCK_DEFAULT_PROJECT } from 'lib/api.mock'
|
||||
import { MOCK_DEFAULT_PROJECT, MOCK_DEFAULT_TEAM } from 'lib/api.mock'
|
||||
|
||||
import { AppContext } from '~/types'
|
||||
|
||||
export const getStorybookAppContext = (): AppContext => ({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { setFeatureFlags } from '~/mocks/browser'
|
||||
import type { Decorator } from '@storybook/react'
|
||||
|
||||
import { setFeatureFlags } from '~/mocks/browser'
|
||||
|
||||
declare module '@storybook/types' {
|
||||
interface Parameters {
|
||||
featureFlags?: string[]
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import { createMemoryHistory } from 'history'
|
||||
import { initKea } from '~/initKea'
|
||||
import { router } from 'kea-router'
|
||||
import { getContext } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { App } from 'scenes/App'
|
||||
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { worker } from '~/mocks/browser'
|
||||
import { App } from 'scenes/App'
|
||||
import { projectLogic } from 'scenes/projectLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
import { projectLogic } from 'scenes/projectLogic'
|
||||
|
||||
import { initKea } from '~/initKea'
|
||||
import { worker } from '~/mocks/browser'
|
||||
|
||||
export function resetKeaStory(): void {
|
||||
worker.resetHandlers()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Decorator } from '@storybook/react'
|
||||
|
||||
import { useAvailableFeatures } from '~/mocks/features'
|
||||
|
||||
import { KeaStory } from './kea-story'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from 'react'
|
||||
import { router } from 'kea-router'
|
||||
import type { Decorator } from '@storybook/react'
|
||||
import { router } from 'kea-router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
declare module '@storybook/types' {
|
||||
interface Parameters {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { createEntry } from '../webpack.config.js'
|
||||
import type { StorybookConfig } from '@storybook/types'
|
||||
|
||||
import { createEntry } from '../webpack.config.js'
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: [
|
||||
'../../../frontend/src/**/*.stories.@(js|jsx|ts|tsx|mdx)',
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
import '~/styles'
|
||||
|
||||
import { Controls, Description, Primary, Stories, Subtitle, Title } from '@storybook/blocks'
|
||||
import type { Meta, Parameters, Preview } from '@storybook/react'
|
||||
import { Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks'
|
||||
import { worker } from '~/mocks/browser'
|
||||
|
||||
import { apiHostOrigin } from 'lib/utils/apiHost'
|
||||
|
||||
import { loadPostHogJS } from '~/loadPostHogJS'
|
||||
import { worker } from '~/mocks/browser'
|
||||
import { defaultMocks } from '~/mocks/handlers'
|
||||
|
||||
import { getStorybookAppContext } from './app-context'
|
||||
import { withFeatureFlags } from './decorators/withFeatureFlags'
|
||||
import { withKea } from './decorators/withKea'
|
||||
import { withMockDate } from './decorators/withMockDate'
|
||||
import { defaultMocks } from '~/mocks/handlers'
|
||||
import { withFeatureFlags } from './decorators/withFeatureFlags'
|
||||
import { withTheme } from './decorators/withTheme'
|
||||
import { apiHostOrigin } from 'lib/utils/apiHost'
|
||||
import { getStorybookAppContext } from './app-context'
|
||||
import { withPageUrl } from './decorators/withPageUrl'
|
||||
import { withTheme } from './decorators/withTheme'
|
||||
|
||||
const setupMsw = (): void => {
|
||||
// Make sure the msw worker is started
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { toMatchImageSnapshot } from 'jest-image-snapshot'
|
||||
import { getStoryContext, TestRunnerConfig, TestContext } from '@storybook/test-runner'
|
||||
import type { Locator, Page, LocatorScreenshotOptions } from '@playwright/test'
|
||||
import type { Mocks } from '~/mocks/utils'
|
||||
import type { Locator, LocatorScreenshotOptions, Page } from '@playwright/test'
|
||||
import { StoryContext } from '@storybook/csf'
|
||||
import { TestContext, TestRunnerConfig, getStoryContext } from '@storybook/test-runner'
|
||||
import { toMatchImageSnapshot } from 'jest-image-snapshot'
|
||||
import path from 'path'
|
||||
|
||||
import type { Mocks } from '~/mocks/utils'
|
||||
|
||||
const DEFAULT_VIEWPORT = { width: 1280, height: 720 }
|
||||
|
||||
// 'firefox' is technically supported too, but as of June 2023 it has memory usage issues that make is unusable
|
||||
|
||||
@@ -29,8 +29,8 @@ function createEntry(entry) {
|
||||
process.env.GENERATE_SOURCEMAP === 'false'
|
||||
? false
|
||||
: process.env.NODE_ENV === 'production'
|
||||
? 'source-map'
|
||||
: 'inline-source-map',
|
||||
? 'source-map'
|
||||
: 'inline-source-map',
|
||||
entry: {
|
||||
[entry]: entry === 'main' || entry === 'cypress' ? './src/index.tsx' : null,
|
||||
},
|
||||
@@ -43,8 +43,8 @@ function createEntry(entry) {
|
||||
publicPath: process.env.JS_URL
|
||||
? `${process.env.JS_URL}${process.env.JS_URL.endsWith('/') ? '' : '/'}static/`
|
||||
: process.env.NODE_ENV === 'production'
|
||||
? '/static/'
|
||||
: `http${process.env.LOCAL_HTTPS ? 's' : ''}://${webpackDevServerFrontendAddr}:8234/static/`,
|
||||
? '/static/'
|
||||
: `http${process.env.LOCAL_HTTPS ? 's' : ''}://${webpackDevServerFrontendAddr}:8234/static/`,
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
@@ -207,13 +207,13 @@ function createEntry(entry) {
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
]
|
||||
: entry === 'cypress'
|
||||
? [
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
]
|
||||
: []
|
||||
? [
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
]
|
||||
: []
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { defineConfig } from 'cypress'
|
||||
import { createClient } from 'redis'
|
||||
import * as webpackPreprocessor from '@cypress/webpack-preprocessor'
|
||||
import { PNG } from 'pngjs'
|
||||
import * as pixelmatch from 'pixelmatch'
|
||||
import { defineConfig } from 'cypress'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import * as pixelmatch from 'pixelmatch'
|
||||
import { PNG } from 'pngjs'
|
||||
import { createClient } from 'redis'
|
||||
|
||||
import { createEntry } from '../common/storybook/webpack.config'
|
||||
|
||||
const downloadDirectory = path.join(__dirname, '..', '..', 'downloads')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'givens/setup'
|
||||
import './commands'
|
||||
import 'cypress-axe'
|
||||
import 'givens/setup'
|
||||
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
import './commands'
|
||||
import { setupFeatureFlags } from './decide'
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { CaptureResult } from 'posthog-js'
|
||||
|
||||
declare global {
|
||||
|
||||
@@ -5,12 +5,12 @@ This guide explains how to create isolated PostHog development environments usin
|
||||
**Key Benefits:**
|
||||
|
||||
- Work on multiple branches simultaneously with isolated environments
|
||||
- Each worktree has its own Flox environment and Python dependencies
|
||||
- Each worktree has its own Flox environment and Python dependencies
|
||||
- Quick switching between features, bug fixes, and PR reviews
|
||||
- Standard `bin/start` command works in each worktree
|
||||
|
||||
> [!IMPORTANT]
|
||||
**Important:** Only one PostHog instance (`bin/start`) can run at a time since they all use the same ports. The workflow focuses on quickly stopping one instance and starting another.
|
||||
> **Important:** Only one PostHog instance (`bin/start`) can run at a time since they all use the same ports. The workflow focuses on quickly stopping one instance and starting another.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -206,14 +206,14 @@ phw list
|
||||
|
||||
# Output:
|
||||
# All PostHog Worktrees:
|
||||
#
|
||||
#
|
||||
# Branch Path Location
|
||||
# ------ ---- --------
|
||||
# haacked/improved-workflow /Users/username/dev/posthog/posthog other
|
||||
# haacked/analytics-dashboard /Users/username/.worktrees/posthog/haacked/... current
|
||||
# main /Users/username/.worktrees/posthog/main current
|
||||
# pr-5678-teammate /Users/username/.worktrees/posthog/pr-5678-... current
|
||||
#
|
||||
#
|
||||
# Legend:
|
||||
# current = in current worktree base (/Users/username/.worktrees/posthog)
|
||||
# other = in different location
|
||||
@@ -225,6 +225,7 @@ phw remove pr-5678-teammate
|
||||
## Quick Reference
|
||||
|
||||
### Commands
|
||||
|
||||
```bash
|
||||
phw create <branch> [base-branch] # Create new branch & worktree (defaults to master)
|
||||
phw checkout <branch> # Create worktree for existing branch
|
||||
@@ -253,7 +254,7 @@ phw list # List all worktrees
|
||||
### The Magic Flow
|
||||
|
||||
```text
|
||||
phw create branch → creates worktree → copies .envrc → cd to worktree →
|
||||
phw create branch → creates worktree → copies .envrc → cd to worktree →
|
||||
direnv detects .envrc → activates Flox → runs uv sync → ready to code!
|
||||
```
|
||||
|
||||
@@ -265,10 +266,11 @@ When you switch between worktrees while already in a Flox environment, you'll se
|
||||
⚠️ About to activate Flox environment in worktree while already in environment for:
|
||||
/Users/username/dev/posthog/posthog
|
||||
|
||||
Continue with nested activation? (y/N):
|
||||
Continue with nested activation? (y/N):
|
||||
```
|
||||
|
||||
**Your options:**
|
||||
|
||||
- **Press Enter or 'n'** (recommended): Skips activation. Run `exit` first to cleanly switch environments
|
||||
- **Type 'y'**: Proceeds with nested activation (you'll need multiple `exit` commands later)
|
||||
- **Ctrl+C**: Cancels direnv entirely so you can run `exit` and retry
|
||||
@@ -412,4 +414,4 @@ After setup, you're ready to use commands like:
|
||||
- `phw create haacked/feature` (create from master)
|
||||
- `phw create haacked/feature my-branch` (create from my-branch)
|
||||
- `phw checkout my-branch`
|
||||
- `phw pr 12345`
|
||||
- `phw pr 12345`
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
## How It Works
|
||||
|
||||
1 **Object Tagging**: Each S3 object gets tags:
|
||||
```
|
||||
ttl_days=1 # Calculated TTL in days
|
||||
team_id=123 # Team identifier
|
||||
```
|
||||
|
||||
```
|
||||
ttl_days=1 # Calculated TTL in days
|
||||
team_id=123 # Team identifier
|
||||
```
|
||||
|
||||
2 **Automatic Deletion**: S3 lifecycle rules delete objects matching tag criteria
|
||||
|
||||
## Required S3 Lifecycle Rules
|
||||
@@ -14,6 +16,7 @@
|
||||
**Critical**: You must create lifecycle rules for every `ttl_days` value your app generates.
|
||||
|
||||
### AWS CLI Configuration
|
||||
|
||||
```bash
|
||||
# Create rules for common TTL values: 1, 2, 7, 14, 30 days
|
||||
cat > lifecycle-config.json << EOF
|
||||
@@ -53,6 +56,7 @@ aws s3api put-bucket-lifecycle-configuration \
|
||||
```
|
||||
|
||||
### Terraform Configuration
|
||||
|
||||
```hcl
|
||||
resource "aws_s3_bucket_lifecycle_configuration" "query_cache" {
|
||||
bucket = aws_s3_bucket.query_cache.id
|
||||
@@ -75,4 +79,4 @@ resource "aws_s3_bucket_lifecycle_configuration" "query_cache" {
|
||||
}
|
||||
```
|
||||
|
||||
**Warning**: Objects with `ttl_days` values lacking lifecycle rules will never expire.
|
||||
**Warning**: Objects with `ttl_days` values lacking lifecycle rules will never expire.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { eventWithTime } from '@posthog/rrweb-types'
|
||||
import Ajv, { ErrorObject } from 'ajv'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { eventWithTime } from '@posthog/rrweb-types'
|
||||
|
||||
import { mobileEventWithTime } from './mobile.types'
|
||||
import mobileSchema from './schema/mobile/rr-mobile-schema.json'
|
||||
import webSchema from './schema/web/rr-web-schema.json'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// copied from rrweb-snapshot, not included in rrweb types
|
||||
import { customEvent, EventType, IncrementalSource, removedNodeMutation } from '@posthog/rrweb-types'
|
||||
import { EventType, IncrementalSource, customEvent, removedNodeMutation } from '@posthog/rrweb-types'
|
||||
|
||||
export enum NodeType {
|
||||
Document = 0,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import posthogEE from '@posthog/ee/exports'
|
||||
import { EventType } from '@posthog/rrweb-types'
|
||||
|
||||
import { ifEeDescribe } from 'lib/ee.test'
|
||||
|
||||
import { PostHogEE } from '../../../frontend/@posthog/ee/types'
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import {
|
||||
keyboardEvent,
|
||||
NodeType,
|
||||
keyboardEvent,
|
||||
serializedNodeWithId,
|
||||
wireframeNavigationBar,
|
||||
wireframeStatusBar,
|
||||
} from '../mobile.types'
|
||||
import { isLight } from './colors'
|
||||
import {
|
||||
_isPositiveInteger,
|
||||
BACKGROUND,
|
||||
KEYBOARD_ID,
|
||||
makePlaceholderElement,
|
||||
NAVIGATION_BAR_ID,
|
||||
STATUS_BAR_ID,
|
||||
_isPositiveInteger,
|
||||
makePlaceholderElement,
|
||||
} from './transformers'
|
||||
import { ConversionContext, ConversionResult } from './types'
|
||||
import { asStyleString, makeStylesString } from './wireframeStyle'
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import {
|
||||
EventType,
|
||||
IncrementalSource,
|
||||
addedNodeMutation,
|
||||
customEvent,
|
||||
EventType,
|
||||
fullSnapshotEvent,
|
||||
incrementalSnapshotEvent,
|
||||
IncrementalSource,
|
||||
metaEvent,
|
||||
mutationData,
|
||||
removedNodeMutation,
|
||||
} from '@posthog/rrweb-types'
|
||||
|
||||
import { isObject } from 'lib/utils'
|
||||
import posthog from 'posthog-js'
|
||||
import { PLACEHOLDER_SVG_DATA_IMAGE_URL } from 'scenes/session-recordings/player/rrweb'
|
||||
|
||||
import {
|
||||
attributes,
|
||||
documentNode,
|
||||
elementNode,
|
||||
fullSnapshotEvent as MobileFullSnapshotEvent,
|
||||
keyboardEvent,
|
||||
metaEvent as MobileMetaEvent,
|
||||
MobileIncrementalSnapshotEvent,
|
||||
metaEvent as MobileMetaEvent,
|
||||
MobileNodeMutation,
|
||||
MobileNodeType,
|
||||
NodeType,
|
||||
attributes,
|
||||
documentNode,
|
||||
elementNode,
|
||||
keyboardEvent,
|
||||
serializedNodeWithId,
|
||||
textNode,
|
||||
wireframe,
|
||||
|
||||
@@ -13,12 +13,13 @@ from ee.hogai.llm import MaxChatOpenAI
|
||||
llm = MaxChatOpenAI(user=user, team=team, model="gpt-4.1")
|
||||
|
||||
# ❌ Wrong - missing PostHog context
|
||||
llm = ChatOpenAI(model="gpt-4.1")
|
||||
llm = ChatOpenAI(model="gpt-4.1")
|
||||
```
|
||||
|
||||
`MaxChatOpenAI` automatically injects context into every prompt:
|
||||
|
||||
- Project name and timezone
|
||||
- Organization name
|
||||
- Organization name
|
||||
- User name and email
|
||||
- Current project datetime
|
||||
|
||||
@@ -64,7 +65,7 @@ PostHog uses Mustache templating for dynamic content:
|
||||
# Conditional sections
|
||||
"{{#show_advanced}}Advanced options: {{{options}}}{{/show_advanced}}"
|
||||
|
||||
# Lists/iterations
|
||||
# Lists/iterations
|
||||
"{{#events}}Event: {{{name}}}{{/events}}"
|
||||
```
|
||||
|
||||
@@ -76,7 +77,7 @@ PostHog uses Mustache templating for dynamic content:
|
||||
# ✅ Good - specific and actionable
|
||||
"""Generate a trends query that shows daily active users for the last 30 days, filtered to exclude internal users, displayed as a line chart."""
|
||||
|
||||
# ❌ Bad - vague and ambiguous
|
||||
# ❌ Bad - vague and ambiguous
|
||||
"""Create a user trend analysis."""
|
||||
```
|
||||
|
||||
@@ -107,7 +108,7 @@ Question: What's the signup to purchase conversion rate?
|
||||
Output:
|
||||
{"kind":"FunnelsQuery","series":[{"event":"user signed up"},{"event":"purchase"}]}
|
||||
|
||||
### Example 2: With filters and breakdown
|
||||
### Example 2: With filters and breakdown
|
||||
Question: Conversion rate by country for mobile users?
|
||||
Output:
|
||||
{"kind":"FunnelsQuery","series":[{"event":"user signed up","properties":[{"key":"$device_type","value":"Mobile"}]},{"event":"purchase"}],"breakdownFilter":{"breakdown":"$geoip_country_name"}}
|
||||
@@ -181,7 +182,7 @@ When you let an LLM call tools and use their results, you get an agent:
|
||||
TOOL_AGENT_PROMPT = """
|
||||
You have access to these tools:
|
||||
1. `search_events` - Find events matching patterns
|
||||
2. `get_property_values` - Get possible values for properties
|
||||
2. `get_property_values` - Get possible values for properties
|
||||
3. `final_answer` - Provide the final query plan
|
||||
|
||||
Before generating a query:
|
||||
|
||||
@@ -60,17 +60,17 @@ You'll need to set [env vars](https://posthog.slack.com/docs/TSS5W8YQZ/F08UU1LJF
|
||||
|
||||
4. Define tool metadata in `TOOL_DEFINITIONS` in `frontend/src/scenes/max/max-constants.tsx`:
|
||||
|
||||
```tsx
|
||||
export const TOOL_DEFINITIONS: ... = {
|
||||
// ... existing tools ...
|
||||
your_tool_name: {
|
||||
name: 'Do something',
|
||||
description: 'Do something to blah blah',
|
||||
product: Scene.YourProduct, // or null for the rare global tool
|
||||
flag: FEATURE_FLAGS.YOUR_FLAG, // optional indication that this is flagged
|
||||
},
|
||||
}
|
||||
```
|
||||
```tsx
|
||||
export const TOOL_DEFINITIONS: ... = {
|
||||
// ... existing tools ...
|
||||
your_tool_name: {
|
||||
name: 'Do something',
|
||||
description: 'Do something to blah blah',
|
||||
product: Scene.YourProduct, // or null for the rare global tool
|
||||
flag: FEATURE_FLAGS.YOUR_FLAG, // optional indication that this is flagged
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
For an example, see `products/replay/backend/max_tools.py`, which defines the `search_session_recordings` tool, and `products/data_warehouse/backend/max_tools.py`, which defines the `generate_hogql_query` tool.
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// NOTE: All exported items from the EE module _must_ be optionally defined to ensure we work well with FOSS
|
||||
|
||||
import { eventWithTime } from '@posthog/rrweb-types'
|
||||
|
||||
export type PostHogEE = {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
import { startDevServer, buildInParallel, printResponse } from '../../utils.mjs'
|
||||
import * as path from 'path'
|
||||
import url from 'url'
|
||||
|
||||
import { buildInParallel, printResponse, startDevServer } from '../../utils.mjs'
|
||||
|
||||
export const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
|
||||
const { name, peerDependencies } = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json')))
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// replaces ts-json-schema-generator -f tsconfig.json --path 'frontend/src/queries/schema.ts' --no-type-check > frontend/src/queries/schema.json
|
||||
|
||||
import fs from 'fs'
|
||||
import stableStringify from 'safe-stable-stringify'
|
||||
import tsj from 'ts-json-schema-generator'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Build frontend/src/products.tsx from manifest.tsx files
|
||||
|
||||
import * as ps from 'child_process'
|
||||
import fse from 'fs-extra'
|
||||
import path from 'path'
|
||||
@@ -74,10 +73,10 @@ export function buildProductManifests() {
|
||||
node.name.text === 'treeItemsNew'
|
||||
? treeItemsNew
|
||||
: node.name.text === 'treeItemsProducts'
|
||||
? treeItemsProducts
|
||||
: node.name.text === 'treeItemsMetadata'
|
||||
? treeItemsMetadata
|
||||
: treeItemsGames
|
||||
? treeItemsProducts
|
||||
: node.name.text === 'treeItemsMetadata'
|
||||
? treeItemsMetadata
|
||||
: treeItemsGames
|
||||
node.initializer.elements.forEach((el) => {
|
||||
if (!ts.isObjectLiteralExpression(el)) {
|
||||
return
|
||||
@@ -149,10 +148,10 @@ export function buildProductManifests() {
|
||||
kind === 'default'
|
||||
? spec
|
||||
: kind === 'namespace'
|
||||
? spec
|
||||
: spec.includes(' as ')
|
||||
? spec.split(' as ').pop()
|
||||
: spec
|
||||
? spec
|
||||
: spec.includes(' as ')
|
||||
? spec.split(' as ').pop()
|
||||
: spec
|
||||
if (globalNames.has(localName)) {
|
||||
return
|
||||
}
|
||||
@@ -257,7 +256,6 @@ export function buildProductManifests() {
|
||||
const autogen = '/** This const is auto-generated, as is the whole file */'
|
||||
const productsTsx = `
|
||||
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
|
||||
/* eslint simple-import-sort/imports: 0 */
|
||||
// Generated by build-products.mjs – DO NOT EDIT BY HAND.
|
||||
|
||||
${importLines}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
import * as path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import {
|
||||
buildInParallel,
|
||||
copyIndexHtml,
|
||||
@@ -7,8 +10,6 @@ import {
|
||||
isDev,
|
||||
startDevServer,
|
||||
} from '@posthog/esbuilder'
|
||||
import * as path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
export const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { isDev } from './utils.mjs'
|
||||
|
||||
export const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
export function writeSourceCodeEditorTypes() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Config } from 'jest'
|
||||
import fs from 'fs'
|
||||
import type { Config } from 'jest'
|
||||
|
||||
process.env.TZ = process.env.TZ || 'UTC'
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import 'whatwg-fetch'
|
||||
import 'jest-canvas-mock'
|
||||
|
||||
import { configure } from '@testing-library/react'
|
||||
import 'jest-canvas-mock'
|
||||
import { TextDecoder, TextEncoder } from 'util'
|
||||
import 'whatwg-fetch'
|
||||
|
||||
// Jest/JSDom don't know about TextEncoder but the browsers we support do
|
||||
// https://github.com/jsdom/jsdom/issues/2524
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import * as React from 'react'
|
||||
// whatever else you need in here
|
||||
|
||||
global.React = React
|
||||
|
||||
@@ -2,6 +2,7 @@ import './ExportedInsight.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
import { BindLogic, useMountedLogic } from 'kea'
|
||||
|
||||
import { TopHeading } from 'lib/components/Cards/InsightCard/TopHeading'
|
||||
import { InsightLegend } from 'lib/components/InsightLegend/InsightLegend'
|
||||
import {
|
||||
@@ -13,9 +14,9 @@ import { dataThemeLogic } from 'scenes/dataThemeLogic'
|
||||
import { insightLogic } from 'scenes/insights/insightLogic'
|
||||
import { InsightsTable } from 'scenes/insights/views/InsightsTable/InsightsTable'
|
||||
|
||||
import { SharingConfigurationSettings } from '~/queries/schema/schema-general'
|
||||
import { getQueryBasedInsightModel } from '~/queries/nodes/InsightViz/utils'
|
||||
import { Query } from '~/queries/Query/Query'
|
||||
import { getQueryBasedInsightModel } from '~/queries/nodes/InsightViz/utils'
|
||||
import { SharingConfigurationSettings } from '~/queries/schema/schema-general'
|
||||
import { isDataTableNode, isInsightVizNode, isTrendsQuery } from '~/queries/utils'
|
||||
import { Logo } from '~/toolbar/assets/Logo'
|
||||
import { ChartDisplayType, DataColorThemeModel, InsightLogicProps, InsightModel } from '~/types'
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import '~/styles'
|
||||
|
||||
import './Exporter.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
import { useValues } from 'kea'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { useResizeObserver } from 'lib/hooks/useResizeObserver'
|
||||
import { useThemedHtml } from 'lib/hooks/useThemedHtml'
|
||||
import { Link } from 'lib/lemon-ui/Link'
|
||||
import { useEffect } from 'react'
|
||||
import { Dashboard } from 'scenes/dashboard/Dashboard'
|
||||
import { SessionRecordingPlayer } from 'scenes/session-recordings/player/SessionRecordingPlayer'
|
||||
import { SessionRecordingPlayerMode } from 'scenes/session-recordings/player/sessionRecordingPlayerLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
import { ExportedInsight } from '~/exporter/ExportedInsight/ExportedInsight'
|
||||
import { ExportedData, ExportType } from '~/exporter/types'
|
||||
import { ExportType, ExportedData } from '~/exporter/types'
|
||||
import { getQueryBasedDashboard } from '~/queries/nodes/InsightViz/utils'
|
||||
import { Logo } from '~/toolbar/assets/Logo'
|
||||
import { DashboardPlacement } from '~/types'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import '~/styles'
|
||||
|
||||
import './Exporter.scss'
|
||||
|
||||
import { polyfillCountryFlagEmojis } from 'country-flag-emoji-polyfill'
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { DashboardType, DataColorThemeModel, InsightModel, SessionRecordingType } from '~/types'
|
||||
import { SharingConfigurationSettings } from '~/queries/schema/schema-general'
|
||||
import { SessionRecordingPlayerMode } from 'scenes/session-recordings/player/sessionRecordingPlayerLogic'
|
||||
|
||||
import { SharingConfigurationSettings } from '~/queries/schema/schema-general'
|
||||
import { DashboardType, DataColorThemeModel, InsightModel, SessionRecordingType } from '~/types'
|
||||
|
||||
export enum ExportType {
|
||||
Image = 'image',
|
||||
Embed = 'embed',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import './buffer-polyfill'
|
||||
import '~/styles'
|
||||
|
||||
import { polyfillCountryFlagEmojis } from 'country-flag-emoji-polyfill'
|
||||
@@ -6,8 +5,10 @@ import { getContext } from 'kea'
|
||||
import posthog from 'posthog-js'
|
||||
import { PostHogProvider } from 'posthog-js/react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
|
||||
import { App } from 'scenes/App'
|
||||
|
||||
import './buffer-polyfill'
|
||||
import { initKea } from './initKea'
|
||||
import { ErrorBoundary } from './layout/ErrorBoundary'
|
||||
import { loadPostHogJS } from './loadPostHogJS'
|
||||
|
||||
@@ -6,10 +6,11 @@ import { routerPlugin } from 'kea-router'
|
||||
import { subscriptionsPlugin } from 'kea-subscriptions'
|
||||
import { waitForPlugin } from 'kea-waitfor'
|
||||
import { windowValuesPlugin } from 'kea-window-values'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
|
||||
import { identifierToHuman } from 'lib/utils'
|
||||
import { addProjectIdIfMissing, removeProjectIdIfPresent } from 'lib/utils/router-utils'
|
||||
import posthog from 'posthog-js'
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,9 +2,10 @@ import './ErrorBoundary.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { supportLogic, SupportTicketExceptionEvent } from 'lib/components/Support/supportLogic'
|
||||
import { LemonButton } from 'lib/lemon-ui/LemonButton'
|
||||
import { PostHogErrorBoundary, type PostHogErrorBoundaryFallbackProps } from 'posthog-js/react'
|
||||
|
||||
import { SupportTicketExceptionEvent, supportLogic } from 'lib/components/Support/supportLogic'
|
||||
import { LemonButton } from 'lib/lemon-ui/LemonButton'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
interface ErrorBoundaryProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IconRefresh } from 'lib/lemon-ui/icons'
|
||||
import { LemonButton } from 'lib/lemon-ui/LemonButton'
|
||||
import { IconRefresh } from 'lib/lemon-ui/icons'
|
||||
|
||||
export function ErrorNetwork(): JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Meta } from '@storybook/react'
|
||||
import { useActions } from 'kea'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { App } from 'scenes/App'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { Link } from '@posthog/lemon-ui'
|
||||
import { useValues } from 'kea'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { Link } from '@posthog/lemon-ui'
|
||||
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
import { CreateOrganizationModal } from 'scenes/organization/CreateOrganizationModal'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import { organizationLogic } from '../scenes/organizationLogic'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
export function ErrorProjectUnavailable(): JSX.Element {
|
||||
const { projectCreationForbiddenReason } = useValues(organizationLogic)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Meta, StoryFn, StoryObj } from '@storybook/react'
|
||||
import { FeatureFlagKey } from 'lib/constants'
|
||||
import { EarlyAccessFeature } from 'posthog-js'
|
||||
|
||||
import { FeatureFlagKey } from 'lib/constants'
|
||||
|
||||
import { setFeatureFlags, useStorybookMocks } from '~/mocks/browser'
|
||||
|
||||
import { FeaturePreviews } from './FeaturePreviews'
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import { IconBell, IconCheck } from '@posthog/icons'
|
||||
import { LemonBanner, LemonButton, LemonSwitch, LemonTextArea, Link } from '@posthog/lemon-ui'
|
||||
import { useActions, useAsyncActions, useValues } from 'kea'
|
||||
import { IconLink } from 'lib/lemon-ui/icons'
|
||||
import { SpinnerOverlay } from 'lib/lemon-ui/Spinner'
|
||||
import { useLayoutEffect, useState } from 'react'
|
||||
|
||||
import { EnrichedEarlyAccessFeature, featurePreviewsLogic } from './featurePreviewsLogic'
|
||||
import { IconBell, IconCheck } from '@posthog/icons'
|
||||
import { LemonBanner, LemonButton, LemonSwitch, LemonTextArea, Link } from '@posthog/lemon-ui'
|
||||
|
||||
import { BasicCard } from 'lib/components/Cards/BasicCard'
|
||||
import { SpinnerOverlay } from 'lib/lemon-ui/Spinner'
|
||||
import { IconLink } from 'lib/lemon-ui/icons'
|
||||
import { Label } from 'lib/ui/Label/Label'
|
||||
|
||||
import { EnrichedEarlyAccessFeature, featurePreviewsLogic } from './featurePreviewsLogic'
|
||||
|
||||
// Feature previews can be linked to by using hash in the url
|
||||
// example external link: https://app.posthog.com/settings/user-feature-previews#llm-observability
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { expectLogic } from 'kea-test-utils'
|
||||
import { MOCK_DEFAULT_USER } from 'lib/api.mock'
|
||||
|
||||
import { expectLogic } from 'kea-test-utils'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import { useMocks } from '~/mocks/jest'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import { EarlyAccessFeature, posthog } from 'posthog-js'
|
||||
|
||||
import { supportLogic } from 'lib/components/Support/supportLogic'
|
||||
import { FeatureFlagKey } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { copyToClipboard } from 'lib/utils/copyToClipboard'
|
||||
import { EarlyAccessFeature, posthog } from 'posthog-js'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { actions, kea, path, reducers, useActions, useValues } from 'kea'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { ConfirmUpgradeModal } from 'lib/components/ConfirmUpgradeModal/ConfirmUpgradeModal'
|
||||
import { ItemSelectModal } from 'lib/components/FileSystem/ItemSelectModal/ItemSelectModal'
|
||||
import { MoveToModal } from 'lib/components/FileSystem/MoveTo/MoveTo'
|
||||
@@ -6,7 +8,6 @@ import { HedgehogBuddyWithLogic } from 'lib/components/HedgehogBuddy/HedgehogBud
|
||||
import { TimeSensitiveAuthenticationModal } from 'lib/components/TimeSensitiveAuthentication/TimeSensitiveAuthentication'
|
||||
import { GlobalCustomUnitModal } from 'lib/components/UnitPicker/GlobalCustomUnitModal'
|
||||
import { UpgradeModal } from 'lib/components/UpgradeModal/UpgradeModal'
|
||||
import { useEffect } from 'react'
|
||||
import { TwoFactorSetupModal } from 'scenes/authentication/TwoFactorSetupModal'
|
||||
import { PaymentEntryModal } from 'scenes/billing/PaymentEntryModal'
|
||||
import { CreateOrganizationModal } from 'scenes/organization/CreateOrganizationModal'
|
||||
@@ -15,8 +16,8 @@ import { CreateProjectModal } from 'scenes/project/CreateProjectModal'
|
||||
import { SessionPlayerModal } from 'scenes/session-recordings/player/modal/SessionPlayerModal'
|
||||
import { EnvironmentRollbackModal } from 'scenes/settings/environment/EnvironmentRollbackModal'
|
||||
import { environmentRollbackModalLogic } from 'scenes/settings/environment/environmentRollbackModalLogic'
|
||||
import { inviteLogic } from 'scenes/settings/organization/inviteLogic'
|
||||
import { InviteModal } from 'scenes/settings/organization/InviteModal'
|
||||
import { inviteLogic } from 'scenes/settings/organization/inviteLogic'
|
||||
import { PreviewingCustomCssModal } from 'scenes/themes/PreviewingCustomCssModal'
|
||||
|
||||
import type { globalModalsLogicType } from './GlobalModalsType'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import { App } from 'scenes/App'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
|
||||
@@ -1,26 +1,27 @@
|
||||
import './Navigation.scss'
|
||||
|
||||
import { useValues } from 'kea'
|
||||
import { ReactNode, useRef } from 'react'
|
||||
|
||||
import { BillingAlertsV2 } from 'lib/components/BillingAlertsV2'
|
||||
import { CommandBar } from 'lib/components/CommandBar/CommandBar'
|
||||
import { ReactNode, useRef } from 'react'
|
||||
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { cn } from 'lib/utils/css-classes'
|
||||
import { SceneConfig } from 'scenes/sceneTypes'
|
||||
|
||||
import { PanelLayout } from '~/layout/panel-layout/PanelLayout'
|
||||
|
||||
import { MaxFloatingInput } from '../../scenes/max/MaxFloatingInput'
|
||||
import { navigationLogic } from '../navigation/navigationLogic'
|
||||
import { ProjectNotice } from '../navigation/ProjectNotice'
|
||||
import { navigationLogic } from '../navigation/navigationLogic'
|
||||
import { SceneLayout } from '../scenes/SceneLayout'
|
||||
import { MinimalNavigation } from './components/MinimalNavigation'
|
||||
import { TopBar } from './components/TopBar'
|
||||
import { navigation3000Logic } from './navigationLogic'
|
||||
import { SidePanel } from './sidepanel/SidePanel'
|
||||
import { themeLogic } from './themeLogic'
|
||||
import { SceneLayout } from '../scenes/SceneLayout'
|
||||
import { cn } from 'lib/utils/css-classes'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
|
||||
|
||||
export function Navigation({
|
||||
children,
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { IconCheckCircle } from '@posthog/icons'
|
||||
import { LemonButton, LemonInput, LemonTag } from '@posthog/lemon-ui'
|
||||
import algoliasearch from 'algoliasearch/lite'
|
||||
import { useActions } from 'kea'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { InstantSearch, useHits, useRefinementList, useSearchBox } from 'react-instantsearch'
|
||||
import { AutoSizer } from 'react-virtualized/dist/es/AutoSizer'
|
||||
import { List } from 'react-virtualized/dist/es/List'
|
||||
|
||||
import { IconCheckCircle } from '@posthog/icons'
|
||||
import { LemonButton, LemonInput, LemonTag } from '@posthog/lemon-ui'
|
||||
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'
|
||||
import { SidePanelTab } from '~/types'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Meta, StoryFn } from '@storybook/react'
|
||||
|
||||
import { IconInfo } from '@posthog/icons'
|
||||
import { Tooltip } from '@posthog/lemon-ui'
|
||||
import { Meta, StoryFn } from '@storybook/react'
|
||||
|
||||
import { KeyboardShortcut } from './KeyboardShortcut'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import './KeyboardShortcut.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
|
||||
import { isMac, isMobile } from 'lib/utils'
|
||||
|
||||
import { HotKeyOrModifier } from '~/types'
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { IconLogomark } from '@posthog/icons'
|
||||
import { LemonButton, Popover, ProfilePicture } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import { navigationLogic } from '~/layout/navigation/navigationLogic'
|
||||
import { AccountPopoverOverlay } from '~/layout/navigation/TopBar/AccountPopover'
|
||||
import { navigationLogic } from '~/layout/navigation/navigationLogic'
|
||||
import { ProjectDropdownMenu } from '~/layout/panel-layout/ProjectDropdownMenu'
|
||||
|
||||
export function MinimalNavigation(): JSX.Element {
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
import './TopBar.scss'
|
||||
|
||||
import { IconChevronDown, IconFolderMove, IconFolderOpen, IconShortcut, IconX } from '@posthog/icons'
|
||||
import { LemonButton, LemonSkeleton, LemonTag } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import React, { useLayoutEffect, useState } from 'react'
|
||||
|
||||
import { IconChevronDown, IconFolderMove, IconFolderOpen, IconShortcut, IconX } from '@posthog/icons'
|
||||
import { LemonButton, LemonSkeleton, LemonTag } from '@posthog/lemon-ui'
|
||||
|
||||
import { EditableField } from 'lib/components/EditableField/EditableField'
|
||||
import { moveToLogic } from 'lib/components/FileSystem/MoveTo/moveToLogic'
|
||||
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
|
||||
import { MetalyticsSummary } from 'lib/components/Metalytics/MetalyticsSummary'
|
||||
import { TopBarSettingsButton } from 'lib/components/TopBarSettingsButton/TopBarSettingsButton'
|
||||
import { IconMenu, IconSlash } from 'lib/lemon-ui/icons'
|
||||
import { Link } from 'lib/lemon-ui/Link'
|
||||
import { Popover } from 'lib/lemon-ui/Popover/Popover'
|
||||
import React, { useLayoutEffect, useState } from 'react'
|
||||
import { IconMenu, IconSlash } from 'lib/lemon-ui/icons'
|
||||
|
||||
import { ErrorBoundary } from '~/layout/ErrorBoundary'
|
||||
import { breadcrumbsLogic } from '~/layout/navigation/Breadcrumbs/breadcrumbsLogic'
|
||||
import { navigationLogic } from '~/layout/navigation/navigationLogic'
|
||||
import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
|
||||
import { ProjectDropdownMenu } from '~/layout/panel-layout/ProjectDropdownMenu'
|
||||
import { PROJECT_TREE_KEY } from '~/layout/panel-layout/ProjectTree/ProjectTree'
|
||||
import { projectTreeDataLogic } from '~/layout/panel-layout/ProjectTree/projectTreeDataLogic'
|
||||
import { projectTreeLogic } from '~/layout/panel-layout/ProjectTree/projectTreeLogic'
|
||||
import { panelLayoutLogic } from '~/layout/panel-layout/panelLayoutLogic'
|
||||
import { Breadcrumb as IBreadcrumb } from '~/types'
|
||||
|
||||
/** Sync with --breadcrumbs-height-compact. */
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import { actions, connect, events, kea, listeners, path, props, reducers, selectors } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { subscriptions } from 'kea-subscriptions'
|
||||
import posthog from 'posthog-js'
|
||||
import React from 'react'
|
||||
|
||||
import {
|
||||
IconAI,
|
||||
IconChat,
|
||||
@@ -22,17 +28,13 @@ import {
|
||||
IconToggle,
|
||||
IconWarning,
|
||||
} from '@posthog/icons'
|
||||
import { lemonToast, Spinner } from '@posthog/lemon-ui'
|
||||
import { actions, connect, events, kea, listeners, path, props, reducers, selectors } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { subscriptions } from 'kea-subscriptions'
|
||||
import { Spinner, lemonToast } from '@posthog/lemon-ui'
|
||||
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { LemonMenuOverlay } from 'lib/lemon-ui/LemonMenu/LemonMenu'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { isNotNil } from 'lib/utils'
|
||||
import { getAppContext } from 'lib/utils/getAppContext'
|
||||
import posthog from 'posthog-js'
|
||||
import React from 'react'
|
||||
import { editorSceneLogic } from 'scenes/data-warehouse/editor/editorSceneLogic'
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
import { Scene } from 'scenes/sceneTypes'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Meta, StoryFn } from '@storybook/react'
|
||||
import { useActions } from 'kea'
|
||||
|
||||
import { supportLogic } from 'lib/components/Support/supportLogic'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
import { App } from 'scenes/App'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
@@ -9,7 +11,6 @@ import organizationCurrent from '~/mocks/fixtures/api/organizations/@current/@cu
|
||||
import { SidePanelTab } from '~/types'
|
||||
|
||||
import { sidePanelStateLogic } from './sidePanelStateLogic'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
const meta: Meta = {
|
||||
component: App,
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import './SidePanel.scss'
|
||||
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { IconEllipsis, IconFeatures, IconGear, IconInfo, IconLock, IconNotebook, IconSupport } from '@posthog/icons'
|
||||
import { LemonButton, LemonMenu, LemonMenuItems, LemonModal, ProfilePicture } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { Resizer } from 'lib/components/Resizer/Resizer'
|
||||
import { resizerLogic, ResizerLogicProps } from 'lib/components/Resizer/resizerLogic'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { ResizerLogicProps, resizerLogic } from 'lib/components/Resizer/resizerLogic'
|
||||
import { NotebookPanel } from 'scenes/notebooks/NotebookPanel/NotebookPanel'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
import { sceneLayoutLogic } from '~/layout/scenes/sceneLayoutLogic'
|
||||
|
||||
import { ErrorBoundary } from '~/layout/ErrorBoundary'
|
||||
import {
|
||||
@@ -17,20 +18,21 @@ import {
|
||||
SidePanelExportsIcon,
|
||||
} from '~/layout/navigation-3000/sidepanel/panels/exports/SidePanelExports'
|
||||
import { themeLogic } from '~/layout/navigation-3000/themeLogic'
|
||||
import { navigationLogic } from '~/layout/navigation/navigationLogic'
|
||||
import { sceneLayoutLogic } from '~/layout/scenes/sceneLayoutLogic'
|
||||
import { SidePanelTab } from '~/types'
|
||||
|
||||
import { navigationLogic } from '~/layout/navigation/navigationLogic'
|
||||
import { SidePanelAccessControl } from './panels/access_control/SidePanelAccessControl'
|
||||
import { SidePanelActivation, SidePanelActivationIcon } from './panels/activation/SidePanelActivation'
|
||||
import { SidePanelActivity, SidePanelActivityIcon } from './panels/activity/SidePanelActivity'
|
||||
import { SidePanelDiscussion, SidePanelDiscussionIcon } from './panels/discussion/SidePanelDiscussion'
|
||||
import { SidePanelDocs } from './panels/SidePanelDocs'
|
||||
import { SidePanelMax } from './panels/SidePanelMax'
|
||||
import { SidePanelSettings } from './panels/SidePanelSettings'
|
||||
import { SidePanelStatus, SidePanelStatusIcon } from './panels/SidePanelStatus'
|
||||
import { SidePanelSupport } from './panels/SidePanelSupport'
|
||||
import { SidePanelAccessControl } from './panels/access_control/SidePanelAccessControl'
|
||||
import { SidePanelActivation, SidePanelActivationIcon } from './panels/activation/SidePanelActivation'
|
||||
import { SidePanelActivity, SidePanelActivityIcon } from './panels/activity/SidePanelActivity'
|
||||
import { SidePanelDiscussion, SidePanelDiscussionIcon } from './panels/discussion/SidePanelDiscussion'
|
||||
import { sidePanelLogic } from './sidePanelLogic'
|
||||
import { sidePanelStateLogic, WithinSidePanelContext } from './sidePanelStateLogic'
|
||||
import { WithinSidePanelContext, sidePanelStateLogic } from './sidePanelStateLogic'
|
||||
|
||||
export const SIDE_PANEL_TABS: Record<
|
||||
SidePanelTab,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { IconX } from '@posthog/icons'
|
||||
import { LemonButton } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { IconX } from '@posthog/icons'
|
||||
import { LemonButton } from '@posthog/lemon-ui'
|
||||
|
||||
import { sidePanelStateLogic } from '../sidePanelStateLogic'
|
||||
|
||||
export type SidePanelPaneHeaderProps = {
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { IconExternal, IconHome } from '@posthog/icons'
|
||||
import { LemonButton, LemonSelect, LemonSkeleton } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { IconExternal, IconHome } from '@posthog/icons'
|
||||
import { LemonButton, LemonSelect, LemonSkeleton } from '@posthog/lemon-ui'
|
||||
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
import { themeLogic } from '../../themeLogic'
|
||||
import { SidePanelPaneHeader } from '../components/SidePanelPaneHeader'
|
||||
import { sidePanelDocsLogic } from './sidePanelDocsLogic'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
export function SidePanelDocsSkeleton(): JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { IconExternal } from '@posthog/icons'
|
||||
import { LemonButton } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { capitalizeFirstLetter } from 'lib/utils'
|
||||
import { useEffect } from 'react'
|
||||
import { Settings } from 'scenes/settings/Settings'
|
||||
import { settingsLogic } from 'scenes/settings/settingsLogic'
|
||||
import { SettingsLogicProps } from 'scenes/settings/types'
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { IconCloud, IconExternal } from '@posthog/icons'
|
||||
import { LemonButton, Tooltip } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { IconCloud, IconExternal } from '@posthog/icons'
|
||||
import { LemonButton, Tooltip } from '@posthog/lemon-ui'
|
||||
|
||||
import { IconWithBadge } from 'lib/lemon-ui/icons'
|
||||
import { capitalizeFirstLetter } from 'lib/utils'
|
||||
import { useState } from 'react'
|
||||
|
||||
import { SidePanelPaneHeader } from '../components/SidePanelPaneHeader'
|
||||
import { sidePanelLogic } from '../sidePanelLogic'
|
||||
import { SidePanelDocsSkeleton } from './SidePanelDocs'
|
||||
import { sidePanelStatusLogic, STATUS_PAGE_BASE } from './sidePanelStatusLogic'
|
||||
import { STATUS_PAGE_BASE, sidePanelStatusLogic } from './sidePanelStatusLogic'
|
||||
|
||||
export const SidePanelStatusIcon = (props: { className?: string }): JSX.Element => {
|
||||
const { status, statusPage } = useValues(sidePanelStatusLogic)
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import React from 'react'
|
||||
|
||||
import { IconFeatures, IconHelmet, IconMap } from '@posthog/icons'
|
||||
import { LemonButton, Link } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { SupportForm } from 'lib/components/Support/SupportForm'
|
||||
import { supportLogic } from 'lib/components/Support/supportLogic'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { dayjs } from 'lib/dayjs'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import React from 'react'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
|
||||
import { billingLogic } from 'scenes/billing/billingLogic'
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import clsx from 'clsx'
|
||||
import { BindLogic, useActions, useAsyncActions, useValues } from 'kea'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
import { IconTrash } from '@posthog/icons'
|
||||
import { IconWarning } from '@posthog/icons'
|
||||
import {
|
||||
LemonBanner,
|
||||
LemonButton,
|
||||
@@ -10,7 +15,7 @@ import {
|
||||
LemonTable,
|
||||
Tooltip,
|
||||
} from '@posthog/lemon-ui'
|
||||
import { BindLogic, useActions, useAsyncActions, useValues } from 'kea'
|
||||
|
||||
import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
|
||||
import { upgradeModalLogic } from 'lib/components/UpgradeModal/upgradeModalLogic'
|
||||
import { UserSelectItem } from 'lib/components/UserSelectItem'
|
||||
@@ -18,7 +23,6 @@ import { LemonTableColumns } from 'lib/lemon-ui/LemonTable'
|
||||
import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
|
||||
import { ProfileBubbles, ProfilePicture } from 'lib/lemon-ui/ProfilePicture'
|
||||
import { capitalizeFirstLetter, fullName } from 'lib/utils'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
@@ -33,9 +37,7 @@ import {
|
||||
RoleType,
|
||||
} from '~/types'
|
||||
|
||||
import { accessControlLogic, AccessControlLogicProps } from './accessControlLogic'
|
||||
import { IconWarning } from '@posthog/icons'
|
||||
import clsx from 'clsx'
|
||||
import { AccessControlLogicProps, accessControlLogic } from './accessControlLogic'
|
||||
|
||||
export function AccessControlObject(props: AccessControlLogicProps): JSX.Element | null {
|
||||
const { canEditAccessControls, humanReadableResource } = useValues(accessControlLogic(props))
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { useActions } from 'kea'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { IconOpenSidebar } from '@posthog/icons'
|
||||
import { LemonBanner, LemonButton } from '@posthog/lemon-ui'
|
||||
import { useActions } from 'kea'
|
||||
|
||||
import { resourceTypeToString } from 'lib/components/AccessControlAction'
|
||||
import { toSentenceCase } from 'lib/utils'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'
|
||||
import { AccessControlResourceType, SidePanelTab } from '~/types'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { capitalizeFirstLetter } from 'kea-forms'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
|
||||
import {
|
||||
LemonButton,
|
||||
LemonInputSelect,
|
||||
@@ -8,20 +12,18 @@ import {
|
||||
ProfileBubbles,
|
||||
ProfilePicture,
|
||||
} from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { capitalizeFirstLetter } from 'kea-forms'
|
||||
|
||||
import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
|
||||
import { UserSelectItem } from 'lib/components/UserSelectItem'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { fullName } from 'lib/utils'
|
||||
|
||||
import { AccessControlLevel, APIScopeObject, AvailableFeature, OrganizationMemberType, RoleType } from '~/types'
|
||||
import { APIScopeObject, AccessControlLevel, AvailableFeature, OrganizationMemberType, RoleType } from '~/types'
|
||||
|
||||
import {
|
||||
DefaultResourceAccessControls,
|
||||
MemberResourceAccessControls,
|
||||
resourcesAccessControlLogic,
|
||||
RoleResourceAccessControls,
|
||||
resourcesAccessControlLogic,
|
||||
} from './resourcesAccessControlLogic'
|
||||
|
||||
export function ResourcesAccessControls(): JSX.Element {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { Form } from 'kea-forms'
|
||||
import { useMemo, useState } from 'react'
|
||||
|
||||
import { IconPlus } from '@posthog/icons'
|
||||
import {
|
||||
LemonButton,
|
||||
@@ -10,13 +14,11 @@ import {
|
||||
ProfileBubbles,
|
||||
ProfilePicture,
|
||||
} from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { Form } from 'kea-forms'
|
||||
|
||||
import { usersLemonSelectOptions } from 'lib/components/UserSelectItem'
|
||||
import { LemonField } from 'lib/lemon-ui/LemonField'
|
||||
import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
|
||||
import { fullName } from 'lib/utils'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import { RoleType } from '~/types'
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import { LemonSelectOption } from '@posthog/lemon-ui'
|
||||
import { actions, afterMount, connect, kea, key, listeners, path, props, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import posthog from 'posthog-js'
|
||||
|
||||
import { LemonSelectOption } from '@posthog/lemon-ui'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { upgradeModalLogic } from 'lib/components/UpgradeModal/upgradeModalLogic'
|
||||
import { OrganizationMembershipLevel } from 'lib/constants'
|
||||
import { toSentenceCase } from 'lib/utils'
|
||||
import posthog from 'posthog-js'
|
||||
import { membersLogic } from 'scenes/organization/membersLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
import {
|
||||
APIScopeObject,
|
||||
AccessControlLevel,
|
||||
AccessControlResourceType,
|
||||
AccessControlResponseType,
|
||||
@@ -19,7 +22,6 @@ import {
|
||||
AccessControlTypeProject,
|
||||
AccessControlTypeRole,
|
||||
AccessControlUpdateType,
|
||||
APIScopeObject,
|
||||
OrganizationMemberType,
|
||||
RoleType,
|
||||
} from '~/types'
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import { actions, afterMount, connect, kea, listeners, path, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { OrganizationMembershipLevel } from 'lib/constants'
|
||||
import { membersLogic } from 'scenes/organization/membersLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
import {
|
||||
APIScopeObject,
|
||||
AccessControlLevel,
|
||||
AccessControlResourceType,
|
||||
AccessControlResponseType,
|
||||
AccessControlType,
|
||||
AccessControlLevel,
|
||||
AccessControlTypeRole,
|
||||
AccessControlUpdateType,
|
||||
APIScopeObject,
|
||||
OrganizationMemberType,
|
||||
RoleType,
|
||||
} from '~/types'
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
import { lemonToast } from '@posthog/lemon-ui'
|
||||
import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { forms } from 'kea-forms'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import { actionToUrl, router } from 'kea-router'
|
||||
|
||||
import { lemonToast } from '@posthog/lemon-ui'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { membersLogic } from 'scenes/organization/membersLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import {
|
||||
APIScopeObject,
|
||||
AccessControlResponseType,
|
||||
AccessControlTypeRole,
|
||||
APIScopeObject,
|
||||
OrganizationMemberType,
|
||||
RoleType,
|
||||
} from '~/types'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import React from 'react'
|
||||
|
||||
import { Link } from 'lib/lemon-ui/Link'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
import { ActivationTask } from './activationLogic'
|
||||
|
||||
export const IngestFirstEventContent = (): JSX.Element => (
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import { IconCheckCircle, IconChevronRight, IconCollapse, IconExpand, IconLock, IconPlus } from '@posthog/icons'
|
||||
import { LemonButton, Tooltip } from '@posthog/lemon-ui'
|
||||
import clsx from 'clsx'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { ProfessorHog } from 'lib/components/hedgehogs'
|
||||
import type { LemonIconProps } from 'lib/lemon-ui/icons'
|
||||
import { LemonProgress } from 'lib/lemon-ui/LemonProgress'
|
||||
import { LemonProgressCircle } from 'lib/lemon-ui/LemonProgressCircle'
|
||||
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
|
||||
import React from 'react'
|
||||
|
||||
import { IconCheckCircle, IconChevronRight, IconCollapse, IconExpand, IconLock, IconPlus } from '@posthog/icons'
|
||||
import { LemonButton, Tooltip } from '@posthog/lemon-ui'
|
||||
|
||||
import { ProfessorHog } from 'lib/components/hedgehogs'
|
||||
import { LemonProgress } from 'lib/lemon-ui/LemonProgress'
|
||||
import { LemonProgressCircle } from 'lib/lemon-ui/LemonProgressCircle'
|
||||
import type { LemonIconProps } from 'lib/lemon-ui/icons'
|
||||
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
|
||||
|
||||
import {
|
||||
activationLogic,
|
||||
type ActivationSection,
|
||||
ActivationTaskType,
|
||||
activationLogic,
|
||||
} from '~/layout/navigation-3000/sidepanel/panels/activation/activationLogic'
|
||||
|
||||
import { SidePanelPaneHeader } from '../../components/SidePanelPaneHeader'
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { expectLogic } from 'kea-test-utils'
|
||||
|
||||
import { membersLogic } from 'scenes/organization/membersLogic'
|
||||
import { inviteLogic } from 'scenes/settings/organization/inviteLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
import { initKeaTests } from '~/test/init'
|
||||
|
||||
import { activationLogic, ActivationTask } from './activationLogic'
|
||||
import { ActivationTask, activationLogic } from './activationLogic'
|
||||
|
||||
describe('activationLogic', () => {
|
||||
let logic: ReturnType<typeof activationLogic.build>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import { router } from 'kea-router'
|
||||
import posthog from 'posthog-js'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
import {
|
||||
IconDatabase,
|
||||
IconFeatures,
|
||||
@@ -8,17 +14,13 @@ import {
|
||||
IconTestTube,
|
||||
IconToggle,
|
||||
} from '@posthog/icons'
|
||||
import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import { router } from 'kea-router'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { reverseProxyCheckerLogic } from 'lib/components/ReverseProxyChecker/reverseProxyCheckerLogic'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { permanentlyMount } from 'lib/utils/kea-logic-builders'
|
||||
import { ProductIntentContext } from 'lib/utils/product-intents'
|
||||
import posthog from 'posthog-js'
|
||||
import type { ReactNode } from 'react'
|
||||
import { availableOnboardingProducts } from 'scenes/onboarding/utils'
|
||||
import { membersLogic } from 'scenes/organization/membersLogic'
|
||||
import { inviteLogic } from 'scenes/settings/organization/inviteLogic'
|
||||
@@ -29,11 +31,11 @@ import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePane
|
||||
import {
|
||||
ActivationTaskStatus,
|
||||
EventDefinitionType,
|
||||
OnboardingStepKey,
|
||||
PipelineStage,
|
||||
ProductKey,
|
||||
ReplayTabs,
|
||||
TeamBasicType,
|
||||
OnboardingStepKey,
|
||||
type TeamPublicType,
|
||||
type TeamType,
|
||||
} from '~/types'
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useRef } from 'react'
|
||||
|
||||
import { IconNotification } from '@posthog/icons'
|
||||
import { LemonButton, LemonSelect, LemonSelectOption, LemonSkeleton, LemonTabs, Spinner } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { ActivityLogRow } from 'lib/components/ActivityLog/ActivityLog'
|
||||
import { humanizeScope } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { MemberSelect } from 'lib/components/MemberSelect'
|
||||
import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
|
||||
import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShadows'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
import { usePageVisibilityCb } from 'lib/hooks/usePageVisibility'
|
||||
import { IconWithCount } from 'lib/lemon-ui/icons'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { useRef } from 'react'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import {
|
||||
sidePanelActivityLogic,
|
||||
SidePanelActivityTab,
|
||||
sidePanelActivityLogic,
|
||||
} from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic'
|
||||
import { sidePanelNotificationsLogic } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic'
|
||||
import { ActivityScope, AvailableFeature } from '~/types'
|
||||
|
||||
import { SidePanelPaneHeader } from '../../components/SidePanelPaneHeader'
|
||||
import { SidePanelActivityMetalytics } from './SidePanelActivityMetalytics'
|
||||
import { SidePanelActivitySubscriptions } from './SidePanelActivitySubscriptions'
|
||||
import { sidePanelNotificationsLogic } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic'
|
||||
import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'
|
||||
|
||||
const SCROLL_TRIGGER_OFFSET = 100
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Spinner, Tooltip } from '@posthog/lemon-ui'
|
||||
import { useValues } from 'kea'
|
||||
|
||||
import { Spinner, Tooltip } from '@posthog/lemon-ui'
|
||||
|
||||
import { humanizeScope } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { metalyticsLogic } from 'lib/components/Metalytics/metalyticsLogic'
|
||||
import { ProfileBubbles } from 'lib/lemon-ui/ProfilePicture/ProfileBubbles'
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
import { actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { lazyLoaders } from 'kea-loaders'
|
||||
import { subscriptions } from 'kea-subscriptions'
|
||||
|
||||
import api, { PaginatedResponse } from 'lib/api'
|
||||
import { describerFor, activityLogTransforms } from 'lib/components/ActivityLog/activityLogLogic'
|
||||
import { ActivityLogItem, humanize, HumanizedActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { activityLogTransforms, describerFor } from 'lib/components/ActivityLog/activityLogLogic'
|
||||
import { ActivityLogItem, HumanizedActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { projectLogic } from 'scenes/projectLogic'
|
||||
|
||||
import { ActivityScope, UserBasicType } from '~/types'
|
||||
|
||||
import { sidePanelStateLogic } from '../../sidePanelStateLogic'
|
||||
import { SidePanelSceneContext } from '../../types'
|
||||
import { sidePanelContextLogic } from '../sidePanelContextLogic'
|
||||
import type { sidePanelActivityLogicType } from './sidePanelActivityLogicType'
|
||||
|
||||
// ActivityScope values that should not appear in dropdowns
|
||||
const HIDDEN_ACTIVITY_SCOPES: ActivityScope[] = [
|
||||
ActivityScope.TAGGED_ITEM, // Handled under ActivityScope.TAG
|
||||
@@ -19,11 +25,6 @@ const getVisibleActivityScopes = (): ActivityScope[] => {
|
||||
return Object.values(ActivityScope).filter((scope) => !HIDDEN_ACTIVITY_SCOPES.includes(scope))
|
||||
}
|
||||
|
||||
import { sidePanelStateLogic } from '../../sidePanelStateLogic'
|
||||
import { SidePanelSceneContext } from '../../types'
|
||||
import { sidePanelContextLogic } from '../sidePanelContextLogic'
|
||||
import type { sidePanelActivityLogicType } from './sidePanelActivityLogicType'
|
||||
|
||||
export type ActivityFilters = {
|
||||
scope?: ActivityScope | string
|
||||
item_id?: ActivityLogItem['item_id']
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
import { actions, beforeUnmount, connect, kea, listeners, reducers, selectors, path } from 'kea'
|
||||
import { actions, beforeUnmount, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
import { lazyLoaders } from 'kea-loaders'
|
||||
import posthog, { JsonRecord } from 'posthog-js'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { describerFor } from 'lib/components/ActivityLog/activityLogLogic'
|
||||
import { humanize, HumanizedActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { HumanizedActivityLogItem, humanize } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { dayjs } from 'lib/dayjs'
|
||||
import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'
|
||||
import { toParams } from 'lib/utils'
|
||||
import posthog, { JsonRecord } from 'posthog-js'
|
||||
import { projectLogic } from 'scenes/projectLogic'
|
||||
|
||||
import { ChangesResponse } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic'
|
||||
|
||||
import { sidePanelStateLogic } from '../../sidePanelStateLogic'
|
||||
import { sidePanelContextLogic } from '../sidePanelContextLogic'
|
||||
import { ChangesResponse } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic'
|
||||
|
||||
import type { sidePanelNotificationsLogicType } from './sidePanelNotificationsLogicType'
|
||||
|
||||
const POLL_TIMEOUT = 5 * 60 * 1000
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { IconChat } from '@posthog/icons'
|
||||
import { LemonTag, Tooltip } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { humanizeScope } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
import { WarningHog } from 'lib/components/hedgehogs'
|
||||
import { IconWithCount } from 'lib/lemon-ui/icons'
|
||||
import { useEffect } from 'react'
|
||||
import { CommentComposer } from 'scenes/comments/CommentComposer'
|
||||
import { CommentsList } from 'scenes/comments/CommentsList'
|
||||
import { commentsLogic, CommentsLogicProps } from 'scenes/comments/commentsLogic'
|
||||
import { CommentsLogicProps, commentsLogic } from 'scenes/comments/commentsLogic'
|
||||
|
||||
import { SidePanelPaneHeader } from '../../components/SidePanelPaneHeader'
|
||||
import { sidePanelStateLogic } from '../../sidePanelStateLogic'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { actions, connect, kea, path, selectors } from 'kea'
|
||||
import { loaders } from 'kea-loaders'
|
||||
import { subscriptions } from 'kea-subscriptions'
|
||||
|
||||
import api from 'lib/api'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { IconDownload, IconPencil, IconWarning } from '@posthog/icons'
|
||||
import { LemonButton, lemonToast, Spinner } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
|
||||
import { IconDownload, IconPencil, IconWarning } from '@posthog/icons'
|
||||
import { LemonButton, Spinner, lemonToast } from '@posthog/lemon-ui'
|
||||
|
||||
import { downloadExportedAsset, exportedAssetBlob } from 'lib/components/ExportButton/exporter'
|
||||
import { ScreenShotEditor } from 'lib/components/TakeScreenshot/ScreenShotEditor'
|
||||
import { takeScreenshotLogic } from 'lib/components/TakeScreenshot/takeScreenshotLogic'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { afterMount, connect, kea, path } from 'kea'
|
||||
|
||||
import { exportsLogic } from 'lib/components/ExportButton/exportsLogic'
|
||||
|
||||
import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { connect, kea, path, selectors } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { objectsEqual } from 'kea-test-utils'
|
||||
|
||||
import { removeProjectIdIfPresent } from 'lib/utils/router-utils'
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
import { SceneConfig } from 'scenes/sceneTypes'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { actions, afterMount, beforeUnmount, connect, kea, listeners, path, props, reducers, selectors } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { RefObject } from 'react'
|
||||
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
|
||||
import { sidePanelStateLogic } from '../sidePanelStateLogic'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { offset } from '@floating-ui/react'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { forwardRef, memo, useEffect, useRef, useState } from 'react'
|
||||
|
||||
import { supportLogic } from 'lib/components/Support/supportLogic'
|
||||
import { LemonButton } from 'lib/lemon-ui/LemonButton'
|
||||
import { LemonCollapse } from 'lib/lemon-ui/LemonCollapse'
|
||||
@@ -7,7 +9,6 @@ import { LemonDivider } from 'lib/lemon-ui/LemonDivider'
|
||||
import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'
|
||||
import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'
|
||||
import { Spinner } from 'lib/lemon-ui/Spinner'
|
||||
import { forwardRef, memo, useEffect, useRef, useState } from 'react'
|
||||
import { maxGlobalLogic } from 'scenes/max/maxGlobalLogic'
|
||||
import { AIConsentPopoverWrapper } from 'scenes/settings/organization/AIConsentPopoverWrapper'
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { actions, connect, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { SettingsLogicProps } from 'scenes/settings/types'
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import { connect, kea, path, selectors } from 'kea'
|
||||
import { combineUrl, router, urlToAction } from 'kea-router'
|
||||
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { dayjs } from 'lib/dayjs'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
|
||||
import { activationLogic } from '~/layout/navigation-3000/sidepanel/panels/activation/activationLogic'
|
||||
import { sidePanelNotificationsLogic } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic'
|
||||
import { AvailableFeature, SidePanelTab } from '~/types'
|
||||
|
||||
import { combineUrl, router, urlToAction } from 'kea-router'
|
||||
import { urls } from 'scenes/urls'
|
||||
import { sidePanelContextLogic } from './panels/sidePanelContextLogic'
|
||||
import { sidePanelStatusLogic } from './panels/sidePanelStatusLogic'
|
||||
import type { sidePanelLogicType } from './sidePanelLogicType'
|
||||
import { sidePanelStateLogic } from './sidePanelStateLogic'
|
||||
import { sidePanelNotificationsLogic } from '~/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic'
|
||||
|
||||
const ALWAYS_EXTRA_TABS = [SidePanelTab.Settings, SidePanelTab.Activity, SidePanelTab.Status, SidePanelTab.Exports]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'
|
||||
|
||||
import { ActivityScope, APIScopeObject, CommentType } from '~/types'
|
||||
import { APIScopeObject, ActivityScope, CommentType } from '~/types'
|
||||
|
||||
/** Allows scenes to set a context which enables richer features of the side panel */
|
||||
export type SidePanelSceneContext = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'
|
||||
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { LemonTagType, SideAction } from '@posthog/lemon-ui'
|
||||
import { Logic, LogicWrapper } from 'kea'
|
||||
import React from 'react'
|
||||
|
||||
import { LemonTagType, SideAction } from '@posthog/lemon-ui'
|
||||
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { Dayjs } from 'lib/dayjs'
|
||||
import { LemonMenuItems } from 'lib/lemon-ui/LemonMenu'
|
||||
import React from 'react'
|
||||
|
||||
export interface SidebarLogic extends Logic {
|
||||
actions: Record<never, never> // No actions required in the base version
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { LemonTag } from 'lib/lemon-ui/LemonTag/LemonTag'
|
||||
import { membershipLevelToName } from 'lib/utils/permissioning'
|
||||
|
||||
import { OrganizationBasicType } from '~/types'
|
||||
|
||||
export function AccessLevelIndicator({ organization }: { organization: OrganizationBasicType }): JSX.Element {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { router } from 'kea-router'
|
||||
import { expectLogic } from 'kea-test-utils'
|
||||
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
import { Scene } from 'scenes/sceneTypes'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { actions, connect, kea, listeners, path, props, reducers, selectors } from 'kea'
|
||||
import { subscriptions } from 'kea-subscriptions'
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
|
||||
import { FEATURE_FLAGS } from 'lib/constants'
|
||||
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
|
||||
import { identifierToHuman, objectsEqual, stripHTTP } from 'lib/utils'
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { projectLogic } from 'scenes/projectLogic'
|
||||
import { sceneLogic } from 'scenes/sceneLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
import { IconCheck, IconCornerDownRight, IconGear, IconPlusSmall, IconWarning } from '@posthog/icons'
|
||||
import { LemonTag, Link, Spinner } from '@posthog/lemon-ui'
|
||||
import { useActions, useValues } from 'kea'
|
||||
import { router } from 'kea-router'
|
||||
import { useMemo, useState } from 'react'
|
||||
|
||||
import { IconCheck, IconCornerDownRight, IconGear, IconPlusSmall, IconWarning } from '@posthog/icons'
|
||||
import { LemonTag, Link, Spinner } from '@posthog/lemon-ui'
|
||||
|
||||
import { upgradeModalLogic } from 'lib/components/UpgradeModal/upgradeModalLogic'
|
||||
import { UploadedLogo } from 'lib/lemon-ui/UploadedLogo'
|
||||
import { getProjectSwitchTargetUrl } from 'lib/utils/router-utils'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { environmentRollbackModalLogic } from 'scenes/settings/environment/environmentRollbackModalLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
import { AvailableFeature, TeamPublicType } from '~/types'
|
||||
|
||||
import { IconBlank } from 'lib/lemon-ui/icons'
|
||||
import { ButtonGroupPrimitive, ButtonPrimitive, ButtonPrimitiveProps } from 'lib/ui/Button/ButtonPrimitives'
|
||||
import { Combobox } from 'lib/ui/Combobox/Combobox'
|
||||
@@ -24,8 +18,16 @@ import {
|
||||
PopoverPrimitiveTrigger,
|
||||
} from 'lib/ui/PopoverPrimitive/PopoverPrimitive'
|
||||
import { cn } from 'lib/utils/css-classes'
|
||||
import { getProjectSwitchTargetUrl } from 'lib/utils/router-utils'
|
||||
import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { environmentRollbackModalLogic } from 'scenes/settings/environment/environmentRollbackModalLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
import { AvailableFeature, TeamPublicType } from '~/types'
|
||||
|
||||
import { globalModalsLogic } from '../GlobalModals'
|
||||
import { environmentSwitcherLogic, TeamBasicTypeWithProjectName } from './environmentsSwitcherLogic'
|
||||
import { TeamBasicTypeWithProjectName, environmentSwitcherLogic } from './environmentsSwitcherLogic'
|
||||
|
||||
/**
|
||||
* Regex matching a possible emoji (any emoji) at the beginning of the string.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user