trunk-merge/pr-110577/56ee41a8-8fe4-496e-9337-16a1f3bc1f32 - #110952
trunk-io[bot] wants to merge 78 commits into
Conversation
Rebuild the BI worksheet around a Tableau-style layout: a data pane of dimensions and measures, filters and marks cards, rows and columns pill shelves above the view, a "Show me" chart picker, and a toolbar with swap, quick sort, and auto-update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button opened the Fundamentals tab, which is behind the METRICS_FUNDAMENTALS flag. Without the flag, the scene fell back to the overview tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Removes the Fundamentals tab, its logic, the /metrics/explain/ action with its diagnostics and fundamentals modules, the metrics-fundamentals flag constants, and the MCP tool entry. Regenerates the API types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Generated-By: PostHog Desktop Task-Id: 5a2b9f43-13fb-4aca-b9f3-a249aa554c8d
Direct-mint sites each built an OAuthAccessToken row by hand: generate the token value, compute expiry from now, set scope and team pinning. Copies of security-sensitive code drift, and new callers (WebMCP is next) would add one more. `mint_oauth_access_token` in posthog/models/oauth.py now owns that, next to the model and the other token lookups, so products can import it without reaching into posthog.temporal. - Move the sandbox/wizard run mint in posthog/temporal/oauth.py and both streamlit_apps mints (iframe and bridge) onto the helper. - No behavior change: same token format, scope strings, lifetimes and scoped_teams; sandbox_task_id stays null where it was not set. - Leave the authorization-code/refresh flows (oauth views, agentic and Stripe provisioning, Stripe integration, generate_stripe_app_tokens) alone. They pair the access token with a refresh token, rotate rows, or take values from oauthlib, so they stay explicit.
2 updated Run: 92718009-080f-48a1-bb19-8fc805c612cd Co-authored-by: mariusandra <53387+mariusandra@users.noreply.github.com>
The canvas runtime now sends the client rect of the clicked highlight line with comment-activate. The field is optional, so builds made before this change stay valid. The web host moves the rect into page coordinates and passes it to onCommentActivate. The web sandbox document is regenerated from the runtime source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
A click on a highlight opens the thread in a popover at that line. A new comments menu in the canvas header lists every thread. The Comments side panel tab is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
A click on a text highlight or an image pin opens the thread in a popover next to it. The comments button opens a menu with comments on the whole file and a list of every thread. The comments side panel is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
Add products/autoresearch/backend/** to the selfDriving container-image path filter, and keep it in generalPurpose while both workers register autoresearch. Include the clipped capture error_description in the InferenceRunError for a failed or partial prediction emit, so a transport failure records the underlying exception text. Closes #110837 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 738aed62-67b4-4867-adb2-40a71130ad17
CI runs Kea typegen and then checks for a clean tree. The hand-written activateThread type used CanvasRect where typegen writes the object shape, so the schema diff checks failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: b999fc3e-c145-4e0e-9851-6ef273201d04
2 updated Run: 30eba949-dfb9-45e9-aa26-8893df928672 Co-authored-by: mariusandra <53387+mariusandra@users.noreply.github.com>
A requests transport error starts with the target host and ends with the cause, such as the errno. The head-only clip cut the cause, so a refused connection and a failed DNS lookup gave the same run error. The clip now keeps the start and the end of the description inside the same 200-character limit. The emit-failure test now uses a requests-style refused-connection message and checks that the errno survives the clip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 30cf875e-5854-447b-b60d-3fdb1f89e4c3
…er (#110771) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The services query scanned every series-hour row of the last day. The services_by_hour projection on metrics4_series holds the same rollup per team, hour and service, but the query shape kept ClickHouse from using it. The query now filters on time_bucket, counts series with uniq, and aggregates the bare last_seen column with convertToProjectTimezone off, converting to UTC outside max(). metric_series exposes time_bucket for the filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 3538a544-5668-418a-aebd-c3430d18864a
The overview test now runs the services query with force_optimize_projection, so ClickHouse rejects the query when the projection is not used. HogQL settings accept the new field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 3538a544-5668-418a-aebd-c3430d18864a
The Data Ops scene no longer has a data quality tab, so /data-ops?tab=data-quality falls back to the default tab and the spec timed out waiting for the check controls. The same overview still renders on the Models scene, so the test navigates there instead and only needs the data quality checks flag. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 789f88f8-021d-4728-8b98-92c94b145315
A cited PostHog object in the task Artifacts tab now shows its own app page in a same-origin frame, for every object kind that has a page. The frame keeps the page's URL and navigation apart from the task page. A frame named posthog-embedded-page puts the app in a new embedded navigation mode, which renders the scene without the navigation, command palette or floating buttons. The per-kind insight, SQL, dashboard and replay embeds are gone, and a kind with no page keeps the card. The app CSP frame-ancestors now includes 'self', because the app could not frame its own pages before. Events captured in the frame carry embedded_page_frame: true. Also fixes the app failing to start when Django sends null bootstrap flags, which happens when it cannot evaluate flags locally and a last-seen flag cache exists. Generated-By: PostHog Desktop Task-Id: e2367959-ab88-40ff-8761-5632645167aa
The cited-object frame now has a sandbox attribute. It keeps the app's origin, scripts, forms and new tabs, and it cannot navigate the task page. Events from the frame get embedded_page_frame per event through before_send. register() persisted the property in storage the main window shares, so it marked the user's ordinary events too. 'self' moves out of app_frame_ancestor_sources() and onto the app policy only. The canvas sandbox document on the user-content origin shares that list, so its policy stays as it was. Generated-By: PostHog Desktop Task-Id: e2367959-ab88-40ff-8761-5632645167aa
The embed is keyed by its page URL instead of the artifact id, so the loading state starts over for any new page the frame shows. Generated-By: PostHog Desktop Task-Id: e2367959-ab88-40ff-8761-5632645167aa
Resolve the SOURCES.md conflict with master while preserving both newly registered AWS sources.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (29)📝 WalkthroughWalkthroughThe pull request adds a BI worksheet editor, task new-session routes, embedded artifact previews, canvas comment menus and popovers, and an AWS Inspector warehouse source. It also changes AI provider timeout, retry, and stream cleanup handling; adds optional autoresearch report-notebook support; removes the metrics Fundamentals feature; and updates Meta Ads retries, OAuth token creation, and several smaller UI and query behaviors. Priority: ➖ Normal 🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
Full details: Description checkExplanation The description only contains Trunk Merge batch metadata, dependencies, and automatic-close details. It omits the required Problem, Changes, testing and test rationale, Release status, notifications, Docs update, and Agent context sections, so it does not explain the substantial user-visible changes in the batch. Resolution Replace or augment the autogenerated text with the repository template. Describe the problem and user-visible changes, identify mechanical changes, include screenshots or state why they are not applicable, document automated tests and test rationale without claiming unrun checks, select exactly one release-status option, complete notifications and docs fields, and add Agent context when applicable. Retain the Trunk batch links as supplemental context rather than the main description body.
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (3)
products/canvas/frontend/scene/CanvasScene.stories.tsx-232-242 (1)
232-242: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winThe
playfunction clicks the menu again on everywaitForretry.
waitForreruns the callback until the callback passes. The second click toggles the popover closed. The story can then time out or capture a flaky snapshot. Wait for the menu button first. Click the button once. Then wait for the thread row.Proposed fix
- await waitFor( - async () => { - const menu = canvasElement.querySelector<HTMLElement>('[data-attr="canvas-comments-menu"]') - expect(menu).not.toBeNull() - await userEvent.click(menu!) - expect(document.querySelector('[data-attr="canvas-comments-menu-thread"]')).not.toBeNull() - }, - { timeout: 15_000 } - ) + const menu = await waitFor( + () => { + const el = canvasElement.querySelector<HTMLElement>('[data-attr="canvas-comments-menu"]') + expect(el).not.toBeNull() + return el! + }, + { timeout: 15_000 } + ) + await userEvent.click(menu) + await waitFor(() => + expect(document.querySelector('[data-attr="canvas-comments-menu-thread"]')).not.toBeNull() + )products/canvas/frontend/sidePanel/comments/CanvasCommentThreadPopover.tsx-21-53 (1)
21-53: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winThe popover does not return focus when it closes.
The effect moves focus into the dialog when it opens. Focus is not restored when the dialog closes through Escape, an outside click, or the close button. The dialog then unmounts, so focus falls back to
document.body. A keyboard user who opened the dialog from the comments menu loses their position in the toolbar. Storedocument.activeElementbefore you focus the dialog, and restore it in the cleanup.Proposed fix
- ref.current?.focus({ preventScroll: true }) + const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null + ref.current?.focus({ preventScroll: true }) @@ return () => { window.removeEventListener('keydown', onKeyDown) window.removeEventListener('blur', close) window.removeEventListener('resize', close) document.removeEventListener('pointerdown', onPointerDown) + if (previouslyFocused?.isConnected && ref.current?.contains(document.activeElement)) { + previouslyFocused.focus({ preventScroll: true }) + } }Based on learnings: "verify that focus is programmatically managed (e.g., ... returned to trigger element on close)".
Source: Learnings
frontend/src/scenes/data-warehouse/editor/bi/biEditorLogic.ts-141-148 (1)
141-148: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
moveFieldInConfigdeletes the field when the destination rejects it.
moveFieldInConfigremoves the field from the source shelf. It then callsaddFieldToConfig.addFieldToConfigreturns its input unchanged in two cases:
- The destination shelf already holds the same
field.id. This applies torows/columnsand to a matching filter.- The field is incompatible with the source.
Rows and columns check duplicates only within their own shelf. The same field can therefore sit on both shelves. In that state, "Move to columns" or a pill drag from rows to columns removes the pill and adds nothing. "Convert to dimension" fails the same way when rows already holds that field. A drop onto filters fails the same way when a matching filter exists.
If the add is rejected, return the original config.
🐛 Proposed fix
- return addFieldToConfig(removeFieldFromConfig(config, fromShelf, fromIndex), field, toShelf) + const removed = removeFieldFromConfig(config, fromShelf, fromIndex) + const moved = addFieldToConfig(removed, field, toShelf) + // addFieldToConfig returns its input when the destination rejects the field; keep the pill where it was + return moved === removed ? config : moved
🧹 Nitpick comments (3)
products/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/aws_inspector.py (1)
192-210: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueClose the client when payload construction fails.
AwsInspectorClientis created at Line 192. Thetry/finallythat closes it starts at Line 198. Ifrequest_payloadraises before Line 198, the session stays open. The current helper does not raise, so the impact is low. Create the client right before the guarded request to make the close path complete.♻️ Proposed fix
- try: - client = AwsInspectorClient(config, api_version) - except ValueError as error: - return False, str(error) payload = request_payload(endpoint) if endpoint.page_size is not None: payload["maxResults"] = 1 + try: + client = AwsInspectorClient(config, api_version) + except ValueError as error: + return False, str(error) try:frontend/src/layout/today/todaySpacesLogic.ts (1)
83-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a unit test for
spaceIdForPath.The function has branching logic: project-ID stripping, the
newexclusion, and trailing segments such as/spaces/:id/new. The newtodaySpacesLogiclisteners depend on it. A parameterised test with these inputs covers it:
/spaces/abc/project/1/spaces/abc/new/spaces/new/spaces/tasksSource: Path instructions
frontend/src/scenes/data-warehouse/editor/sqlEditorLogic.test.ts (1)
2564-2609: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueParameterized chart-only test mixes a conditional assertion with a mock-restore pattern that can leak state on setup failure.
dataLogic.mount()andjest.spyOn(logic.actions, 'runQuery')run before thetryblock. If setup throws, for example insetResponse,dataLogicandbiLogicstay mounted. They also stay mounted ifjest.spyOnthrows. Fake timers are enabled inside thetry, so they are safe. Move all mounts and spies inside thetry, or useafterEachcleanup. This prevents cross-test leakage in thetest.eachcases.Source: Path instructions
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
Review profile: QUIET
Plan: Enterprise
Run ID: 019b5cd9-c78e-4d0c-bf3c-c1806ba1e068
⛔ Files ignored due to path filters (8)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlproducts/autoresearch/frontend/generated/api.schemas.tsis excluded by!**/generated/**products/autoresearch/frontend/generated/api.zod.tsis excluded by!**/generated/**products/metrics/frontend/generated/api.schemas.tsis excluded by!**/generated/**products/metrics/frontend/generated/api.tsis excluded by!**/generated/**products/metrics/frontend/generated/api.zod.tsis excluded by!**/generated/**services/mcp/src/generated/autoresearch/api.tsis excluded by!**/generated/**services/mcp/src/tools/generated/autoresearch.tsis excluded by!**/generated/**
📒 Files selected for processing (171)
.github/workflows/container-images-cd.ymldocs/internal/ai-observability-judge-inputs.mdee/hogai/utils/asgi.pyee/hogai/utils/test/test_asgi.pyfrontend/snapshots.ymlfrontend/src/layout/navigation-3000/Navigation.tsxfrontend/src/layout/navigation-3000/navigationLogic.tsxfrontend/src/layout/navigation-3000/sidepanel/SidePanel.tsxfrontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsxfrontend/src/layout/today/TodaySpaceActions.tsxfrontend/src/layout/today/TodaySpacesSidebar.tsxfrontend/src/layout/today/todaySpacesLogic.tsfrontend/src/lib/constants.tsxfrontend/src/lib/utils/embeddedPageFrame.tsfrontend/src/loadPostHogJS.tsxfrontend/src/productScenes.tsxfrontend/src/products.tsxfrontend/src/queries/nodes/DataNode/dataNodeLogic.tsfrontend/src/scenes/AuthenticatedShell.tsxfrontend/src/scenes/data-warehouse/editor/QueryWindow.tsxfrontend/src/scenes/data-warehouse/editor/SQLEditor.tsxfrontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsxfrontend/src/scenes/data-warehouse/editor/bi/BIEditor.tsxfrontend/src/scenes/data-warehouse/editor/bi/biEditorLogic.tsfrontend/src/scenes/data-warehouse/editor/bi/biEditorOptions.tsxfrontend/src/scenes/data-warehouse/editor/bi/biEditorTypes.test.tsfrontend/src/scenes/data-warehouse/editor/bi/biEditorTypes.tsfrontend/src/scenes/data-warehouse/editor/bi/components/BIDataPane.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIExpressionPopover.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIFieldPill.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIFilterEditor.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIFilterPill.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIFiltersCard.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIMarksCard.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIPill.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIShelfCard.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIShelfDropTarget.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIShelfStrip.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIShowMe.tsxfrontend/src/scenes/data-warehouse/editor/bi/components/BIToolbar.tsxfrontend/src/scenes/data-warehouse/editor/editorSizingLogic.tsxfrontend/src/scenes/data-warehouse/editor/sqlEditorLogic.test.tsfrontend/src/scenes/data-warehouse/editor/sqlEditorLogic.tsxfrontend/src/scenes/project-homepage/today/Today.stories.tsxfrontend/src/scenes/project-homepage/today/TodayHomeSidebar.tsxfrontend/src/scenes/project-homepage/today/todayAskPrompt.tsfrontend/src/scenes/project-homepage/today/todayLogic.test.tsfrontend/src/scenes/sceneTypes.tsfrontend/src/types.tsplaywright/e2e/data-quality-overview.spec.tsposthog/api/streaming.pyposthog/api/test/test_streaming.pyposthog/csp_middleware.pyposthog/hogql/constants.pyposthog/hogql/database/schema/metrics.pyposthog/models/oauth.pyposthog/temporal/ai_observability/evaluation_llm_judge.pyposthog/temporal/ai_observability/run_tagger.pyposthog/temporal/ai_observability/test_run_evaluation.pyposthog/temporal/ai_observability/test_run_tagger.pyposthog/temporal/common/posthog_client.pyposthog/temporal/oauth.pyposthog/test/test_csp_middleware.pyproducts/ai_observability/backend/api/proxy.pyproducts/ai_observability/backend/api/test/test_proxy.pyproducts/ai_observability/backend/llm/errors.pyproducts/ai_observability/backend/llm/providers/_diagnostics.pyproducts/ai_observability/backend/llm/providers/azure_openai.pyproducts/ai_observability/backend/llm/providers/openai.pyproducts/ai_observability/backend/llm/providers/openai_compatible.pyproducts/ai_observability/backend/llm/providers/test/test_azure_openai.pyproducts/ai_observability/backend/llm/providers/test/test_openai_compatible.pyproducts/ai_observability/backend/llm/system_one.pyproducts/autoresearch/backend/access.pyproducts/autoresearch/backend/facade/api.pyproducts/autoresearch/backend/facade/contracts.pyproducts/autoresearch/backend/inference/scoring.pyproducts/autoresearch/backend/inference/test_inference.pyproducts/autoresearch/backend/presentation/views/serializers.pyproducts/autoresearch/backend/presentation/views/views.pyproducts/autoresearch/backend/training/AGENTS.mdproducts/autoresearch/backend/training/promotion.pyproducts/autoresearch/backend/training/runner.pyproducts/autoresearch/backend/training/test_promotion.pyproducts/autoresearch/backend/training/test_training.pyproducts/autoresearch/mcp/tools.yamlproducts/canvas/backend/sandbox/sandbox_document.htmlproducts/canvas/frontend/canvasAnalytics.tsproducts/canvas/frontend/host/BuiltCanvas.tsxproducts/canvas/frontend/host/DraftCanvas.tsxproducts/canvas/frontend/host/canvasHostMessageRouter.test.tsproducts/canvas/frontend/host/canvasHostMessageRouter.tsproducts/canvas/frontend/host/canvasProtocol.tsproducts/canvas/frontend/scene/CanvasHostFrame.tsxproducts/canvas/frontend/scene/CanvasScene.stories.tsxproducts/canvas/frontend/scene/CanvasScene.tsxproducts/canvas/frontend/scene/CanvasSceneHeader.tsxproducts/canvas/frontend/sidePanel/CanvasSidePanel.tsxproducts/canvas/frontend/sidePanel/CanvasSidePanelTabBody.tsxproducts/canvas/frontend/sidePanel/canvasPanelTabs.tsproducts/canvas/frontend/sidePanel/comments/CanvasCommentThreadCard.tsxproducts/canvas/frontend/sidePanel/comments/CanvasCommentThreadPopover.tsxproducts/canvas/frontend/sidePanel/comments/CanvasCommentsMenu.tsxproducts/canvas/frontend/sidePanel/comments/CanvasCommentsTab.tsxproducts/canvas/frontend/sidePanel/comments/canvasCommentThreads.tsproducts/canvas/frontend/sidePanel/comments/canvasCommentsLogic.tsproducts/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsxproducts/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.tsproducts/desktop/packages/core/src/canvas/freeformSchemas.tsproducts/desktop/packages/ui/src/features/canvas/freeform/sandboxRuntime.tsproducts/metrics/backend/diagnostics.pyproducts/metrics/backend/facade/api.pyproducts/metrics/backend/facade/contracts.pyproducts/metrics/backend/fundamentals.pyproducts/metrics/backend/metrics_overview_query_runner.pyproducts/metrics/backend/presentation/api.pyproducts/metrics/backend/tests/conftest.pyproducts/metrics/backend/tests/test_api.pyproducts/metrics/backend/tests/test_diagnostics.pyproducts/metrics/backend/tests/test_fundamentals.pyproducts/metrics/backend/tests/test_metrics_overview_query_runner.pyproducts/metrics/frontend/MetricsScene.tsxproducts/metrics/frontend/components/MetricsClauseRow.tsxproducts/metrics/frontend/components/MetricsFundamentals.tsxproducts/metrics/frontend/components/metricsFundamentalsLogic.test.tsproducts/metrics/frontend/components/metricsFundamentalsLogic.tsxproducts/metrics/frontend/components/metricsHandoff.test.tsproducts/metrics/frontend/components/metricsOverviewLogic.test.tsproducts/metrics/frontend/metricsSceneLogic.tsxproducts/metrics/mcp/tools.yamlproducts/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/TaskRunArtifacts.stories.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentActions.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentThreadCard.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsMenu.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsPanel.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactImagePins.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactInlineThread.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactObjectEmbed.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactTextAnnotations.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunArtifacts.tsxproducts/posthog_ai/frontend/scenes/TaskTracker/taskArtifactCommentsLogic.tsproducts/posthog_ai/frontend/scenes/TaskTracker/taskRunArtifacts.tsproducts/streamlit_apps/backend/logic/oauth.pyproducts/tasks/frontend/spaces/NewSessionScene.tsxproducts/tasks/frontend/spaces/NewSessionSpaceSelect.tsxproducts/tasks/frontend/spaces/SpaceScene.tsxproducts/tasks/frontend/spaces/SpaceTaskComposer.tsxproducts/tasks/frontend/spaces/SpaceTaskComposerSkeleton.tsxproducts/tasks/frontend/spaces/newSessionSceneLogic.test.tsproducts/tasks/frontend/spaces/newSessionSceneLogic.tsproducts/tasks/frontend/spaces/spaceSceneLogic.test.tsproducts/tasks/frontend/spaces/spaceSceneLogic.tsproducts/tasks/manifest.tsxproducts/tasks/package.jsonproducts/warehouse_sources/backend/temporal/data_imports/sources/SOURCES.mdproducts/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/aws_inspector.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/canonical_descriptions.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/settings.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/source.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/aws_inspector/tests/test_aws_inspector.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/awsinspector.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/meta_ads.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/source.pyproducts/warehouse_sources/backend/temporal/data_imports/sources/meta_ads/test_meta_ads.pyservices/mcp/schema/generated-tool-definitions.jsonservices/mcp/schema/tool-definitions-all.jsonservices/mcp/src/api/generated.tsservices/mcp/src/tools/links/app-url-manifest.jsonservices/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.jsontach.toml
💤 Files with no reviewable changes (20)
- products/metrics/mcp/tools.yaml
- frontend/src/lib/constants.tsx
- products/posthog_ai/frontend/scenes/TaskTracker/components/ArtifactCommentsPanel.tsx
- products/metrics/frontend/components/MetricsFundamentals.tsx
- products/metrics/backend/tests/test_fundamentals.py
- products/data_warehouse/frontend/scenes/DataOpsScene/DataWarehouseScene.tsx
- products/canvas/frontend/sidePanel/comments/CanvasCommentsTab.tsx
- products/metrics/backend/diagnostics.py
- products/metrics/backend/tests/test_api.py
- products/metrics/frontend/components/metricsFundamentalsLogic.test.ts
- products/canvas/frontend/sidePanel/CanvasSidePanelTabBody.tsx
- products/metrics/frontend/components/metricsOverviewLogic.test.ts
- products/metrics/backend/tests/test_diagnostics.py
- products/metrics/backend/facade/contracts.py
- frontend/src/types.ts
- products/metrics/backend/facade/api.py
- products/metrics/frontend/components/metricsFundamentalsLogic.tsx
- products/metrics/backend/presentation/api.py
- products/metrics/backend/fundamentals.py
- products/data_warehouse/frontend/scenes/DataOpsScene/dataWarehouseSceneLogic.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 0 remain after this review.
| toTimeZone(max(max(last_seen)) OVER (), 'UTC') AS total_last_seen_at | ||
| FROM posthog.metric_series | ||
| WHERE last_seen > now() - {lookback} | ||
| WHERE time_bucket >= toStartOfHour(toTimeZone(now() - {lookback}, 'UTC')) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Preserve the requested lookback cutoff.
When the cutoff falls within an hour, this predicate includes series last seen earlier in that hour. For example, a 12:45 cutoff includes a series last seen at 12:05 because its time_bucket is 12:00. The overview then overstates service and series counts. Keep the hourly predicate for projection pruning, but apply the exact last_seen cutoff when counting series.
|
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the master branch at SHA 662ed11756653c2f52b855a01ee19a0c13b23faa.
See more details about each PR in the batch here:
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing a batch with the changes from pull requests 110577, 110908, and 108850 - batching documentation.
Pull request 110577 is stacked on pull request 110829, whose changes are included here and will be merged with it.
Dependencies
This pull request depends on the changes from pull requests 110856, 110579, 110905, 110273, 110906, 110347, 110601, 110801, 110830, 110789, 110415, and 110160.