Skip to content

chore(experiments): product folder migration select existing feature flag modal - #92593

Merged
trunk-io[bot] merged 3 commits into
masterfrom
experiments/product-folder-migration-select-existing-feature-flag-modal
Sep 3, 2026
Merged

trunk-io[bot] merged 3 commits into
masterfrom
experiments/product-folder-migration-select-existing-feature-flag-modal

Conversation

@rodrigoi

@rodrigoi rodrigoi commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

Problem

The select existing feature flag modal still lives under frontend/src/scenes/experiments. It belongs in the experiments product folder.

Changes

Mechanical move of the select existing feature flag modal to products/experiments/frontend/modals. Its logic and test move with it. All importers now use products/ or scenes/ aliases, no ../. No behavior change.

How did you test this code?

pnpm --filter=@posthog/frontend jest products/experiments/frontend/modals frontend/src/scenes/experiments

cat-type-small

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Model: Opus 4.8 (1M context)
Manually refactored: no

Skills used:

  • /stacking-prs (local)
  • /writing-ui-components (local)
  • /writing-pull-requests (local)

Relevant decisions:

  • One modal per stacked PR, so each review stays small and mechanical.
  • Each modal lands in its own products/experiments/frontend/modals/<Name>/ folder with colocated logic and test.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

⚠️ Complexity (TypeScript) — 2 functions above the limit (max 14)

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

Function Location Complexity Limit
<anonymous> frontend/src/scenes/experiments/ExperimentWizard/experimentWizardLogic.ts:326 14 10
AboutStep frontend/src/scenes/experiments/ExperimentWizard/steps/AboutStep.tsx:20 13 10
✅ Bundle size — no change

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 68.30 MiB · no change

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

