: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(inbox): restore staff-only Runs tab in the tab bar (#66010)
Joshua Snydere3b2dfbe985f
diff --git a/frontend/src/scenes/inbox/components/shell/InboxTabBar.tsx b/frontend/src/scenes/inbox/components/shell/InboxTabBar.tsxindex e9d1a1679802..56240c60b130 100644--- a/frontend/src/scenes/inbox/components/shell/InboxTabBar.tsx+++ b/frontend/src/scenes/inbox/components/shell/InboxTabBar.tsx@@ -10,7 +10,6 @@ import { INBOX_FLAT_TAB_LIST_PARAMS, reportListLogic } from '../../logics/reportimport {INBOX_FLAT_LIST_TAB_KEYS,INBOX_STAFF_ONLY_TAB_KEYS,- INBOX_TAB_BAR_HIDDEN_KEYS,INBOX_TAB_KEYS,INBOX_TAB_LABEL,InboxFlatListTabKey,@@ -25,10 +24,6 @@ function isStaffOnlyTabKey(tab: InboxTabKey): boolean {return (INBOX_STAFF_ONLY_TAB_KEYS as string[]).includes(tab)}-function isTabBarHiddenKey(tab: InboxTabKey): boolean {- return (INBOX_TAB_BAR_HIDDEN_KEYS as string[]).includes(tab)-}-/*** Count chip for a flat report tab. Mounts that tab's `reportListLogic` so its `count`* (a cheap `limit=1` request) is available for the badge before the tab is ever opened.@@ -52,11 +47,10 @@ const WELCOME_TAB_KEY = 'welcome'type InboxTabBarKey = InboxTabKey | typeof WELCOME_TAB_KEY/**- * Tab bar: Pull requests / Reports (everyone) + Not actionable (staff-only, with a "Staff" tag).- * Each report tab shows its own server-computed count. The Runs tab is deprecated from the bar- * (its run logs now expand inline in the report detail); its route stays for deep links. The- * Configuration tab is only shown when `showConfigTab` is set – i.e. when the scene is too narrow- * for the setup rail; on wide viewports the rail replaces it.+ * Tab bar: Pull requests / Reports (everyone) + Not actionable and Runs (staff-only, each with a+ * "Staff" tag). Each report tab shows its own server-computed count. The Configuration tab is only+ * shown when `showConfigTab` is set – i.e. when the scene is too narrow for the setup rail; on wide+ * viewports the rail replaces it.** In `onboarding` mode (self-driving not set up, empty inbox) a locked "Welcome" tab is shown and* selected, while the real tabs stay visible but disabled – the user can see what's coming, but the@@ -72,7 +66,7 @@ export function InboxTabBar({const { activeTab, isStaff } = useValues(inboxSceneLogic)const visibleTabKeys = INBOX_TAB_KEYS.filter(- (key) => !isTabBarHiddenKey(key) && (key !== 'config' || showConfigTab) && (!isStaffOnlyTabKey(key) || isStaff)+ (key) => (key !== 'config' || showConfigTab) && (!isStaffOnlyTabKey(key) || isStaff))const realTabs = visibleTabKeys.map((key) => ({diff --git a/frontend/src/scenes/inbox/types.ts b/frontend/src/scenes/inbox/types.tsindex 31c506a2d3ad..922fbb89e90d 100644--- a/frontend/src/scenes/inbox/types.ts+++ b/frontend/src/scenes/inbox/types.ts@@ -141,14 +141,6 @@ export const INBOX_REPORT_TAB_KEYS: InboxTabKey[] = ['pulls', 'reports', 'not-ac*/export const INBOX_STAFF_ONLY_TAB_KEYS: InboxTabKey[] = ['not-actionable', 'runs']-/**- * Tabs deprecated from the tab bar entirely (route preserved for back-compat / deep links). The- * per-report run logs now expand inline within the report detail's Runs section, so the standalone- * project-wide Runs view no longer earns a tab. `urls.inboxReport('runs', …)` and `urls.inbox('runs')`- * still resolve to `AgentRunDetail` / `RunsTab` for anything that deep-links to them.- */-export const INBOX_TAB_BAR_HIDDEN_KEYS: InboxTabKey[] = ['runs']-/** The flat report-list tabs that share the keyed reportListLogic + InboxReportList primitive. */export const INBOX_FLAT_LIST_TAB_KEYS = ['pulls', 'reports', 'not-actionable', 'archived'] as constexport type InboxFlatListTabKey = (typeof INBOX_FLAT_LIST_TAB_KEYS)[number]