diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml index 9f9c05dfcbbda..ad78157702546 100644 --- a/.github/workflows/container-images-cd.yml +++ b/.github/workflows/container-images-cd.yml @@ -98,10 +98,10 @@ jobs: - name: Check for changes in plugins directory id: check_changes_plugins run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep '^plugin-server/' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -q '^plugin-server/' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Ingestion Cloud deployment - if: steps.check_changes_plugins.outputs.changed != '' + if: steps.check_changes_plugins.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }} @@ -116,10 +116,10 @@ jobs: - name: Check for changes that affect batch exports temporal worker id: check_changes_batch_exports_temporal_worker run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -qE '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Batch Exports Temporal Worker Cloud deployment - if: steps.check_changes_batch_exports_temporal_worker.outputs.changed != '' + if: steps.check_changes_batch_exports_temporal_worker.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }} @@ -135,10 +135,10 @@ jobs: - name: Check for changes that affect data warehouse temporal worker id: check_changes_data_warehouse_temporal_worker run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -qE '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Data Warehouse Temporal Worker Cloud deployment - if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed != '' + if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }} diff --git a/cypress/e2e/systemStatus.cy.ts b/cypress/e2e/systemStatus.cy.ts index 61a0d17acada8..e3e49b6768dc0 100644 --- a/cypress/e2e/systemStatus.cy.ts +++ b/cypress/e2e/systemStatus.cy.ts @@ -2,7 +2,7 @@ import { urls } from 'scenes/urls' describe('System Status', () => { it('System Status loaded', () => { - cy.location('pathname').should('eq', urls.savedInsights()) + cy.location('pathname').should('eq', '/project/1/insights') cy.wait(500) cy.get('[data-attr=menu-item-me]').click() cy.get('[data-attr=system-status-badge]').click() diff --git a/frontend/__snapshots__/scenes-app-apps--installed--dark.png b/frontend/__snapshots__/scenes-app-apps--installed--dark.png index 46d9b6ac0f584..951b1068bb7fc 100644 Binary files a/frontend/__snapshots__/scenes-app-apps--installed--dark.png and b/frontend/__snapshots__/scenes-app-apps--installed--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-apps--installed--light.png b/frontend/__snapshots__/scenes-app-apps--installed--light.png index b9be95598c8c5..c2f105784ea76 100644 Binary files a/frontend/__snapshots__/scenes-app-apps--installed--light.png and b/frontend/__snapshots__/scenes-app-apps--installed--light.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark--webkit.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark--webkit.png index f998c5f040fd0..fecccc919915f 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark--webkit.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png index 2a87f72cafd98..c6b98a58f4942 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light--webkit.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light--webkit.png index e676a048434c7..ce3d83527b233 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light--webkit.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light--webkit.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light.png index 66f315769be98..28cf1dd94717a 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--light.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png index 423710832ea6b..1dada10c77fdf 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png index 8278339368b0d..88700b33dffe0 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png differ diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx index 262c2dbde3724..6d3c0410daca8 100644 --- a/frontend/src/layout/navigation-3000/navigationLogic.tsx +++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx @@ -15,13 +15,14 @@ import { IconTestTube, IconToggle, } from '@posthog/icons' -import { lemonToast } from '@posthog/lemon-ui' +import { lemonToast, Spinner } from '@posthog/lemon-ui' import { captureException } from '@sentry/react' import { actions, connect, events, kea, listeners, path, props, reducers, selectors } from 'kea' import { router } from 'kea-router' import { subscriptions } from 'kea-subscriptions' import { FEATURE_FLAGS } from 'lib/constants' import { IconPlusMini } from 'lib/lemon-ui/icons' +import { LemonMenuOverlay } from 'lib/lemon-ui/LemonMenu/LemonMenu' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { isNotNil } from 'lib/utils' import React from 'react' @@ -29,6 +30,8 @@ import { sceneLogic } from 'scenes/sceneLogic' import { Scene } from 'scenes/sceneTypes' import { urls } from 'scenes/urls' +import { dashboardsModel } from '~/models/dashboardsModel' + import { navigationLogic } from '../navigation/navigationLogic' import type { navigation3000LogicType } from './navigationLogicType' import { dashboardsSidebarLogic } from './sidebars/dashboards' @@ -312,8 +315,12 @@ export const navigation3000Logic = kea([ (isNavCollapsedDesktop, mobileLayout): boolean => !mobileLayout && isNavCollapsedDesktop, ], navbarItems: [ - () => [featureFlagLogic.selectors.featureFlags], - (featureFlags): NavbarItem[][] => { + () => [ + featureFlagLogic.selectors.featureFlags, + dashboardsModel.selectors.dashboardsLoading, + dashboardsModel.selectors.pinnedDashboards, + ], + (featureFlags, dashboardsLoading, pinnedDashboards): NavbarItem[][] => { const isUsingSidebar = featureFlags[FEATURE_FLAGS.POSTHOG_3000_NAV] return [ [ @@ -329,6 +336,30 @@ export const navigation3000Logic = kea([ icon: , logic: isUsingSidebar ? dashboardsSidebarLogic : undefined, to: isUsingSidebar ? undefined : urls.dashboards(), + sideAction: { + identifier: 'pinned-dashboards-dropdown', + dropdown: { + overlay: ( + ({ + label: dashboard.name, + to: urls.dashboard(dashboard.id), + })), + footer: dashboardsLoading && ( +
+ Loading… +
+ ), + }, + ]} + /> + ), + placement: 'bottom-end', + }, + }, }, { identifier: Scene.Notebooks, diff --git a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx index 85855e28b739a..b28915a8babe4 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx @@ -17,6 +17,7 @@ import { SidePanelActivation, SidePanelActivationIcon } from './panels/SidePanel import { SidePanelDocs } from './panels/SidePanelDocs' import { SidePanelFeaturePreviews } from './panels/SidePanelFeaturePreviews' import { SidePanelSettings } from './panels/SidePanelSettings' +import { SidePanelStatus, SidePanelStatusIcon } from './panels/SidePanelStatus' import { SidePanelSupport } from './panels/SidePanelSupport' import { SidePanelWelcome } from './panels/SidePanelWelcome' import { sidePanelLogic } from './sidePanelLogic' @@ -71,6 +72,11 @@ export const SIDE_PANEL_TABS: Record diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelStatus.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelStatus.tsx new file mode 100644 index 0000000000000..371b63cc013b7 --- /dev/null +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelStatus.tsx @@ -0,0 +1,68 @@ +import { IconCloud, IconExternal } from '@posthog/icons' +import { LemonButton, Tooltip } from '@posthog/lemon-ui' +import clsx from 'clsx' +import { useActions, useValues } from 'kea' +import { IconWithBadge } from 'lib/lemon-ui/icons' +import { useState } from 'react' + +import { SidePanelPaneHeader } from '../components/SidePanelPaneHeader' +import { sidePanelLogic } from '../sidePanelLogic' +import { SidePanelDocsSkeleton } from './SidePanelDocs' +import { sidePanelStatusLogic, STATUS_PAGE_BASE } from './sidePanelStatusLogic' + +export const SidePanelStatusIcon = (props: { className?: string }): JSX.Element => { + const { status, statusPage } = useValues(sidePanelStatusLogic) + + let title = statusPage?.status.description + if (statusPage?.status.description === 'All Systems Operational') { + title = 'All systems operational' // Sentence-case Statuspage.io default message, which can't be changed + } + + return ( + + + + + + + + ) +} + +export const SidePanelStatus = (): JSX.Element => { + const { closeSidePanel } = useActions(sidePanelLogic) + const [ready, setReady] = useState(false) + + return ( + <> + +
+ } + targetBlank + // We can't use the normal `to` property as that is intercepted to open this panel :D + onClick={() => { + window.open(STATUS_PAGE_BASE, '_blank')?.focus() + closeSidePanel() + }} + > + Open in new tab + + +
+