Skip to content

feat(workflows): search invocations by person email - #70334

Merged
meikelmosby merged 2 commits into
masterfrom
meikel/invocations-search-email
Jul 13, 2026
Merged

feat(workflows): search invocations by person email#70334
meikelmosby merged 2 commits into
masterfrom
meikel/invocations-search-email

Conversation

@meikelmosby

@meikelmosby meikelmosby commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

The invocations tab search only matches on invocation_id, event_uuid, distinct_id, and person_id, all exact-match UUIDs.
People rarely have those on hand; they usually know a user by email.

Changes

Adds an email match to the existing OR chain, as a subquery over persons.properties.email.

  • Case-insensitive substring: properties.email ILIKE '%<search>%'.
    So meikel, Meikel, meikel@posthog.com, and @company.com all work.
  • Runs on every non-empty search, no @ heuristic.
    First cut had one but it silently ate partial-name searches like meikel.
  • Applied to both fetchRunsPage and fetchSparkline so the list and the sparkline stay in sync.
  • Placeholder updated to mention email.

How did you test this code?

manual testing on dev

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Meikel asked for email search on the workflows invocations tab.
First iteration used exact match gated on @ in the search string, which Meikel then flagged as too narrow (meikel didn't match his own meikel@posthog.com).
Switched to ILIKE '%…%' and dropped the @ guard.

Change lives in the shared hog-functions/invocations component so it also benefits CDP destinations.

Tool: Claude Code (Opus 4.7).

@meikelmosby meikelmosby self-assigned this Jul 13, 2026
@meikelmosby
meikelmosby requested a review from a team July 13, 2026 07:13
@meikelmosby
meikelmosby marked this pull request as ready for review July 13, 2026 07:14
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦔 Hogbox preview · ❌ build failed

The preview didn't come up for commit e657e7e. See the build log for the failing step. It'll retry on the next push.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(workflows): search invocations by p..." | Re-trigger Greptile

Comment thread frontend/src/scenes/hog-functions/invocations/hogInvocationsLogic.tsx Outdated
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

Bundle size — no change

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 64.33 MiB · no change

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.21 MiB · 22 files no change ███░░░░░░░ 28.2% of 4.29 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.09 MiB · 2,970 files no change █████████░ 87.5% of 9.25 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
789 B src/scenes/ChunkLoadErrorBoundary.tsx
668 B src/index.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
278.6 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/rrweb.js
266.9 KiB ../node_modules/.pnpm/@posthog+icons@0.37.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
234.9 KiB src/taxonomy/core-filter-definitions-by-group.json
221.5 KiB ../node_modules/.pnpm/posthog-js@1.399.2/node_modules/posthog-js/dist/module.js
164.0 KiB src/queries/validators.js
154.3 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
105.9 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

⚠️ Dist folder size — 🔺 +1.5 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1280.75 MiB · 🔺 +1.5 KiB (+0.0%)

Playwright — all passed

All tests passed.

View test results →

@trunk-io

trunk-io Bot commented Jul 13, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@posthog

posthog Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @meikelmosby — baseline updated in 9392b2c.

View this run in PostHog

1 changed.

meikelmosby and others added 2 commits July 13, 2026 10:13
Auto-detects an @ in the invocations search input and resolves matching
person_ids via a persons.properties.email subquery, on top of the existing
UUID / distinct_id matches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…substring

Switches the email subquery from `properties.email = '<value>'` to
`ILIKE '%<value>%'` and drops the `@` guard so partial matches like `meikel`
resolve to `meikel@posthog.com`, and domain-only searches like `@company.com`
work too.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@meikelmosby
meikelmosby force-pushed the meikel/invocations-search-email branch from 9392b2c to e657e7e Compare July 13, 2026 08:14
@meikelmosby
meikelmosby merged commit bb56bb4 into master Jul 13, 2026
195 of 196 checks passed
@meikelmosby
meikelmosby deleted the meikel/invocations-search-email branch July 13, 2026 08:51
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-13 09:18 UTC Run
prod-us ✅ Deployed 2026-07-13 09:33 UTC Run
prod-eu ✅ Deployed 2026-07-13 09:34 UTC Run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants