Skip to content

fix(flags): open flag calls from event links that name no event - #114210

Merged
trunk-io[bot] merged 7 commits into
masterfrom
haacked/event-link-flag-evaluations-fallback
Oct 9, 2026
Merged

trunk-io[bot] merged 7 commits into
masterfrom
haacked/event-link-flag-evaluations-fallback

Conversation

@haacked

@haacked haacked commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • On flag evaluations mode 2, an event link that doesn't name its event opens an empty events page when it points at a flag call.
  • Mode 2 stores $feature_flag_called only in flag_evaluations. The events page reads that table only when the query filters to that event.
  • Links without the name include the destination Invocations tab, links built before feat(flags): deliver flag calls to destinations on flag_evaluations_mode 2 #113654, and test-run payloads.

Changes

  • On mode 2, an event link that names no event shows the flag call it points at.
  • When the URL opens such a lookup, the events scene runs it again with the $feature_flag_called event and a limit of one row.
  • If that finds the row and the query has not changed, the scene adds the event to the query, which then reads flag_evaluations.
  • The table shows empty for one request before the flag call appears.
  • The check sends the backend's own events query, so it reads the same table and time window the named query reads.
  • Only a URL that holds an unnamed lookup triggers the check. An edit in the open scene, including a date change, does not, so a user who clears the event keeps it cleared.
  • A reload after the user clears the event runs the check again, because the URL then holds the cleared lookup.
  • The scene stores each query in its JSON form, the same form the URL holds. A date edit writes before: undefined, and without this the scene's own URL update looked like a new link and ran the check again.
  • The check sends orderBy: [], so the runner skips its presorted path and reads flag_evaluations once.
  • A failed check leaves the lookup on events. performQuery already reports the error.
  • Modes 0 and 1 are unchanged, because mode 1 still writes flag calls to events.
  • Mechanical: the redirect builds its uuid filter with getEventLookupQuery in defaults.ts, next to isUnnamedEventLookup, which recognizes it.

Before, on mode 2:

flowchart LR
    eventLink([Link with no event name]) --> lookup[Events scene lookup]
    lookup --> eventsTable[(events)]
    eventsTable --> emptyResult([Empty result])
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000;
    classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
    class eventLink,emptyResult phYellow;
    class lookup phBlue;
    class eventsTable phGray;
Loading

After, on mode 2:

flowchart LR
    eventLink([Link with no event name]) --> lookup[Events scene lookup]
    lookup --> eventsTable[(events)]
    lookup -->|mode 2| flagCallCheck[Same lookup as a flag call]
    flagCallCheck --> flagEvals[(flag_evaluations)]
    flagEvals -->|row found| namedLookup[Lookup names the flag call event]
    namedLookup --> shownCall([Flag call shown])
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000;
    classDef phGray fill:#e5e7eb,stroke:#c7ccd1,color:#000;
    class eventLink,shownCall phYellow;
    class lookup,flagCallCheck,namedLookup phBlue;
    class eventsTable,flagEvals phGray;
Loading

No screenshot: the change was not run in the app.

How did you test this code?

Test rationale:

  • eventsSceneLogic.test.ts gains nine cases. A link to a mode-2 flag call gets the event name.
  • A miss, a failed check, mode 1, a link that names its event, a lookup with another filter, a user edit, an edit made before the check answers, and a restored tab each leave the query unchanged.
  • A separate test clears the event and then edits the date range. It checks that the scene's own URL update does not run the check again.
  • The mock answers only when the check asks for the flag call event, the uuid and the link's time window. A check for the wrong event or window fails.
  • The edit, edit-before-answer, restore, and failure cases each fail when the bug they guard is put back.
  • The closest existing test is the flag calls note test.each in the same file, which covers the table note but not lookups. A logic test is the cheapest level that runs the URL handler.

Run locally: the explore scene tests, and the check's EventsQuery through EventsQueryRunner against local ClickHouse. It returned a routed mode-2 flag call and nothing for an $experiment_exposure that lives only in events.

Not run: a click on a real link in the running app.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Release status

  • No feature flag controls this change

Docs update

None. No doc under docs/ covers event links or flag evaluations modes.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Opus 5.5 (claude-opus-5-5)

  • The user chose this events-page fallback over storing the event name in hog_invocation_results, which stays a follow-up.
  • An internal code review moved the check out of setQuery into a URL-only action, added the failure catch, and replaced hand-written HogQL with the runner's EventsQuery.
  • CodeRabbit CLI, run once with --deep, reported one finding: retry when currentTeam is null at URL dispatch. I rejected it. teamLogic sets currentTeam from the app context when it mounts, and this logic connects teamLogic.
  • A second session ran /simplify and /comment-cleanup over the branch. It merged the uuid parser into one boolean, and it stopped a restored tab from running the check, because that run could put back an event the user had cleared.
  • Skills invoked: /writing-tests, /writing-kea-logics, /writing-ui-components, /writing-code-comments, /reviewing-with-coderabbit, /writing-pr-descriptions, /simplify, /comment-cleanup.
  • Duplicate check: an open-PR search found no other fix for event links without the name.
  • Public artifact: everything here comes from the repository. No customer or session material is included.

