Repository navigation
feat(error-tracking): show mobile screenviews in the exception timeline - #89054
posthog[bot] wants to merge 4 commits into
Conversation
|
❌ This pull request was removed from the merge queue because it failed tests. PR #90286 was used for testing. See more details here.
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
🤖 CI report✅ Trunk lane — non-backend laneThis 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.
|
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.37 MiB · 22 files | no change | ███░░░░░░░ 30.3% of 4.51 MiB |
authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
8.81 MiB · 3,245 files | 🔺 +59 B (+0.0%) | █████████░ 90.7% of 9.71 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 |
| 762 B | src/index.tsx |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 306.9 KiB | ../node_modules/.pnpm/posthog-js@1.420.0_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 267.7 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 |
| 260.9 KiB | ../node_modules/.pnpm/posthog-js@1.420.0_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.js |
| 252.5 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 154.2 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 |
| 104.7 KiB | src/lib/api.ts |
| 95.2 KiB | ../packages/quill/packages/quill/dist/index.js |
| 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
✅ Toolbar bundle — eager 2.25 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.25 MiB · 18 files | 🔺 +38 B (+0.0%) | ████░░░░░░ 39.4% of 5.72 MiB |
| Deferred (lazy) | 2.11 MiB · 45 files | no change | n/a — loads on demand |
Loader dist/toolbar.js |
1.1 KiB | no change | █░░░░░░░░░ 5.8% of 19.5 KiB |
Largest eagerly-shipped chunks
| Size | File |
|---|---|
| 748.8 KiB | dist/toolbar/toolbar-app-XYGAYFW6.css |
| 585.4 KiB | dist/toolbar/chunk-chunk-WAAZXMI4.js |
| 484.7 KiB | dist/toolbar/chunk-chunk-QMGLBVDO.js |
| 133.8 KiB | dist/toolbar/chunk-chunk-WIGPXHXA.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 71.3 KiB | dist/toolbar/toolbar-app-IO2JX2X2.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-ENVYWGUI.js |
| 20.9 KiB | dist/toolbar/chunk-chunk-HEUIHINI.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 — 🔺 +5.1 KiB (+0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 1449.72 MiB · 🔺 +5.1 KiB (+0.0%)
|
✅ Visual changes approved by @hpouillot — baseline updated in 4 changed. |
Mobile exceptions lost their screen context. The session timeline built its events from one CombinedEventLoader query whose filter admitted `$exception`, `$pageview`, and every non-`$` event, but no other reserved event. `$screen` starts with `$` and is not `$pageview`, so screenviews never loaded. Add a SCREEN_VIEWS category. The loader now selects `$screen_name`, adds `$screen` to the WHERE clause, and maps the event to a screenview item. A new screenRenderer shows the screen name with a mobile icon, without the URL parsing or "open in browser" action that only fit pageviews. Generated-By: PostHog Desktop Task-Id: 86ebb785-e37b-49d7-9b41-423b9684a072
…ws category Screenviews shared a separate SCREEN_VIEWS category and toggle. A session is web or mobile in practice, so one of the pageview and screenview toggles was always empty. Fold mobile $screen events into the PAGE_VIEWS category, relabeled "Views". The pageview renderer now shows the screen name when the event carries one, and the URL pathname otherwise. Remove the separate screen renderer, enum value, and toggle. Generated-By: PostHog Desktop Task-Id: 86ebb785-e37b-49d7-9b41-423b9684a072
70ebce8 to
5d6324d
Compare
4 updated Run: 97f2c9e1-8b37-4109-9596-36f6d0e29bb2 Co-authored-by: hpouillot <3455883+hpouillot@users.noreply.github.com>
|
Closing as a duplicate of #88072. Both fix the same omission: #88072 is kept because it follows the existing per-category structure, with its own Worth porting into #88072: the |
Problem
CombinedEventLoaderquery. Its filter isor(equals(event, '$exception'), equals(event, '$pageview'), notEquals(left(event, 1), '$')).$screenstarts with$and is not$pageview, so it never matches. Mobile lifecycle events carry no$prefix, so they pass the third clause and become the only mobile context on the timeline.Closes #90005
Changes
$screenevent, listed by screen name next to a phone icon.combined.tsxselects$screen_name, adds$screento the query WHERE clause, and maps the event to aSCREEN_VIEWSitem.screen.tsxrenders the screen name. It drops the URL parsing and "open in browser" action from the pageview renderer, which do not fit a screen.CombinedEventLoader, so no extra query runs.SCREEN_VIEWSenum value, a category label and tooltip, an expanded-details WHERE case, and registration in the exception card session tab.How did you test this code?
combined.test.ts: it catches a revert of the$screenWHERE clause or the$screentoSCREEN_VIEWSmapping, which no existing test covered (CombinedEventLoaderhad no test).screenRendererin a Storybook story (MobileScreenviews) through a headless browser to confirm screenviews appear with the screen name and phone icon. The screenshot above is that render.Automatic notifications
Docs update
None. This change adds no user-facing setting or documented workflow.
🤖 Agent context
Autonomy: Fully autonomous
/writing-tests,/simplify,/writing-pr-descriptions.SCREEN_VIEWScategory over wideningPAGE_VIEWS. A screen has no URL and no "open in browser" action, so folding it into the pageview renderer would need a branch inside that renderer. A separate category mirrors howPAGE_VIEWSandCUSTOM_EVENTSalready work./simplifyran four review passes (reuse, simplification, efficiency, altitude); all reported the diff clean.Created with PostHog Desktop from this inbox report.