✅ Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.45 MiB · 22 files no change ███░░░░░░░ 32.2% of 4.51 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.88 MiB · 3,265 files no change █████████░ 91.4% of 9.71 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
762 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
307.0 KiB ../node_modules/.pnpm/posthog-js@1.422.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
263.5 KiB ../node_modules/.pnpm/posthog-js@1.422.5_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.js
258.4 KiB src/taxonomy/core-filter-definitions-by-group.json
154.2 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
104.7 KiB src/lib/api.ts
95.2 KiB ../packages/quill/packages/quill/dist/index.js
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.27 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.27 MiB · 18 files no change ████░░░░░░ 39.6% of 5.72 MiB
Deferred (lazy) 2.12 MiB · 45 files no change n/a — loads on demand
Loader dist/toolbar.js 1.1 KiB no change █░░░░░░░░░ 5.8% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
753.9 KiB dist/toolbar/toolbar-app-HGNNRM2X.css
590.5 KiB dist/toolbar/chunk-chunk-73WGE5HZ.js
484.7 KiB dist/toolbar/chunk-chunk-X6CDAHJV.js
135.6 KiB dist/toolbar/chunk-chunk-JYOA3KXW.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
71.3 KiB dist/toolbar/toolbar-app-JJ2QFXS6.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-2WYPTABE.js
21.0 KiB dist/toolbar/chunk-chunk-MRNDI7EB.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +474 B (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1457.06 MiB · 🔺 +474 B (+0.0%)

ℹ️ MCP UI apps size — 33 app(s), 17662.9 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 600.0 KB 195.2 KB
action 458.2 KB 195.2 KB
action-list 564.9 KB 195.2 KB
cohort 457.2 KB 195.2 KB
cohort-list 563.8 KB 195.2 KB
email-template 457.0 KB 195.2 KB
error-details 472.9 KB 195.2 KB
error-issue 457.9 KB 195.2 KB
error-issue-list 564.7 KB 195.2 KB
experiment 562.0 KB 195.2 KB
experiment-list 565.6 KB 195.2 KB
experiment-results 567.1 KB 195.2 KB
feature-flag 567.6 KB 195.2 KB
feature-flag-list 571.4 KB 195.2 KB
feature-flag-testing 461.4 KB 195.2 KB
inline-scan 457.7 KB 195.2 KB
insight-actors 563.0 KB 195.2 KB
invite-email-preview 456.4 KB 195.2 KB
llm-costs 560.0 KB 195.2 KB
session-recording 459.0 KB 195.2 KB
survey 458.8 KB 195.2 KB
survey-global-stats 562.7 KB 195.2 KB
survey-list 565.5 KB 195.2 KB
survey-stats 562.7 KB 195.2 KB
trace-span 457.6 KB 195.2 KB
trace-span-list 564.7 KB 195.2 KB
vision-observation-list 563.9 KB 195.2 KB
workflow 457.5 KB 195.2 KB
workflow-list 564.2 KB 195.2 KB
loops-review 461.9 KB 195.2 KB
query-results 755.2 KB 195.2 KB
render-ui 838.3 KB 195.2 KB
visual-review-snapshots 462.0 KB 195.2 KB
✅ Playwright — all passed

All tests passed.

View test results →

⚠️ Django migration SQL — 6 new migrations to review

We've detected new migrations on this PR. Review the SQL output for each migration:

posthog/migrations/1332_uploaded_media_library.py

BEGIN;
--
-- Add field pending to uploadedmedia
--
ALTER TABLE "posthog_uploadedmedia" ADD COLUMN "pending" boolean DEFAULT false NOT NULL;
ALTER TABLE "posthog_uploadedmedia" ALTER COLUMN "pending" DROP DEFAULT;
--
-- Add field purpose to uploadedmedia
--
ALTER TABLE "posthog_uploadedmedia" ADD COLUMN "purpose" varchar(100) NULL;
--
-- Add field size_bytes to uploadedmedia
--
ALTER TABLE "posthog_uploadedmedia" ADD COLUMN "size_bytes" integer NULL;
COMMIT;

posthog/migrations/1333_uploaded_media_library_index.py

--
-- Concurrently create index uploadedmedia_lib_by_created on field(s) team, purpose, -created_at of model uploadedmedia
--
SET lock_timeout = 0;
SET statement_timeout = 0;

products/dashboards/backend/migrations/0016_dashboardsavedview.py

BEGIN;
--
-- Create model DashboardSavedView
--
CREATE TABLE "posthog_dashboard_saved_view" ("id" uuid NOT NULL PRIMARY KEY, "name" varchar(200) NOT NULL, "filters" jsonb NOT NULL, "scope" varchar(20) DEFAULT 'private' NOT NULL, "created_at" timestamp with time zone NOT NULL, "updated_at" timestamp with time zone NULL, "created_by_id" integer NULL, "team_id" integer NOT NULL);
CREATE INDEX "posthog_dashboard_saved_view_created_by_id_9f27c606" ON "posthog_dashboard_saved_view" ("created_by_id");
CREATE INDEX "posthog_dashboard_saved_view_team_id_623ecba9" ON "posthog_dashboard_saved_view" ("team_id");
CREATE INDEX "dash_saved_view_team_idx" ON "posthog_dashboard_saved_view" ("team_id", "id") WHERE "scope" = 'team';
CREATE INDEX "dash_saved_view_private_idx" ON "posthog_dashboard_saved_view" ("team_id", "created_by_id", "id") WHERE "scope" = 'private';
COMMIT;

products/feature_flags/backend/migrations/0014_clean_flag_filters_inert_violations.py

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

products/signals/backend/migrations/0109_signal_scout_suggestion_set.py

BEGIN;
--
-- Create model SignalScoutSuggestionSet
--
CREATE TABLE "signals_signalscoutsuggestionset" ("id" uuid NOT NULL PRIMARY KEY, "items" jsonb NOT NULL, "status" varchar(16) DEFAULT 'empty' NOT NULL, "generated_at" timestamp with time zone NULL, "task_run_id" uuid NULL, "model" varchar(200) DEFAULT '' NOT NULL, "fleet_snapshot" jsonb NOT NULL, "last_requested_at" timestamp with time zone NULL, "last_completed_at" timestamp with time zone NULL, "consecutive_failures" integer DEFAULT 0 NOT NULL CHECK ("consecutive_failures" >= 0), "created_at" timestamp with time zone NOT NULL, "updated_at" timestamp with time zone NOT NULL, "team_id" integer NOT NULL UNIQUE);
COMMIT;

products/warehouse_sources/backend/migrations/0158_migrate_shopify_job_inputs_to_auth_method.py

BEGIN;
--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL
COMMIT;

Last updated: 2026-09-01 20:57 UTC (acd1ef8)

ℹ️ Docs preview — preview build triggered

Docs from this PR will be published at posthog.com.

Project Preview Updated (UTC)
posthog.com Open preview Sep 1, 2026, 8:53 PM

The preview should be ready in about 10 minutes. Open the preview at /handbook/engineering/.

@rodrigoi rodrigoi changed the title experiments/product folder migration select existing feature flag modal chore(experiments): product folder migration select existing feature flag modal Sep 1, 2026
@rodrigoi rodrigoi added skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com labels Sep 1, 2026
@trunk-io

trunk-io Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from 1354960 to 1eae903 Compare September 1, 2026 16:00
@rodrigoi
rodrigoi marked this pull request as ready for review September 1, 2026 20:19
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ❌ build failed

The preview didn't come up for commit 19df69d. See the build log for the failing step. It'll retry on the next push.

Previews are optional and never block merging. A failure here is often a hogland or tailnet hiccup rather than anything in your PR, so the check stays green and this comment is the status.

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team September 1, 2026 20:20
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
pnpm-lock.yaml:22542-22543
**Unrelated lockfile dependency drift**

This mechanical migration also upgrades `unlayer-types` and changes Jest peer resolutions for unrelated workspaces, broadening the regression and review surface without corresponding manifest changes. Please regenerate or edit the lockfile so it contains only resolutions required by the Testing Library additions.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore(experiments): add testing-library ..." | Re-trigger Greptile

Comment thread pnpm-lock.yaml Resolved
@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from 97a19e0 to acd1ef8 Compare September 1, 2026 20:53
@rodrigoi
rodrigoi requested review from a team as code owners September 1, 2026 20:53
@posthog-security-review-bot posthog-security-review-bot Bot added the security-review Request a security review label Sep 1, 2026
@posthog-security-review-bot

Copy link
Copy Markdown

⏭️ Security review skipped — this PR is too large — acd1ef82956d

899 files, 39976 lines and 87 commits exceeds the review limit (100 files or 10,000 lines, combined with more than 20 commits).

A pull request this size is usually the result of a bad merge or rebase rather than a change this large. This PR has not been reviewed — treat it as unreviewed, not as clean.

If the size is genuine and you want a review, split it, or ask #team-security to run one by hand.

Add the security-review label after rebasing to try again.

@posthog-security-review-bot posthog-security-review-bot Bot removed the security-review Request a security review label Sep 1, 2026
@github-actions

This comment was marked as resolved.

Comment thread livestream/events/path_cleaner.go Resolved
Comment thread posthog/api/uploaded_media.py Resolved
@veria-ai

veria-ai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 2 · PR risk: 0/10

@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from acd1ef8 to f9f3694 Compare September 1, 2026 21:03
@github-actions
github-actions Bot requested a deployment to preview-pr-92593 September 1, 2026 21:03 In progress
@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Sep 1, 2026
@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from f9f3694 to 24a3727 Compare September 2, 2026 18:16
@github-actions
github-actions Bot requested a deployment to preview-pr-92593 September 2, 2026 18:16 In progress
@trunk-io

trunk-io Bot commented Sep 2, 2026

Copy link
Copy Markdown

Stacked PR 92598 was cancelled: a user cancelled it.

@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from 24a3727 to 39cbeaa Compare September 2, 2026 21:06
@github-actions
github-actions Bot requested a deployment to preview-pr-92593 September 2, 2026 21:07 In progress
@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from 39cbeaa to 4360e36 Compare September 2, 2026 22:41
@github-actions
github-actions Bot requested a deployment to preview-pr-92593 September 2, 2026 22:42 In progress
Base automatically changed from experiments/product-folder-migration-timeseries-modal to master September 2, 2026 23:33
@trunk-io

trunk-io Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@rodrigoi
rodrigoi force-pushed the experiments/product-folder-migration-select-existing-feature-flag-modal branch from 4360e36 to 19df69d Compare September 3, 2026 03:57
@trunk-io
trunk-io Bot merged commit 4974dd2 into master Sep 3, 2026
223 checks passed
@trunk-io
trunk-io Bot deleted the experiments/product-folder-migration-select-existing-feature-flag-modal branch September 3, 2026 05:01
@trunk-io

trunk-io Bot commented Sep 3, 2026

Copy link
Copy Markdown

This pull request was merged into master as part of stacked PR 92598.

@deployment-status-posthog

deployment-status-posthog Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-09-03 05:17 UTC Run
prod-us ✅ Deployed 2026-09-03 08:35 UTC Run
prod-eu ✅ Deployed 2026-09-03 08:36 UTC Run

This branch had an error being deployed

1 failed deployment
preview-pr-92593 — 19df69d5 Deployed Sep 3, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants