refactor(taxonomic-filter): extract eventsTaxonomicGroupsLogic#59832
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: +4.01 kB (0%) Total Size: 80.6 MB 📦 View Changed
ℹ️ View Unchanged
|
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
a84aec2 to
e453358
Compare
33c59c3 to
e6d1319
Compare
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/eventsTaxonomicGroupsLogic.ts:12
The new `withKeywordShortcuts.tsx` added by this PR is an exact duplicate of the already-existing `utils/keywordShortcuts.tsx` — same function, same helper, same types. `eventsTaxonomicGroupsLogic.ts` should import from the canonical location that `utils/buildTaxonomicGroups.tsx` already uses, so the implementation lives in exactly one place.
```suggestion
import { withKeywordShortcuts } from 'lib/components/TaxonomicFilter/utils/keywordShortcuts'
```
Reviews (1): Last reviewed commit: "refactor(taxonomic-filter): extract even..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pure frontend kea refactor following the established pattern of other extracted taxonomic group logics. The extracted logic is functionally identical to the removed inline code, with the same data sources and group ordering. The withKeywordShortcuts duplication is a code-quality note only — no behavioral changes or production risk.
28fba21 to
9123baa
Compare
83ad856 to
2465c2c
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Pure frontend kea refactor with no behavioral changes: the two event group definitions are extracted to a dedicated logic and spread back into the same position in the parent selector. The withKeywordShortcuts duplication across three locations is a code-quality note only — all copies are functionally identical and no existing behavior is altered.
9123baa to
6f731fd
Compare
2465c2c to
4287f7b
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Pure frontend kea refactor extracting event taxonomic groups into a dedicated logic, following the established pattern of other extracted group logics in the same folder. The extracted logic is functionally identical to the removed inline code with the same data sources and group ordering. The withKeywordShortcuts duplication across two locations is a code-quality note only — no behavioral changes or production risk.
6f731fd to
8cdcd6d
Compare
4287f7b to
e4b7f7f
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Pure frontend kea refactor extracting event taxonomic group definitions into a dedicated logic file, following the established pattern of other group logics in the same folder. The extracted logic is functionally identical to the removed inline code, with the same data sources and group ordering. The withKeywordShortcuts triplication is a code-quality note only — no behavioral changes or production risk.
8cdcd6d to
a02bec6
Compare
e4b7f7f to
1539325
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Pure frontend kea refactor following the established pattern of other extracted taxonomic group logics in this folder; the extracted logic is functionally identical to the removed inline code with the same data sources and group ordering. The withKeywordShortcuts duplication across two files is a code-quality note only — no behavioral changes or production risk.
a02bec6 to
9a4939c
Compare
1539325 to
d2bdaae
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Pure frontend kea refactor extracting event taxonomic groups into a dedicated logic, following the established pattern of sibling files like cohortTaxonomicGroupsLogic, dataWarehouseTaxonomicGroupsLogic, etc. The extracted logic is functionally identical to the removed inline code with the same data sources and group ordering. The withKeywordShortcuts duplication is a pre-existing code quality issue (taxonomicFilterLogic already had its own local copy) and not a showstopper.
9a4939c to
95f278f
Compare
Sixteenth slice. The `Events` and `Internal Events` tabs are core
event-definition tabs and the first two entries in the parent's
`taxonomicGroups` array. They share the same `event_definitions`
endpoint pattern, both use the `eventTaxonomicGroupProps` shared
helper, and the `Events` tab wires in keyword shortcuts via the
`withKeywordShortcuts` helper that used to be defined locally in
the parent file.
New `withKeywordShortcuts.tsx` shared utility file:
- Moved `keywordShortcutValue`, the `BaseGroupFns<T>` type, and the
`withKeywordShortcuts` function out of `taxonomicFilterLogic.tsx`
so both the parent and any child logic can import them. (Exporting
them from the parent would force every child logic to depend on a
symbol from the file we're shrinking.)
New `eventsTaxonomicGroupsLogic.ts`:
- Connects to `projectLogic`.
- Owns its own `excludedProperties` selector.
- Owns `eventsTaxonomicGroups` returning the two-element array with
the `Events` tab (including `withKeywordShortcuts` wiring for
autocapture series shortcuts) and the `Internal Events` tab
(including the `getProductEventFilterOptions('activity-log')`
enumeration of internal event names).
Parent `taxonomicFilterLogic`:
- Imports `withKeywordShortcuts` from the new utility file instead
of defining it locally.
- Connects to `eventsTaxonomicGroupsLogic`, adds to
`extractedTaxonomicGroups` bundle.
- Removes the two inline tabs, replaces with the spread.
- Drops now-unused `IconCursor`, `QuickFilterItem`,
`buildAutocaptureSeriesShortcuts`, `getProductEventFilterOptions`
imports.
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
d2bdaae to
aac1a57
Compare
There was a problem hiding this comment.
Pure frontend kea refactor extracting two event taxonomic group definitions into a dedicated logic following the established pattern of sibling files. The extracted logic is functionally identical to the removed inline code, with the same projectLogic data source, same props-derived excludedProperties, and same group ordering.
|
🎭 Playwright report · View test results →
These issues are not necessarily caused by your changes. |
|
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