https://claude.ai/code/session_01EvZDsoSPrQzLQit6kYQydV
https://claude.ai/code/session_01YRizWgRS9zdbh43fr76H8N

On flag_evaluations_mode 2 a $feature_flag_called event lives only in
flag_evaluations. An event link without the event name, such as the one
on the destination Invocations tab, opens the events scene on the events
table and shows nothing.

When the URL opens an event lookup that names no event on mode 2, the
events scene runs the lookup again with the flag call event. If that
finds the row, the scene names the event, which reads flag_evaluations.
An edit in the scene does not trigger the check, so clearing the event
stays cleared.

Claude-Session: https://claude.ai/code/session_01EvZDsoSPrQzLQit6kYQydV
@haacked haacked self-assigned this Oct 8, 2026
@trunk-io

trunk-io Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@haacked haacked added the reviewhog ($$$) Reviews pull requests before humans do label Oct 8, 2026
@haacked
haacked requested a balanced review from Copilot October 8, 2026 22:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@posthog

posthog Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦔 PostHog Review reviewed this pull request

Found 0 must fix, 0 should fix, 1 consider.

Published 1 finding (view the review).

Resolved comments: 1 fixed

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane

This PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.

✅ Complexity (TypeScript) — clean

Cyclomatic complexity above the limit in changed typescript files (10 for production files, 15 for test files). Warn only: worth simplifying when you next touch these functions.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

⚠️ Comment density — 4% of added code lines are comments (10 of 239)

This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.

Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.

Files with the most added comment lines:

File Comment lines Added lines
frontend/src/scenes/activity/explore/eventsSceneLogic.tsx 9 47
frontend/src/scenes/activity/explore/defaults.ts 1 18

This check does not block merging. It updates on every push and clears when the share drops.

⚠️ Bundle size — 🔺 +2.7 KiB (+0.0%)

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

Total: 76.77 MiB · 🔺 +2.7 KiB (+0.0%)

File Size Δ vs base
render-query/src/render-query/render-query.js 25.67 MiB 🔺 +1.5 KiB (+0.0%)

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.65 MiB · 23 files no change █████████░ 89.8% of 1.84 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
3.80 MiB · 675 files 🔺 +227 B (+0.0%) █████████░ 94.3% of 4.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
7.74 MiB · 2,456 files 🔺 +1.2 KiB (+0.0%) █████████░ 92.8% of 8.34 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
9.98 MiB · 3,538 files 🔺 +2.5 KiB (+0.0%) █████████░ 91.4% of 10.92 MiB
today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
7.76 MiB · 2,466 files 🔺 +1.2 KiB (+0.0%) █████████░ 90.4% of 8.58 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
9.60 MiB · 3,389 files 🔺 +2.9 KiB (+0.0%) █████████░ 91.3% of 10.51 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
12.29 MiB · 4,185 files 🔺 +1.2 KiB (+0.0%) ████████░░ 78.2% of 15.72 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.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/index.tsx
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
839 B src/scenes/ChunkLoadErrorBoundary.tsx
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.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
99.8 KiB src/lib/api.ts
93.1 KiB src/products.tsx
69.0 KiB src/lib/lemon-ui/icons/icons.tsx
40.7 KiB src/lib/utils/eventUsageLogic.ts
38.7 KiB ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
29.0 KiB ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
281.0 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 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
112.1 KiB ../packages/quill/packages/quill/dist/index.js
99.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.1 KiB src/products.tsx
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
281.0 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.9 KiB src/queries/validators.js
153.7 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
112.1 KiB ../packages/quill/packages/quill/dist/index.js
99.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.1 KiB src/products.tsx
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
281.0 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
153.7 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
112.1 KiB ../packages/quill/packages/quill/dist/index.js
99.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.1 KiB src/products.tsx
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
281.0 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.9 KiB src/queries/validators.js
153.7 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
112.1 KiB ../packages/quill/packages/quill/dist/index.js
99.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
93.1 KiB src/products.tsx
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
316.7 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
316.0 KiB ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
281.0 KiB src/taxonomy/core-filter-definitions-by-group.json
220.8 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
181.9 KiB src/queries/validators.js
153.7 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
112.1 KiB ../packages/quill/packages/quill/dist/index.js
99.8 KiB src/lib/api.ts
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/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

✅ Toolbar bundle — eager 2.24 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.24 MiB · 19 files 🔺 +52 B (+0.0%) ████░░░░░░ 39.1% of 5.72 MiB
Deferred (lazy) 2.19 MiB · 44 files 🔺 +113 B (+0.0%) n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
861.3 KiB dist/toolbar/toolbar-app-G6HPIREX.css
669.8 KiB dist/toolbar/chunk-chunk-ZOWCBXZV.js
259.4 KiB dist/toolbar/chunk-chunk-YKNMISGG.js
138.2 KiB dist/toolbar/chunk-chunk-PE5DZ2WQ.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
75.2 KiB dist/toolbar/toolbar-app-HEV2GVJR.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-AVVBLJY4.js
21.7 KiB dist/toolbar/chunk-chunk-43RGLDYQ.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +66.5 KiB (+0.0%)

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

