:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(logs): drop redundant sort + timezone controls from results bar (#67082)
Jon McCallum39bd8781c718
diff --git a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsxindex 16e441ae87ca..ace4678db3c1 100644--- a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx+++ b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx@@ -7,7 +7,6 @@ import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'import { humanFriendlyNumber } from 'lib/utils/numbers'import { logsPatternsLogic } from 'products/logs/frontend/components/LogsPatterns/logsPatternsLogic'-import { LogsOrderBy } from 'products/logs/frontend/types'import { logsViewerConfigLogic } from './config/logsViewerConfigLogic'import { LogsViewerToolbar } from './LogsViewerToolbar'@@ -17,8 +16,6 @@ export interface LogsDisplayBarProps {// Whether to render the facet-rail collapse toggle in the frame (facet-rail layout only).showFacetRailToggle?: booleantotalLogsCount?: number- orderBy: LogsOrderBy- onChangeOrderBy: (orderBy: LogsOrderBy) => void}/**@@ -35,8 +32,6 @@ export const LogsDisplayBar = ({id,showFacetRailToggle = false,totalLogsCount,- orderBy,- onChangeOrderBy,}: LogsDisplayBarProps): JSX.Element => {const { facetRailCollapsed, viewMode } = useValues(logsViewerConfigLogic)const { setFacetRailCollapsed, setViewMode } = useActions(logsViewerConfigLogic)@@ -77,13 +72,7 @@ export const LogsDisplayBar = ({))}</div>- {!inPatternsMode && (- <LogsViewerToolbar- totalLogsCount={totalLogsCount}- orderBy={orderBy}- onChangeOrderBy={onChangeOrderBy}- />- )}+ {!inPatternsMode && <LogsViewerToolbar totalLogsCount={totalLogsCount} />}</div>)}diff --git a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx b/products/logs/frontend/components/LogsViewer/LogsViewer.tsxindex 9dc62e98242f..b1f47a59105c 100644--- a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx+++ b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx@@ -20,7 +20,6 @@ import { logsViewerFiltersLogic } from 'products/logs/frontend/components/LogsViimport { logsExportLogic } from 'products/logs/frontend/components/LogsViewer/logsExportLogic'import { VirtualizedLogsList } from 'products/logs/frontend/components/VirtualizedLogsList/VirtualizedLogsList'import { virtualizedLogsListLogic } from 'products/logs/frontend/components/VirtualizedLogsList/virtualizedLogsListLogic'-import { LogsOrderBy } from 'products/logs/frontend/types'import { LogDetailsModal } from './LogDetailsModal'import { logDetailsModalLogic } from './LogDetailsModal/logDetailsModalLogic'@@ -306,8 +305,6 @@ function LogsViewerContent({const displayBarProps = {id,totalLogsCount: sparklineLoading ? undefined : totalLogsMatchingFilters,- orderBy,- onChangeOrderBy: (newOrderBy: LogsOrderBy) => setOrderBy(newOrderBy, 'toolbar'),}const logList = (diff --git a/products/logs/frontend/components/LogsViewer/LogsViewerToolbar.tsx b/products/logs/frontend/components/LogsViewer/LogsViewerToolbar.tsxindex 4e090b04f19e..5569f9f5674a 100644--- a/products/logs/frontend/components/LogsViewer/LogsViewerToolbar.tsx+++ b/products/logs/frontend/components/LogsViewer/LogsViewerToolbar.tsx@@ -1,18 +1,16 @@import { useActions, useValues } from 'kea'import { IconKeyboard } from '@posthog/icons'-import { LemonButton, LemonCheckbox, LemonSegmentedButton, Tooltip } from '@posthog/lemon-ui'+import { LemonButton, LemonCheckbox, Tooltip } from '@posthog/lemon-ui'import { Shortcut } from 'lib/components/Shortcuts/Shortcut'import { keyBinds } from 'lib/components/Shortcuts/shortcuts'-import { TimezoneSelect } from 'lib/components/TimezoneSelect'import { IconPauseCircle, IconPlayCircle } from 'lib/lemon-ui/icons'import { Scene } from 'scenes/sceneTypes'import { KeyboardShortcut } from '~/layout/navigation-3000/components/KeyboardShortcut'import { logsViewerDataLogic } from 'products/logs/frontend/components/LogsViewer/data/logsViewerDataLogic'-import { LogsOrderBy } from 'products/logs/frontend/types'import { LogsExportMenu } from './LogsExportMenu'import { logsViewerLogic } from './logsViewerLogic'@@ -21,24 +19,19 @@ export interface LogsViewerToolbarProps {// Used by the export menu for its "all matching logs" label + size limit, not shown as a count here// (the lens-aware count indicator lives in the results bar's persistent-left frame).totalLogsCount?: number- orderBy: LogsOrderBy- onChangeOrderBy: (orderBy: LogsOrderBy) => void}/**- * Contextual-right cluster of the results bar — live tail plus how the Logs list renders (sort, wrap,- * timezone, export) and the keyboard-shortcut help. Logs-only: the bar hides this whole cluster in- * Patterns mode, where none of it applies. Live tail streams the query (the others don't re-run it) —- * it lives here, technically the "wrong" scope, so it hides with this cluster instead of shifting the- * top bar's layout when the lens changes.+ * Contextual-right cluster of the results bar — live tail, the wrap-message toggle, export and the+ * keyboard-shortcut help. Logs-only: the bar hides this whole cluster in Patterns mode, where none of+ * it applies. Sort order is driven by the timestamp-column arrow and timezone by the date range picker,+ * so neither has a control here. Live tail streams the query (the others don't re-run it) — it lives+ * here, technically the "wrong" scope, so it hides with this cluster instead of shifting the top bar's+ * layout when the lens changes.*/-export const LogsViewerToolbar = ({- totalLogsCount,- orderBy,- onChangeOrderBy,-}: LogsViewerToolbarProps): JSX.Element => {- const { wrapBody, timezone } = useValues(logsViewerLogic)- const { setWrapBody, setTimezone } = useActions(logsViewerLogic)+export const LogsViewerToolbar = ({ totalLogsCount }: LogsViewerToolbarProps): JSX.Element => {+ const { wrapBody } = useValues(logsViewerLogic)+ const { setWrapBody } = useActions(logsViewerLogic)const { liveTailRunning, liveTailDisabledReason } = useValues(logsViewerDataLogic)const { setLiveTailRunning } = useActions(logsViewerDataLogic)@@ -61,23 +54,7 @@ export const LogsViewerToolbar = ({Live tail</LemonButton></Shortcut>- <LemonSegmentedButton- value={orderBy}- onChange={onChangeOrderBy}- options={[- {- value: 'earliest',- label: 'Earliest',- },- {- value: 'latest',- label: 'Latest',- },- ]}- size="small"- /><LemonCheckbox checked={wrapBody} bordered onChange={setWrapBody} label="Wrap message" size="small" />- <TimezoneSelect value={timezone} onChange={setTimezone} size="small" /><LogsExportMenu totalLogsCount={totalLogsCount} /><Tooltiptitle={