PostHog / PostHog/posthog

[customer analytics] Accounts list tag chips aren't clickable to filter

Open Beginner friendly
#68,906 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature/customer-analytics
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Summary

Tag chips shown in the accounts list are rendered as static tags with no click handler, so clicking one does nothing — but users click them expecting to filter the list by that tag (a common source of dead-clicks). The fix is to make each chip clickable so it adds its tag to the existing tags filter, with a visible active state when already applied.

Part of #68887.

Details for coding agents

Root cause
TagsCell renders <ObjectTags tags={tags} staticOnly />. staticOnly makes ObjectTags emit plain LemonTag chips with no onClick — purely decorative. The filter machinery already exists (setTagsFilter(string[]) backing the Tags dropdown), it just isn't wired to the chips.

Proposed fix
In TagsCell, render individual LemonTags each with an onClick that reads the current tagsFilter from accountsLogic and dispatches setTagsFilter([...tagsFilter, tag]) (idempotent — skip if already present). Give a chip an active/primary style when it's already in the filter. No backend change. Keep click affordance consistent with LemonTag conventions.

References

  • products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx:138-143 (TagsCell)
  • frontend/src/lib/components/ObjectTags/ObjectTags.tsx:52,102 (staticOnly → no onClick)
  • products/customer_analytics/frontend/components/Accounts/accountsLogic.ts:193,238-241 (setTagsFilter action + reducer)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in products/customer_analytics/frontend/components/Accounts/AccountsHogQLTable.tsx at TagsCell, then read ObjectTags.tsx and accountsLogic.ts to trace staticOnly, tagsFilter, and setTagsFilter. Make each displayed tag clickable, skip tags already in the filter, and show an active style for applied tags. Confirm the existing Tags dropdown behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
analytics, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.