Total: 1010.29 MiB · 🔺 +66.5 KiB (+0.0%)

⚠️ Playwright — 1 flaky

🎭 Playwright report · View test results →

⚠️ 1 flaky test:

  • Creating a dashboard from a template populates tiles (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this section? Help fix flakies and failures and it will go green!

✅ Hogbox preview — ready, open the preview

▶ Open the preview

🔑 Login test@posthog.com / 12345678 (demo data)
🧩 Running this PR's backend and frontend, on the PostHog :master base
🔗 Link stable across rebuilds: a re-push swaps the box underneath, the URL stays
🔒 Access tailnet only (PostHog VPN)
🛠️ Admin inspect & debug state in hogland
💤 Idle sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen

commit fc7e97e · box box-20d7a8348cb7 · ready in 1396s (push → usable) · build log · rebuilds on every push, torn down on close

@posthog

posthog Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

Comment thread frontend/src/scenes/activity/explore/eventsSceneLogic.tsx
@posthog posthog Bot removed the reviewhog ($$$) Reviews pull requests before humans do label Oct 8, 2026
The events scene compared the URL query with the in-memory query before it treated the URL as a new link.
The URL stores the query as JSON, which drops keys set to undefined, and the date range writes before: undefined.
So the scene's own URL update looked like a new link and ran the flag call check again.
On flag evaluations mode 2 that check put $feature_flag_called back after the user cleared it.

The handler now compares against the query in its JSON form.

Generated-By: PostHog Desktop
Task-Id: 5a7416ba-1b4e-478e-93c0-577724bb689b
@trunk-io

trunk-io Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
Scenes-App/Experiments ExperimentWithHealthFindings play-test The test failed because it could not find an element with the text 'Why?', possibly due to the text being split across multiple elements. Logs ↗︎
Scenes-Other/Startup program NeedsBillingDetails smoke-test The test timed out while waiting for loading indicators or spinners to disappear. Logs ↗︎
Scenes-App/SidePanels SidePanelNotebooks smoke-test The test timed out while waiting for loading indicators or spinners to disappear. Logs ↗︎
Scenes/Code review Default play-test The test failed because a logic component was not mounted when accessed, and there were unhandled network requests intercepted by the mock service... Logs ↗︎

... and 2 more

View Full Report ↗︎ ⋅ Docs

@haacked haacked added the reviewhog ($$$) Reviews pull requests before humans do label Oct 8, 2026
@haacked
haacked marked this pull request as ready for review October 8, 2026 22:59
@parameterai

parameterai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Risk: No findings

The only change since the last review is a mechanical refactor of a test case in eventsSceneLogic.test.ts (extracting the edited query into a const with explicit typing); no production code or security-relevant behavior changed. No new security issues.

Sentinel reviewed fc7e97e · Review settings

@github-actions
github-actions Bot requested a deployment to preview-pr-114210 October 8, 2026 23:00 In progress
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team October 8, 2026 23:00
Comment thread frontend/src/scenes/activity/explore/eventsSceneLogic.tsx
@posthog posthog Bot removed the reviewhog ($$$) Reviews pull requests before humans do label Oct 8, 2026
The flag call check inherited orderBy ['timestamp DESC'] from the lookup query. That sends EventsQueryRunner down the presorted path, which reads flag_evaluations in an inner uuid query and again in the outer query. The check selects only uuid with a limit of one, so the second read gains nothing. An empty orderBy skips the presorted path. The named query that the table runs keeps its order.

Generated-By: PostHog Desktop
Task-Id: a9ae5584-1281-47c8-b453-5116f380044c
@github-actions
github-actions Bot requested a deployment to preview-pr-114210 October 8, 2026 23:06 In progress

@stamphog stamphog 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.

Approved.

Contained frontend lookup fix using the existing query API; no API contract or ingestion changes and no outstanding substantive review concerns. Independent review is not required for this reversible change.

  • Author wrote 7% of the modified lines and has 19 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 85L, 3F substantive, 264L/4F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1c-medium (264L, 4F, single-area, fix)
stamphog 2.4.1 .stamphog/policy.yml @ fc7e97e · reviewed head fc7e97e

@github-project-automation github-project-automation Bot moved this to Approved in Feature Flags Oct 8, 2026
@trunk-io
trunk-io Bot merged commit 8d4acd2 into master Oct 9, 2026
256 checks passed
@trunk-io
trunk-io Bot deleted the haacked/event-link-flag-evaluations-fallback branch October 9, 2026 01:00
@deployment-status-posthog

deployment-status-posthog Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-10-09 01:19 UTC Run
prod-us ✅ Deployed 2026-10-09 01:31 UTC Run
prod-eu ✅ Deployed 2026-10-09 01:30 UTC Run

This branch was successfully deployed

1 active deployment
preview-pr-114210 — fc7e97ef Deployed Oct 8, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/feature-flags Feature Tag: Feature flags stamphog Request AI approval (no full review) team/feature-flags

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants