Skip to content

feat(data-management): add property usage events list#24

Open
lordspline wants to merge 6 commits into
masterfrom
capy/property-usage-events
Open

feat(data-management): add property usage events list#24
lordspline wants to merge 6 commits into
masterfrom
capy/property-usage-events

Conversation

@lordspline

@lordspline lordspline commented Jun 19, 2026

Copy link
Copy Markdown

Problem

When viewing an event property definition in Data management, users cannot see which events use that property. This makes it difficult to understand property usage and impact without manual queries or workarounds.

Changes

  • /api/projects/{id}/property_definitions/{id}/events/ endpoint lists events that have used a property, with event definition IDs and last seen timestamps
  • Added typed serializers and full-stack tests
  • Added “Events using this property” table section to the property definition page, linking to event definitions
  • Enhanced demo data generators to seed EventProperty relationships for realistic testing

How did you test this code?

  • Backend: regression tests in test_list_events_using_property and test_list_events_using_property_is_project_scoped
  • Frontend: updated definitionLogic.test.ts to assert property usage events loading
  • Browser: manually verified on the plan property page showing entered_free_trial, pageview, and purchase events

Open POST-075 POST-075


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

… pages

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@lordspline lordspline added the capy Generated by capy.ai label Jun 19, 2026 — with Capy AI

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 1 comment

Comment thread posthog/taxonomy/property_definition_api.py Outdated
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 1 comment

Comment thread .capy-cache/docker-compose.capy.yml Outdated
lordspline and others added 3 commits June 19, 2026 05:27
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 1 comment

Comment thread .capy-cache/docker-compose.capy.yml Outdated
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@Scrapybara Scrapybara deleted a comment from capy-ai Bot Jun 19, 2026
@capy-ai

capy-ai Bot commented Jun 19, 2026

Copy link
Copy Markdown

🖼 Visual QA — property definition page

Surface: Data management → Properties → {property definition}
Tested on: $browser property with demo data (Hedgebox workspace, 7 events)


Before — master (desktop 1280px)

The property definition page ends after Verification Status / Property Type. No events section.

Before desktop


After — PR (desktop 1280px)

New "Events using this property" section appears below, with a paginated table.

After desktop


After — PR (narrow 390px)

Table remains readable at mobile width; EVENT name + internal key stack vertically per row.

After narrow


✅ Checks

New section renders for property definitions
Section absent on master
Display name + internal key shown per event row
Event name links to event definition
Relative "last seen" timestamps render correctly
Null last_seen_at renders as
Section description text matches spec
Responsive at 390px — no overflow

⚠️ Minor observation

uploaded_file showed for last seen at desktop width in one screenshot but a timestamp in narrow — likely a data race between the two captures (demo data was still being generated). Not a rendering bug; worth a quick manual sanity check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant