Skip to content

fix(mobile): make crowded bar charts readable - #129592

Merged
trunk-io[bot] merged 1 commit into
masterfrom
codex/mobile-readable-bar-charts
Nov 4, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
codex/mobile-readable-bar-charts

Conversation

@cvolzer3

@cvolzer3 cvolzer3 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Mobile users cannot read crowded bar charts because each date divides its width across every series.
Saved stacked charts also appear as grouped bars.

This PR targets master directly. CI setup #129613 is no longer a prerequisite.

Changes

  • Saved bar charts retain their stacked or grouped layout.
  • Crowded charts show readable date windows, starting with the latest dates.
  • Date arrows preserve the saved interval and the value axis across pages.
  • Paged charts keep the same height as their placeholders, so dashboard rows stay still when a canvas mounts.
  • Hourly page labels show the calendar date and time at both ends.
  • A compact icon beside Back switches between grouped and stacked bars.
  • The layout choice persists on this device across visits and applies to every bar chart.
  • Zero values leave no bar, and point details retain the original date after paging.

Matching iPhone simulator screenshots show the smaller control with invented data. Android and physical-device visual checks remain pending.

Before this iteration After this iteration
iPhone simulator before: full-width layout toggle iPhone simulator after: compact header layout toggle

Updated grouped view.

Initial chart previews
Stacked Grouped
iPhone simulator after: stacked bars iPhone simulator after: grouped bars
Pager height and hourly labels: iPhone simulator comparison

The native chart harness uses invented data at 280- and 342-point widths.
Before: the chart occupies 204 points and omits calendar dates.
After: the chart and placeholder occupy 160 points, and hourly labels identify both days.

Native chart comparison at 280 points

Comparison at 342 points.

How did you test this code?

  • Earlier checks: Mobile CI and package security.
  • Rebase validation passes mobile typecheck, Biome, chart tests, and preflight.
  • The full Jest run hit report-screen timeouts; its isolated rerun passes.
  • Earlier iOS checks cover layout persistence, date paging, legend filtering, and point details.
  • The chart harness confirms reserved height and hourly labels at 280 and 342 points.
  • The rebased charts render in light and dark modes on an iPhone 17 Pro simulator, iOS 27.0, Xcode 27.2.
  • Both automated demo flows stopped at launch because native devtools could not attach.
  • Android and physical-device visual checks remain pending.
  • TypeScript complexity analysis remains unavailable.

Test rationale: Chart math cases cover missing dates, thin bars, stack totals, and pager dates. Adapter and store cases cover preference overrides and persistence. Canvas cases catch pager height overflow.

Release status

  • No feature flag controls this change

Docs update

Updated the existing mobile Views documentation for stacked bars and date paging.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Codex, gpt-6.1-sol. Review fixes: Codex, GPT-6.

Tools: shell, Git, GitHub CLI, iOS Simulator, and Argent. Skills: review-pr-comments, create-pr, writing-pr-descriptions, writing-ui-components, writing-tests, checking-local-environment-notes, running-ci-preflight, announcing-behavior-changes, writing-user-facing-copy, writing-code-comments, debugging-ci-failures, authoring-ci-workflows, running-mobile-demo-flows, and stacking-prs.

The chart commits were replayed onto current master after unstacking. Conflict resolution preserves the current themes, scrolling title, and small-bar rendering. The open-PR search found no matching mobile chart fix. Test data is invented. The change contains only mobile paths.

@cvolzer3 cvolzer3 self-assigned this Nov 4, 2026
@cvolzer3
cvolzer3 marked this pull request as ready for review November 4, 2026 19:37
@parameterai

parameterai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Risk: No findings

This increment finishes the crowded bar-chart work in the mobile app: review fixes to the date pager, bar layout segments, and canvas height, plus a device-wide grouped/stacked preference. All changes are React Native display logic over the user's own insight data, with no new trust boundaries, and no security issues found.

Sentinel reviewed 441ffa8 · Review settings

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team November 4, 2026 19:38

@posthog posthog Bot 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.

PostHog Review · Standard · reviewed d0c7c35: 2 Should fix.

This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane (fe:product:mobile)

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

⚠️ Complexity (TypeScript) — 6 functions above the limit (max 29)

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.

Function Location Complexity Limit
ChartPin products/mobile/src/features/views/list/PinCard.tsx:269 29 10
NumberPin products/mobile/src/features/views/list/PinCard.tsx:217 18 10
FullScreenBody products/mobile/src/features/views/fullScreen/FullScreenChart.tsx:117 14 10
MetricChartCanvas products/mobile/src/ui/chart/MetricChartCanvas.tsx:59 13 10
FullScreenChart products/mobile/src/features/views/fullScreen/FullScreenChart.tsx:61 11 10
<anonymous> products/mobile/src/ui/chart/MetricChartRenderer.tsx:289 11 10
✅ 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.

✅ Bundle size — no change

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

Total: 76.45 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.03 MiB · 25 files no change █████████░ 89.7% of 1.14 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.00 MiB · 623 files no change ██████████ 99.0% of 3.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
3.87 MiB · 1,234 files no change ██████████ 96.5% of 4.01 MiB
dashboard scene
src/scenes/dashboard/Dashboard.tsx
7.55 MiB · 2,915 files no change ████████░░ 76.8% of 9.84 MiB
today home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
4.72 MiB · 1,758 files no change ██████████ 95.7% of 4.93 MiB
AI-first home path
src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
5.97 MiB · 2,256 files no change ██████████ 95.3% of 6.27 MiB
events scene
src/scenes/activity/explore/EventsScene.tsx
6.58 MiB · 2,486 files no change ███████░░░ 70.0% of 9.41 MiB
web analytics scene
src/scenes/web-analytics/WebAnalyticsScene.tsx
7.57 MiB · 2,834 files no change ███████░░░ 72.2% of 10.49 MiB
replay detail scene
src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
6.89 MiB · 2,591 files no change ████████░░ 84.8% of 8.13 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 products/product_analytics/frontend/insights/activityDescriptions 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/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/logic/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/kea-test-utils/ 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
🟢 products/product_analytics/frontend/insights/activityDescriptions stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/kea-test-utils/ 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
🟢 src/layout/panel-layout/ProjectTree/menus/SessionReplayMenuItems.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/navigation/projectNoticeLogic.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/navigation/ImpersonationNotice/ImpersonationNotice.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/cohorts/cohortSavedToast.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayShell.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayContextPanelFloating.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodaySidePanel.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayTopBar.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/todayRailItems.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/subscriptions/frontend/components/Subscriptions/exportNudge/exportNudgeLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/billing/paymentEntryLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/conversations/frontend/components/SidePanel/sidepanelTicketsLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/zod/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/authentication/auth/loginLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/authentication/shared/passkeyLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/surveys/constants.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@tiptap/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/prosemirror- stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/re2js/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/react-markdown/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/Command/Command.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 packages/quill/packages/ 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
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/@tiptap/ stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/prosemirror- stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/marked/ stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/frimousse/ stays out of src/scenes/dashboard/Dashboard.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/queries/validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/web-analytics-validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/re2js/ stays out of src/scenes/dashboard/Dashboard.tsx
🟢 node_modules/kea-test-utils/ stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/debug/HogDebug.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/QueryEditor/QueryEditor.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.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
🟢 packages/quill/packages/charts/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/api/primitives.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/notebooks/Notebook/notebookLogic.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/@tiptap/ stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/prosemirror- stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/marked/ stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/frimousse/ stays out of src/scenes/activity/explore/EventsScene.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
🟢 src/queries/validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/web-analytics-validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/re2js/ stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 node_modules/kea-test-utils/ stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/nodes/InsightViz/InsightViz.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/nodes/DataVisualization/DataVisualization.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/nodes/WebOverview/WebOverview.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/debug/HogDebug.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/QueryEditor/QueryEditor.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/@tiptap/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/prosemirror- stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/marked/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/frimousse/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/queries/validators.js stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/re2js/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 node_modules/kea-test-utils/ stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/debug/HogDebug.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/queries/QueryEditor/QueryEditor.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 packages/quill/packages/quill/dist/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/@tiptap/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/prosemirror- stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/marked/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 src/scenes/settings/SettingsMap.tsx stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 @jspm/core/nodelibs/browser/fs stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/re2js/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/kea-test-utils/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 node_modules/d3/src/ stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.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.7 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
4.0 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.9 KiB src/lib/utils/bootTiming.ts
1.7 KiB src/index.tsx
1.7 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.2 KiB src/RootErrorBoundary.tsx
1.1 KiB src/lib/utils/deferredAppContext.ts
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
104.9 KiB src/products.tsx
89.6 KiB src/lib/api.ts
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
41.9 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
36.4 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
28.4 KiB src/lib/constants.tsx
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
104.9 KiB src/products.tsx
89.6 KiB src/lib/api.ts
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
41.9 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
36.4 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
32.3 KiB src/lib/utils/eventUsageLogic.ts
28.4 KiB src/lib/constants.tsx
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
114.5 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/surveys-preview.js
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
96.1 KiB ../packages/quill/packages/components/dist/index.js
89.6 KiB src/lib/api.ts
75.6 KiB src/scenes/dashboard/dashboardLogic.tsx
68.7 KiB src/lib/lemon-ui/icons/icons.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
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
89.6 KiB src/lib/api.ts
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
68.0 KiB ../products/posthog_ai/frontend/logics/runStreamLogic.ts
41.9 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
36.4 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
89.6 KiB src/lib/api.ts
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
68.0 KiB ../products/posthog_ai/frontend/logics/runStreamLogic.ts
41.9 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
41.7 KiB src/scenes/hog-functions/sub-templates/sub-templates.ts
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
96.1 KiB ../packages/quill/packages/components/dist/index.js
89.6 KiB src/lib/api.ts
75.6 KiB src/scenes/dashboard/dashboardLogic.tsx
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
68.0 KiB ../products/posthog_ai/frontend/logics/runStreamLogic.ts
Largest files eagerly shipped from src/scenes/web-analytics/WebAnalyticsScene.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
114.5 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/surveys-preview.js
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
96.1 KiB ../packages/quill/packages/components/dist/index.js
89.6 KiB src/lib/api.ts
75.6 KiB src/scenes/dashboard/dashboardLogic.tsx
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Size File
356.2 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
321.5 KiB ../node_modules/.pnpm/posthog-js@1.445.2_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js
224.1 KiB ../node_modules/.pnpm/@posthog+icons@0.39.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
110.8 KiB ../packages/quill/packages/primitives/dist/index.js
104.9 KiB src/products.tsx
96.1 KiB ../packages/quill/packages/components/dist/index.js
89.6 KiB src/lib/api.ts
68.7 KiB src/lib/lemon-ui/icons/icons.tsx
68.0 KiB ../products/posthog_ai/frontend/logics/runStreamLogic.ts

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

✅ Frontend layers — no new upward imports, 0 removed

Static imports from a lower frontend layer into a higher one (layers, lowest first: kernel, shell, query, features). Compared with the base branch, so an import that a PR also adds to layer-baseline.txt still shows here. Sizes are the source bytes on the eager path of every logged-in page.

Layer Eager source bytes Δ vs base
kernel 2.99 MiB no change
shell 2.39 MiB no change
query 56.4 KiB no change
features 356.2 KiB no change

Download the interactive layer graph for this PR.

Posted automatically by check-layers

✅ Toolbar bundle — eager 2.39 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.39 MiB · 19 files no change ████░░░░░░ 41.7% of 5.72 MiB
Deferred (lazy) 2.12 MiB · 42 files no change 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
962.0 KiB dist/toolbar/toolbar-app-5J4ZE7OG.css
727.8 KiB dist/toolbar/chunk-chunk-AZLVVHPC.js
261.3 KiB dist/toolbar/chunk-chunk-MW4AGEWM.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
130.4 KiB dist/toolbar/chunk-chunk-UDXJR3UI.js
75.7 KiB dist/toolbar/toolbar-app-VHCMCJKZ.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
33.8 KiB dist/toolbar/chunk-chunk-D33KM7K7.js
21.7 KiB dist/toolbar/chunk-chunk-NXSWWO3Y.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 — no change

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

