Modifying taxonomic filter

From PostHog/posthog · View interactive version

Modifying taxonomic filter is an AI agent skill from the GitHub repository PostHog/posthog. Guides safe, evidence-led changes to the TaxonomicFilter, PostHog's picker for events, actions, properties, cohorts, and more. Use when adding features, fixing bugs, removing groups or tabs, changing search, ordering, recents, pinning, empty states, loading or performance, or refactoring the picker.

How to use this skill

Skill file

Modifying the TaxonomicFilter

The TaxonomicFilter is the picker users hit to choose any "thing PostHog knows about": events, properties, actions, cohorts, groups.

It is the on-ramp into almost every analytics, flags and replay configuration.

Code lives in frontend/src/lib/components/TaxonomicFilter/.

This file is an index.

Read it fully, then load only the references your change needs.

The references hold the detail and the evidence.

Three guardrails

  1. Decide with evidence, not taste.

Everyone who has worked on this picker has strong opinions, and some of them are wrong.

Check a claim against product-reality and evidence-sources before acting on it, including claims in issues, Slack, or this skill.

  1. Demoting what users actually pick is a regression, even with every test green.

Ordering, promotion, position-0 and default-tab changes need explicit human sign-off.

  1. Telemetry is a public contract.

Dashboards and replay scanners read these events.

Never rename or repurpose a property silently.

telemetryContract.test.ts fails when a capture call and the contract disagree, so update the contract in the same PR.

See telemetry-contract.

The picture in five lines (refreshed 2026-10-15)

Just over half of those come from recents.

Most empty searches are the right word in the wrong tab.

Detail, windows and caveats: product-reality.

These numbers are a snapshot.

For current values, run the taxonomic_filter_* metrics in the PostHog data catalog (see refreshing-product-reality).

Route by what you are changing

| You are changing | Read first |

| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| Ordering, promotion, Suggested, default tab | product-reality, design-principles, contested-decisions |

| Adding, removing or hiding a group or tab | feature-inventory, call-sites |

| Search, empty states, no-results recovery | failure-modes, design-principles |

| Recents, pinning, remembered state | contested-decisions, design-principles |

| Loading, latency, pagination, errors | performance, failure-modes |

| Telemetry or dashboards | telemetry-contract, measuring-changes |

| Any refactor | architecture, common-pitfalls, testing-patterns |

| A bug report you can't reproduce | call-sites (confirm the call site and props first) |

| Deciding whether a change is worth it | evidence-sources, measuring-changes |

Working loop

  1. State the user problem.

Which users, which call site, what goes wrong.

Find it in the evidence, not only in the request.

See evidence-sources.

  1. Size it.

Use ratios from telemetry.

A change that helps 0.1% of opens and risks the Suggested view is not worth it.

  1. Check the principles and contested decisions that apply.

If your change reverses a documented decision, say so and bring evidence.

  1. Lock behavior with React Testing Library tests at the call sites you touched.

Agents find this component confusing; RTL tests are the fastest guard.

See testing-patterns.

  1. Decide how you will know it worked before merging.

Ship ordering or default changes behind a flag with a metric and a guardrail.

See measuring-changes.

Pre-change checklist

hogli test frontend/src/lib/components/TaxonomicFilter/

Keep this skill honest: if the data contradicts it, fix the skill in the same PR.

Refresh numbers with refreshing-product-reality when they are older than about three months.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.