Skip to content

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

fix(signals): make the Scouts roster readable at narrow widths (#87599)

posthog[bot]106999fe26cc
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index c1b1a80b76d9..6d62b3491c0a 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -6701,13 +6701,17 @@ snapshots:
scenes-app-inbox-scoutmcpserverspicker--scout-settings-variant--light:
hash: v1.k794b7964.2f1013abc412adb4544bca6a00209d3051c46969db69d4242ab201ecf5d189f3.YVfbrzpaRzPwuCbeFXmaVOLla0fvhHmAm1CkuaKWCLI
scenes-app-inbox-scoutsroster--large-fleet--dark:
- hash: v1.k794b7964.2edbcf914b5f961852835f1490dd17656f189e2c6453327846338df4e7254019.4vMqblPFx5vXbwrom8O_uEP_Qz6tJeyjhi9ciTIVvLU
+ hash: v1.k794b7964.718d781556e08dc7feb07a7adf0ef3f8b88b106b1625047d9c2af839df1ecb83.19wXi43f_KFsfpTkB30RoYw5c6_Brl7bz9d3A15R4b8
scenes-app-inbox-scoutsroster--large-fleet--light:
- hash: v1.k794b7964.7ab0f4823811e07dd11ab8df5d6ca380da32882d2ebc860fb5e5dcb19979a4c5.gGnZTgS_baawVjUk8Op2gnecTdx78A5k8vD0l3eVkUs
+ hash: v1.k794b7964.aae20045053cf353c3447d41c1bbce92aeabb3d6329664da69d05e0325c28346.u6zr3nk4cJN44mL2RSKmpuVTBsL1WmCqsaagwijmiSI
+ scenes-app-inbox-scoutsroster--narrow--dark:
+ hash: v1.k794b7964.1feb663b0f7c787baebbb5cb76112af14394d12564bcd84a10f74b4320ce6df7.S20hNzFMJwmUnCS2XnNbS2LL49lgymuQuOUkIWEqeJs
+ scenes-app-inbox-scoutsroster--narrow--light:
+ hash: v1.k794b7964.5a75dcc9a78a645e0ca0b5811453e6b975952a00a9ffc6280463b113ad94faea.ulBW3-DilRBC_cyXD6R2MH2g0k_S38zfhKnn3_jWK4I
scenes-app-inbox-scoutsroster--roster--dark:
- hash: v1.k794b7964.f1a62e97c92b9d013867516a202b6e851a3e98f0db73527490d81c03b0d01c43.Eo9e2d8VEXu3DbgxnzfcgVYlcoytILv9Ts3J8C3iiNA
+ hash: v1.k794b7964.1e60b96137099008eb0586a688a6e9778957d2bb22080717cb1b7e85b33914f2.hhm9E7xx3YoKpX0Q0OT_8p4RnX9DWaHcowqBSzbj6E4
scenes-app-inbox-scoutsroster--roster--light:
- hash: v1.k794b7964.d77ce79b5c591194555316bfd6a28ef4d590e8b79ca888dcec301f287ac6bf0b.-Wpf2QnPo3079sXvwc0w_metttiQCg3IdcKq_Z3AEms
+ hash: v1.k794b7964.43141512a651be54956bfc83ec43a719e32a20cd95f8ab36b618f5f13f2805d8.OKKyCevdY3MASfUtMhdnkY0ZCr2b8jB2cSdbGyFMY1I
scenes-app-inbox-selfdrivingsection--daily-limit-reached--dark:
hash: v1.k794b7964.fc51db50c7d112ee96cfe4992358fca180bde9b993e6070c996eafb00df19426.D5c3L-swBUOALS-MsAbV5qUc9iNKrvrIOlyp4Rnoszc
scenes-app-inbox-selfdrivingsection--daily-limit-reached--light:
@@ -6833,9 +6837,9 @@ snapshots:
scenes-app-insights-error-empty-states--funnel-single-step--light:
hash: v1.k794b7964.66bd00443e2e711874ed527bf57144f29725e97fe6485bd851a5a08fc1312baa.tlLUxnCoHj_VOErbA4ZPNkryCh306EmzhqWZkD8heAU
scenes-app-insights-error-empty-states--long-loading--dark:
- hash: v1.k794b7964.a6429bcd1656dc70e30624f2e2f222d77d001a2a0e6fd49e0715598251e08e5e.GjorOUsq0kK5NJezAdyIBqFjJBIveAR3brvuMItSSYc
+ hash: v1.k794b7964.7e56525084d4787f75387ff2977d2c5871949141847d8aeaabe3f0c031dea5d1.xbYPGGVGgGHRAiaBBV8qoKBbczjZzTiE4hq9rW_ENgA
scenes-app-insights-error-empty-states--long-loading--light:
- hash: v1.k794b7964.e3f760b8e3b6d5138169be92e3a8026a00e7ec2ee9e252e54b67218df282b804.z796JAdbdGr_wQgg7t4XD97z7nQoKC3qrjEVudqDDeU
+ hash: v1.k794b7964.c17cf8b6b9ca9b3fa5cd570116c12705ec424367a8cf0cbe3934f7057a64bad6.xV9MB_rar116TwlG94C5F8W9YaSMd7NPI_AOO1OD9Ic
scenes-app-insights-error-empty-states--memory-limit-exceeded--dark:
hash: v1.k794b7964.ef18ee16bcec4b43d74979a5131a3f325f8e0542b6b4cba050746f6b02699ab9.kOLq5BxzD8AlGlxKgleq3uJTw_ddM6GTSmML4MNaZ5o
scenes-app-insights-error-empty-states--memory-limit-exceeded--light:
diff --git a/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts b/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
index 6b043a4730e1..095ba9202c82 100644
--- a/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
+++ b/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
@@ -1,4 +1,4 @@
-import type { SignalScoutConfigApi } from 'products/signals/frontend/generated/api.schemas'
+import type { SignalScoutConfigApi, SignalScoutRunSummaryApi } from 'products/signals/frontend/generated/api.schemas'
type MockScoutOverrides = Pick<SignalScoutConfigApi, 'id' | 'skill_name' | 'description'> &
Partial<Omit<SignalScoutConfigApi, 'id' | 'skill_name' | 'description'>>
@@ -45,6 +45,40 @@ export const mockScoutConfigs: SignalScoutConfigApi[] = [
}),
]
+/** Anchors the mock runs to the same instant the scout stories pin `mockDate` to. */
+const MOCK_NOW_MS = Date.parse('2026-06-11T09:00:00Z')
+const HOUR_MS = 3600000
+
+/**
+ * A run strip for every scout in a fleet: hourly runs ending at the stories' "now", with a
+ * repeating emitted / quiet / failed pattern so the strip shows all three box colors. Scouts get
+ * different run counts on purpose — that's what the right-anchored strip exists to keep comparable.
+ */
+export function mockScoutRuns(configs: SignalScoutConfigApi[]): SignalScoutRunSummaryApi[] {
+ return configs.flatMap((config, configIndex) =>
+ Array.from({ length: 10 + configIndex * 2 }, (_, runIndex) => {
+ const failed = (runIndex + configIndex) % 5 === 0
+ const startedAt = MOCK_NOW_MS - (runIndex + 1) * HOUR_MS
+ return {
+ run_id: `${config.skill_name}-run-${runIndex}`,
+ skill_name: config.skill_name,
+ skill_version: 1,
+ status: failed ? ('failed' as const) : ('completed' as const),
+ created_at: new Date(startedAt).toISOString(),
+ started_at: new Date(startedAt).toISOString(),
+ completed_at: new Date(startedAt + 12 * 60000).toISOString(),
+ task_url: null,
+ summary: failed ? '' : 'Swept the window and found nothing worth filing.',
+ emitted_count: !failed && (runIndex + configIndex) % 4 === 0 ? 1 : 0,
+ emitted_finding_ids: [],
+ emitted_report_ids: [],
+ edited_report_ids: [],
+ metadata: {},
+ }
+ })
+ )
+}
+
export const mockLargeScoutFleet: SignalScoutConfigApi[] = [
makeMockScout({
id: 'scout-error-tracking',
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.stories.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.stories.tsx
index b9dd687302a9..f89dea828bea 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.stories.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.stories.tsx
@@ -4,7 +4,7 @@ import { FEATURE_FLAGS } from 'lib/constants'
import { mswDecorator } from '~/mocks/browser'
-import { mockLargeScoutFleet, mockScoutConfigs } from '../../../__mocks__/scoutConfigs'
+import { mockLargeScoutFleet, mockScoutConfigs, mockScoutRuns } from '../../../__mocks__/scoutConfigs'
import { ScoutsRoster } from './ScoutsRoster'
// The flat roster: one alphabetical table with a sortable Status column. Use this to check the
@@ -23,7 +23,6 @@ const meta: Meta<typeof ScoutsRoster> = {
decorators: [
mswDecorator({
get: {
- '/api/projects/:id/signals/scout/runs/recent-per-scout/': () => [200, []],
'/api/projects/:id/signals/scout/runs/findings/summary/': () => [200, null],
'/api/projects/:id/signals/scout/metadata/current/': () => [200, null],
'/api/projects/:id/signals/scout/scratchpad/': () => [200, []],
@@ -40,6 +39,7 @@ export const Roster: Story = {
mswDecorator({
get: {
'/api/projects/:id/signals/scout/configs/': () => [200, mockScoutConfigs],
+ '/api/projects/:id/signals/scout/runs/recent-per-scout/': () => [200, mockScoutRuns(mockScoutConfigs)],
},
}),
],
@@ -50,6 +50,29 @@ export const LargeFleet: Story = {
mswDecorator({
get: {
'/api/projects/:id/signals/scout/configs/': () => [200, mockLargeScoutFleet],
+ '/api/projects/:id/signals/scout/runs/recent-per-scout/': () => [
+ 200,
+ mockScoutRuns(mockLargeScoutFleet),
+ ],
+ },
+ }),
+ ],
+}
+
+// Phone width. Cadence and Next run drop out, and the table stops overflowing sideways, so the
+// name, the status, the run strip, and the on/off toggle all stay on screen.
+export const Narrow: Story = {
+ parameters: {
+ testOptions: { viewport: { width: 375, height: 900 }, waitForLoadersToDisappear: false },
+ },
+ decorators: [
+ mswDecorator({
+ get: {
+ '/api/projects/:id/signals/scout/configs/': () => [200, mockLargeScoutFleet],
+ '/api/projects/:id/signals/scout/runs/recent-per-scout/': () => [
+ 200,
+ mockScoutRuns(mockLargeScoutFleet),
+ ],
},
}),
],
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.tsx
index fd99b0800962..06cc6377aa9c 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutsRoster.tsx
@@ -3,6 +3,8 @@ import { useEffect, useRef } from 'react'
import { LemonButton, LemonSkeleton } from '@posthog/lemon-ui'
+import { useResizeBreakpoints } from 'lib/hooks/useResizeObserver'
+
import { captureScoutFleetViewed } from '../../../inboxAnalytics'
import { scoutFleetLogic } from '../../../logics/scoutFleetLogic'
import { SCOUT_ROSTER_WINDOW_LABEL, SCOUT_RUNS_PER_SCOUT_LABEL } from '../../../utils/scoutRunsWindow'
@@ -12,6 +14,14 @@ import { ScoutsEmptyState } from './ScoutsEmptyState'
import { ScoutsRosterHeader } from './ScoutsRosterHeader'
import { ScoutsRosterTable } from './ScoutsRosterTable'
+/**
+ * Under this width the roster drops to its compact columns. Sits just above the ~763px the
+ * six-column table needs before it starts scrolling sideways, so the switch happens where the wide
+ * layout actually stops working rather than at a phone-sized guess. Measured on the roster itself
+ * rather than the window, so the tab reads the same inside a narrow embed as it does on a phone.
+ */
+const ROSTER_COMPACT_MAX_PX = 768
+
/**
* The scout roster: one alphabetical table over the whole troop, with lifecycle as a sortable
* Status column. Replaces the card list that used to live in the Scout troop modal — the fleet
@@ -20,6 +30,13 @@ import { ScoutsRosterTable } from './ScoutsRosterTable'
export function ScoutsRoster(): JSX.Element {
const { scoutConfigs, scoutConfigsLoading, enabledCount, customScoutCount } = useValues(scoutFleetLogic)
const { loadScoutConfigs, startRunsPolling, stopRunsPolling } = useActions(scoutFleetLogic)
+ // One measurement for the whole roster, so the header chrome and the table agree on which
+ // layout they're in — two observers could disagree for a frame mid-resize.
+ const { ref: widthRef, size } = useResizeBreakpoints(
+ { 0: 'compact', [ROSTER_COMPACT_MAX_PX]: 'wide' },
+ { initialSize: 'wide' }
+ )
+ const compact = size === 'compact'
useEffect(() => {
startRunsPolling()
@@ -73,10 +90,10 @@ export function ScoutsRoster(): JSX.Element {
}
return (
- <div className="flex flex-col">
+ <div ref={widthRef} className="flex flex-col">
<ScoutAlphaBanner />
- <ScoutsRosterHeader />
- <ScoutsRosterTable />
+ <ScoutsRosterHeader compact={compact} />
+ <ScoutsRosterTable compact={compact} />
<div className="flex flex-col gap-1 px-6 py-4">
<span className="text-xs text-muted">
The totals above cover the {SCOUT_ROSTER_WINDOW_LABEL}. Each scout's run strip shows its{' '}
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterFilters.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterFilters.tsx
index 87ad9a33b0ab..b07732c5510c 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterFilters.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterFilters.tsx
@@ -2,15 +2,19 @@ import { useActions, useValues } from 'kea'
import { LemonInput, LemonSegmentedButton } from '@posthog/lemon-ui'
+import { cn } from 'lib/utils/css-classes'
+
import { scoutFleetLogic } from '../../../logics/scoutFleetLogic'
import { ScoutTagsFilter } from './ScoutTagsFilter'
-export function ScoutsRosterFilters(): JSX.Element {
+export function ScoutsRosterFilters({ compact }: { compact: boolean }): JSX.Element {
const { scoutSearch, scoutEnabledFilter, scoutTagOptions, activeScoutTags } = useValues(scoutFleetLogic)
const { setScoutSearch, setScoutEnabledFilter, setScoutTagFilter } = useActions(scoutFleetLogic)
return (
- <div className="ml-auto flex flex-wrap items-center gap-2">
+ // Compact takes the whole line rather than being pushed right: at phone widths the filters
+ // never share a row with the stats anyway, and a right-hugging half-row just wastes it.
+ <div className={cn('flex flex-wrap items-center gap-2', compact ? 'w-full' : 'ml-auto')}>
<LemonSegmentedButton
size="small"
value={scoutEnabledFilter}
@@ -27,7 +31,7 @@ export function ScoutsRosterFilters(): JSX.Element {
placeholder="Search scouts…"
value={scoutSearch}
onChange={setScoutSearch}
- className="w-56"
+ className={compact ? 'min-w-32 flex-1' : 'w-56'}
allowClear
/>
{scoutTagOptions.length > 0 && (
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterHeader.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterHeader.tsx
index 4580c0b23122..c40c894ac267 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterHeader.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterHeader.tsx
@@ -10,9 +10,19 @@ import type { NeedsYouScout } from '../../../utils/scoutGroups'
import { SCOUT_ROSTER_WINDOW_LABEL } from '../../../utils/scoutRunsWindow'
import { ScoutsRosterFilters } from './ScoutsRosterFilters'
-function Stat({ value, label, alert = false }: { value: string; label: string; alert?: boolean }): JSX.Element {
+function Stat({
+ value,
+ label,
+ alert = false,
+ compact = false,
+}: {
+ value: string
+ label: string
+ alert?: boolean
+ compact?: boolean
+}): JSX.Element {
return (
- <div className="flex flex-col border-r border-primary pr-4 last:border-r-0">
+ <div className={cn('flex flex-col border-r border-primary last:border-r-0', compact ? 'pr-3' : 'pr-4')}>
<span className={cn('text-lg font-semibold tabular-nums leading-tight', alert && 'text-danger')}>
{value}
</span>
@@ -26,11 +36,16 @@ function Stat({ value, label, alert = false }: { value: string; label: string; a
* two stacked rows before, which burned a whole row of height at every width — `ml-auto` keeps the
* search right-aligned, and the row only wraps once the two halves genuinely can't share a line.
*/
-export function ScoutsRosterHeader(): JSX.Element {
+export function ScoutsRosterHeader({ compact }: { compact: boolean }): JSX.Element {
return (
- <div className="flex flex-wrap items-center gap-x-6 gap-y-3 px-6 pt-4 pb-3">
- <RosterStats />
- <ScoutsRosterFilters />
+ <div
+ className={cn(
+ 'flex flex-wrap items-center pt-4 pb-3',
+ compact ? 'gap-x-4 gap-y-3 px-4' : 'gap-x-6 gap-y-3 px-6'
+ )}
+ >
+ <RosterStats compact={compact} />
+ <ScoutsRosterFilters compact={compact} />
</div>
)
}
@@ -64,7 +79,7 @@ function NeedsYouTooltip({ scouts }: { scouts: NeedsYouScout[] }): JSX.Element {
* The troop's headline numbers. Output is stated as reports filed rather than as a run success
* rate: every run completing tells you nothing crashed, not that the troop is earning its keep.
*/
-function RosterStats(): JSX.Element {
+function RosterStats({ compact }: { compact: boolean }): JSX.Element {
const { rosterGroupCounts, needsYouScouts, enabledCount, emittedFindingsSummary, fleetFindingsSummaryLoadedOnce } =
useValues(scoutFleetLogic)
// Mounted here rather than by the fleet logic, so the 1,000-entry scratchpad read only happens
@@ -75,33 +90,45 @@ function RosterStats(): JSX.Element {
const summaryValue = (value: number): string => (fleetFindingsSummaryLoadedOnce ? String(value) : '—')
return (
- <div className="flex flex-wrap items-center gap-4">
+ <div className={cn('flex flex-wrap items-center', compact ? 'gap-x-3 gap-y-2' : 'gap-4')}>
{rosterGroupCounts.needs_you > 0 && (
<Tooltip title={<NeedsYouTooltip scouts={needsYouScouts} />}>
<span>
- <Stat value={String(rosterGroupCounts.needs_you)} label="need you" alert />
+ <Stat value={String(rosterGroupCounts.needs_you)} label="need you" alert compact={compact} />
</span>
</Tooltip>
)}
- <Stat value={String(enabledCount)} label="on patrol" />
+ <Stat value={String(enabledCount)} label="on patrol" compact={compact} />
<Tooltip title={`Runs your scouts made in the ${SCOUT_ROSTER_WINDOW_LABEL}, quiet ones included.`}>
<span>
- <Stat value={summaryValue(emittedFindingsSummary.runCount)} label="runs" />
+ <Stat value={summaryValue(emittedFindingsSummary.runCount)} label="runs" compact={compact} />
</span>
</Tooltip>
<Tooltip title={`New reports your scouts filed in the ${SCOUT_ROSTER_WINDOW_LABEL}.`}>
<span>
- <Stat value={summaryValue(emittedFindingsSummary.authoredReportCount)} label="reports filed" />
+ <Stat
+ value={summaryValue(emittedFindingsSummary.authoredReportCount)}
+ label="reports filed"
+ compact={compact}
+ />
</span>
</Tooltip>
<Tooltip title={`Existing reports your scouts added to in the ${SCOUT_ROSTER_WINDOW_LABEL}.`}>
<span>
- <Stat value={summaryValue(emittedFindingsSummary.editedReportCount)} label="reports edited" />
+ <Stat
+ value={summaryValue(emittedFindingsSummary.editedReportCount)}
+ label="reports edited"
+ compact={compact}
+ />
</span>
</Tooltip>
<Tooltip title={`Scratchpad entries your scouts wrote or refreshed in the ${SCOUT_ROSTER_WINDOW_LABEL}.`}>
<span>
- <Stat value={scratchpadEntries === null ? '—' : String(recentlyLearnedCount)} label="learned" />
+ <Stat
+ value={scratchpadEntries === null ? '—' : String(recentlyLearnedCount)}
+ label="learned"
+ compact={compact}
+ />
</span>
</Tooltip>
</div>
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterTable.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterTable.tsx
index 80eb115b7516..41a6f309f26a 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterTable.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutsRosterTable.tsx
@@ -24,8 +24,12 @@ import { ScoutStatusDot } from './ScoutStatusDot'
* The whole troop in one alphabetical table. A scout's lifecycle is a sortable Status column rather
* than a section heading, so finding one by name is a single scan instead of a guess at which bucket
* the scheduler put it in.
+ *
+ * `compact` is the phone-width roster: Cadence and Next run drop out and their space goes to the
+ * name and the run strip. Both are schedule detail rather than state, and the scout page states
+ * them in full — at 375px they were 45px columns holding a truncated word each.
*/
-export function ScoutsRosterTable(): JSX.Element {
+export function ScoutsRosterTable({ compact }: { compact: boolean }): JSX.Element {
const { rosterScouts, rollups, updatingScoutIds, scoutRunsLoadedOnce } = useValues(scoutFleetLogic)
const { updateScoutConfig } = useActions(scoutFleetLogic)
@@ -37,6 +41,10 @@ export function ScoutsRosterTable(): JSX.Element {
<LemonTable
embedded
size="small"
+ // Compact has no room to spare, and an auto layout sizes columns to their content — the
+ // run strip's fixed-width boxes alone push the table wider than a phone and the toggle
+ // off the right edge. Fixed makes the percentages below binding and lets cells clip.
+ tableLayout={compact ? 'fixed' : 'auto'}
rowKey={(row: ScoutRosterRow) => row.config.id}
dataSource={rosterScouts}
rowClassName={(row: ScoutRosterRow) => cn('cursor-pointer', !row.config.enabled && 'opacity-65')}
@@ -55,7 +63,7 @@ export function ScoutsRosterTable(): JSX.Element {
{
title: 'Scout',
key: 'scout',
- width: '34%',
+ width: compact ? '40%' : '34%',
sorter: (a: ScoutRosterRow, b: ScoutRosterRow) => compareScoutsByName(a.config, b.config),
render: (_, row: ScoutRosterRow) => (
<ScoutNameCell
@@ -68,7 +76,7 @@ export function ScoutsRosterTable(): JSX.Element {
{
title: 'Status',
key: 'status',
- width: '14%',
+ width: compact ? '26%' : '14%',
sorter: (a: ScoutRosterRow, b: ScoutRosterRow) =>
SCOUT_GROUP_ORDER.indexOf(a.group) - SCOUT_GROUP_ORDER.indexOf(b.group),
render: (_, row: ScoutRosterRow) => (
@@ -82,6 +90,7 @@ export function ScoutsRosterTable(): JSX.Element {
title: 'Cadence',
key: 'cadence',
width: '12%',
+ isHidden: compact,
render: (_, row: ScoutRosterRow) => (
<span className="text-xs text-secondary">{scoutCadenceLabel(row.config)}</span>
),
@@ -90,6 +99,7 @@ export function ScoutsRosterTable(): JSX.Element {
title: 'Next run',
key: 'nextRun',
width: '12%',
+ isHidden: compact,
render: (_, row: ScoutRosterRow) => (
<span className="text-xs text-secondary tabular-nums">
<ScoutNextRunLabel config={row.config} />
@@ -97,9 +107,11 @@ export function ScoutsRosterTable(): JSX.Element {
),
},
{
- title: 'Recent runs',
+ // "Recent runs" doesn't fit the compact column, and a right-aligned header clips
+ // from its left — it would read as "ent runs".
+ title: compact ? 'Runs' : 'Recent runs',
key: 'runs',
- width: '28%',
+ width: compact ? '20%' : '28%',
// The strip is a timeline ending at "now", anchored right so every row's
// newest run shares one vertical line; the header follows its content.
align: 'right',
@@ -120,7 +132,7 @@ export function ScoutsRosterTable(): JSX.Element {
{
title: '',
key: 'enabled',
- width: '8%',
+ width: compact ? '14%' : '8%',
render: (_, row: ScoutRosterRow) => (
// Stop the row's navigation: flipping a scout off is not a request to
// open it, and landing on its page afterwards hides the row you just changed.