Total: 977.67 MiB · no change

@a-j-bailey

Copy link
Copy Markdown

I think the grouped/stacked toggle could be smaller. Perhaps a simple icon toggle inline with the title or in the page header.

Also, you're maybe already doing it, but the toggle state should likely persist across visits/charts.

@cvolzer3

cvolzer3 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@PostHog review --deep

@posthog

posthog Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@cvolzer3 PostHog Review is reviewing this pull request.

@posthog

posthog Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PostHog Review · Deep · reviewed 9c64d3b

Nothing to post.

Step Status Result
Prepare the diff done 13 files, 2 chunks
Pick perspectives done 2 perspectives
Run review passes done 3 issues
Merge overlapping findings done 3 → 2
Validate findings done 0 kept, 2 dismissed
Publish done Nothing to post

Someone relaxing in a sunny garden

@cvolzer3
cvolzer3 changed the base branch from chris/mobile-triage-app to codex/mobile-ci-api-schema November 4, 2026 20:22
@cvolzer3
cvolzer3 added this pull request to stack #129616 November 4, 2026 20:22
@cvolzer3 cvolzer3 added the stamphog Request AI approval (no full review) label Nov 4, 2026
@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Nov 4, 2026

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

Not approved — this change needs a human reviewer.

Re-add the stamphog label to request another review once you have addressed this.

Both substantive inline concerns from @PostHog remain present despite the later bot discussion reporting no findings. Match placeholder and mounted-chart heights and include calendar dates in hourly pager labels, then re-request review.

  • Author wrote 100% of the modified lines and has 0 merged PRs in these paths (familiarity STRONG).
  • @PostHog, products/mobile/src/ui/chart/MetricChartCanvas.tsx: The placeholder-height concern remains unfixed. Paged inline canvases add a 44-point pager without reducing the chart height, while MetricChartPlaceholder reserves only chartHeight; MetricChart swaps between these components as canvas slots change.
  • @PostHog, products/mobile/src/ui/chart/ChartDatePager.tsx: The hourly-label concern remains unfixed. Pager endpoints still use formatAxisDate, whose hourly branch returns only a clock time, leaving multi-day windows without calendar dates.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 533L, 12F substantive, 608L/16F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (608L, 16F, single-area, fix)
stamphog 2.7.0 .stamphog/policy.yml @ 6bc4df2 · reviewed head 6bc4df2

@cvolzer3
cvolzer3 removed this pull request from stack #129616 November 4, 2026 21:07
@cvolzer3
cvolzer3 changed the base branch from codex/mobile-ci-api-schema to master November 4, 2026 21:08
@trunk-io

trunk-io Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

cvolzer3 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

resolved

Original feedback

@github-actions github-actions Bot added the feature/agent-infra Feature Tag: Agent infra label Nov 4, 2026
@hosthog

hosthog Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

HostHog preview — storybook-quill

The previews for this PR have been torn down and no longer serve.

@posthog posthog Bot 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.

PostHog Review · Standard · reviewed 9a76c5b: 6 Must fix, 4 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.

Comment thread products/mobile/src/auth/authStore.ts Resolved
Comment thread products/mobile/src/auth/authStore.ts Resolved
Comment thread products/mobile/src/api/query.ts Resolved
Apply chart paging and saved bar layouts to the current mobile app, preserving its theme, scrolling header, and small-bar rendering. The mobile CI prerequisites already exist on master.
@cvolzer3
cvolzer3 force-pushed the codex/mobile-readable-bar-charts branch from 9a76c5b to 441ffa8 Compare November 4, 2026 21:24
@github-actions github-actions Bot removed the feature/agent-infra Feature Tag: Agent infra label Nov 4, 2026
@cvolzer3 cvolzer3 added the stamphog Request AI approval (no full review) label Nov 4, 2026

