refactor(taxonomic-filter): extract miscTaxonomicGroupsLogic#59838
refactor(taxonomic-filter): extract miscTaxonomicGroupsLogic#59838pauldambra wants to merge 2 commits into
Conversation
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
|
Size Change: 0 B Total Size: 80.7 MB ℹ️ View Unchanged
|
76fd8ab to
e312a7c
Compare
There was a problem hiding this comment.
Purely additive new kea logic file — zero deletions, not yet imported anywhere in the codebase, so no existing code is affected. The file content is valid TypeScript/React kea logic matching its .tsx extension, with no security issues, data model changes, or API contract modifications.
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
frontend/src/lib/components/TaxonomicFilter/miscTaxonomicGroupsLogic.tsx:151-152
The `getName` callback explicitly uses the `any` type here while the adjacent `getValue` leaves it inferred. Every other `SimpleOption`-backed group in this file (and in the sibling logic files) types the argument as `SimpleOption`. Using `any` disables type-checking on `option.name` and is inconsistent with the rest of the file.
```suggestion
getName: (option: SimpleOption) => option.name,
getValue: (option: SimpleOption) => option.name,
```
Reviews (1): Last reviewed commit: "refactor(taxonomic-filter): extract misc..." | Re-trigger Greptile |
e312a7c to
3937648
Compare
0e492c7 to
1b65905
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Behavior-identical refactor extracting inline group definitions into a new keyed kea logic file following the established split-logic pattern in TaxonomicFilter. Group ordering is preserved, key propagation is correctly wired, and propertyAllowList prop access matches the original semantics.
e4ad1a8 to
54c187c
Compare
5b8677f to
5c8e988
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
54c187c to
3d07ca2
Compare
5c8e988 to
ef683a5
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Behavior-identical refactor extracting inline group definitions into a new keyed kea logic file following the established split-logic pattern throughout TaxonomicFilter. Key propagation is correctly wired, group ordering is preserved, and propertyAllowList access is correctly moved to a props-based selector in the new logic.
3d07ca2 to
593416b
Compare
ef683a5 to
7703f8d
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Behavior-identical refactor following the established split-logic pattern throughout TaxonomicFilter; group ordering is preserved, key propagation is correctly wired, and the single any type is pre-existing code moved verbatim with no new risk introduced.
593416b to
f9e3e2c
Compare
7703f8d to
cf3c8b3
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Behavior-identical refactor following the established split-logic pattern throughout TaxonomicFilter. Group ordering is preserved, key propagation is correctly wired, and the single any type is pre-existing code moved verbatim with the resolved comment acknowledged by the author.
f9e3e2c to
e87248a
Compare
cf3c8b3 to
01feaa9
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Behavior-identical refactor following the established split-logic pattern throughout TaxonomicFilter. Key propagation is correctly wired, group ordering is preserved, and the propertyAllowList access from props is semantically equivalent to the original selector-based access. No showstoppers.
e87248a to
83a5cf5
Compare
Final slice. The last eight inline tabs in the parent — `Activity
log properties`, `Workflow variables`, `Actions`, `Autocapture
elements`, `Metadata`, `Wildcards`, `Persons`, `Session properties`
— are heterogeneous singletons that didn't fit any of the
already-extracted clusters but all need to leave the file so the
parent's `taxonomicGroups` body collapses to nothing but spreads.
New `miscTaxonomicGroupsLogic.tsx`:
- Connects to `teamLogic`.
- Owns `propertyAllowList` prop-passthrough selector.
- Owns four group selectors positioned by their original
order-in-parent:
- `activityWorkflowActionsTaxonomicGroups` (between
`eventsTaxonomicGroups` and `dataWarehouseTaxonomicGroups`)
- `elementsMetadataTaxonomicGroups` (between
`dataWarehouseTaxonomicGroups` and the property cluster)
- `wildcardsPersonsTaxonomicGroups` (between
`customEventsTaxonomicGroups` and `posthogResourcesTaxonomicGroups`)
- `sessionPropertiesTaxonomicGroups` (after
`posthogResourcesTaxonomicGroups`)
Parent `taxonomicFilterLogic`:
- Connects to the new logic for all four selectors, added to
`extractedTaxonomicGroupsB` bundle.
- Removes the eight inline tabs, replaces with four spreads.
- Drops `currentTeam` and `propertyFilters` from `taxonomicGroups`
inputs/signature (no longer used after extraction).
- Drops now-unused `SimpleOption`, `isString`,
`getProductEventPropertyFilterOptions`, `actionsModel`, `ActionType`,
`PersonType`, `HogFlowTaxonomicFilters`, `TeamType` imports.
The parent's `taxonomicGroups` body is now a pure composition: just
spreads of per-data-type child group arrays plus the group-analytics
selectors. The original behaviour-bearing logic has fully relocated
into child logics.
No behaviour change.
Agent-written. Tests:
- `hogli test frontend/src/lib/components/TaxonomicFilter/` —
362/362 pass.
- TS check on touched files — clean.
Generated-By: PostHog Code
Task-Id: 2649f7ae-c1f7-40ae-8866-be024f3f1285
Generated-By: PostHog Code Task-Id: 2649f7ae-c1f7-40ae-8866-be024f3f1285
01feaa9 to
0d67db4
Compare
There was a problem hiding this comment.
Behavior-identical refactor extracting inline group definitions into a new keyed kea logic file following the established split-logic pattern throughout TaxonomicFilter. Group ordering is preserved, key propagation is correctly wired, and propertyAllowList access from props is semantically equivalent to the original.
|
Closing — the extraction approach hit kea's 16-dep SelectorTuple limit repeatedly and needs a different architectural strategy. The stack is being abandoned and master is being reverted back to the state right after #59816. See the upcoming revert PR for details. |

Problem
Changes
How did you test this code?
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Publish to changelog?
Docs update
🤖 Agent context