@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 mobile presentation changes with focused test coverage; no concrete unresolved review concerns or showstoppers are evidenced. Trusted context reports a clean current-head review and STRONG author familiarity.

  • Author wrote 100% of the modified lines and has 27 merged PRs in these paths (familiarity STRONG).
  • PostHog Review (Standard) reviewed the current head: no findings.
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 510L, 12F substantive, 644L/17F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1d-complex (644L, 17F, single-area, fix)
stamphog 2.7.0 .stamphog/policy.yml @ 441ffa8 · reviewed head 441ffa8

@veria-ai veria-ai Bot 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.

These findings couldn't be attached to lines in the diff:


products/mobile/package.json:76

Medium: Vulnerable Markdown parser is reachable

This dependency resolves to markdown-it@10.0.0, affected by CVE-2022-21670; saved and streamed assistant replies reach its newline rule through ChatMarkdown, despite HTML, linkify, and typographer being disabled. (github.com) I reproduced a roughly 6.5-second synchronous parse for an 80 KB crafted whitespace pattern with those options in Node; upgrade or override the parser to a maintained patched release and regenerate the lockfile.


products/mobile/app.config.ts:141

Medium: Missing app-owned signing for OTA updates

Production builds enable OTA updates without an app-owned code-signing certificate, leaving no independent signature check for downloaded JavaScript if the update-publishing account or service is compromised. Add updates.codeSigningCertificate and codeSigningMetadata, embed the public certificate in a new native build, and keep the signing private key separate from Expo publishing credentials. (docs.expo.dev)


products/mobile/modules/hedgehog-widget/android/src/main/AndroidManifest.xml:5

Low: Widget receiver is unnecessarily exported

HedgehogWidgetProvider accepts HEDGEHOG_ADVANCE without checking the sender and synchronously rebuilds the widget's RemoteViews, unnecessarily exposing that work to unrelated installed apps. Make the receiver non-exported: system broadcasts remain supported, and the app-created PendingIntents still deliver widget taps under the app's identity. (developer.android.com)

      android:exported="false"

products/mobile/src/lib/posthogClient.ts:45

Medium: Launch URLs bypass analytics redaction

The resolved posthog-react-native 4.78.4 sends Linking.getInitialURL() as Application Opened.url, so a cold-start OAuth callback sends its code and state parameters to analytics despite deepLinkKind reducing the explicit event to a fixed enum. (raw.githubusercontent.com) Disable lifecycle autocapture or sanitize its URL property at the SDK boundary before events are stored or sent.

        captureAppLifecycleEvents: false,

products/mobile/src/features/views/viewHooks.ts:129

Medium: Held snapshots outlive their data scope

last.current is not invalidated when the session or project changes, and both screen hooks return it as successful data while the newly scoped cache is empty; clearing or resetting the query cache cannot clear this React ref. A route retained in the navigation stack can therefore display the previous account's or project's analytics after a switch, until a replacement value or error arrives.

Reset held snapshots, including the similar lastBase fallback, when the session, host, project, or view changes; only preserve them across range changes within the same boundary.

@veria-ai

veria-ai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

The PR improves the readability of crowded bar charts on mobile and includes changes to mobile dependencies and the Android widget manifest.

Three issues have been addressed, with two still open. Assistant replies reach a vulnerable Markdown parser, where crafted content can cause prolonged synchronous parsing and potentially stall the interface. An exported Android widget receiver also allows unrelated installed apps to trigger widget rebuilds without sender validation.

Open issues (2)

  • Medium: Vulnerable Markdown parser is reachable — products/mobile/package.json:76
  • Low: Widget receiver is unnecessarily exported — products/mobile/modules/hedgehog-widget/android/src/main/AndroidManifest.xml:5

Fixed/addressed: 3 · PR risk: 5/10

@trunk-io
trunk-io Bot merged commit ca178d7 into master Nov 4, 2026
249 of 250 checks passed
@trunk-io
trunk-io Bot deleted the codex/mobile-readable-bar-charts branch November 4, 2026 22:23
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-04 22:49 UTC Run
prod-us ✅ Deployed 2026-11-04 23:06 UTC Run
prod-eu ✅ Deployed 2026-11-04 23:04 UTC Run

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

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants