From ad0d7fddc6fd5341e10fbab75ef6f907581ca360 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 25 Mar 2026 23:46:52 +0000 Subject: [PATCH] Clarify Patrol run-history snapshot affordance --- .../subsystems/patrol-intelligence.md | 5 + .../src/components/patrol/RunHistoryPanel.tsx | 9 +- .../patrol/__tests__/RunHistoryPanel.test.tsx | 98 +++++++++++++++++++ .../__tests__/patrolRunPresentation.test.ts | 20 ++++ .../src/utils/patrolRunPresentation.ts | 15 +++ 5 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 frontend-modern/src/components/patrol/__tests__/RunHistoryPanel.test.tsx diff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md index 25d52495f..3ba658351 100644 --- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md +++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md @@ -296,6 +296,11 @@ That same rule applies to run-status badges. A legacy run without findings snapshot ids must not keep a green `healthy` badge when the surrounding UI is saying findings verification is unavailable; the canonical run-status presentation should downgrade that state to a neutral `completed` badge. +That same truthfulness rule applies to the run-history shell copy. The `Recent +patrol runs` helper text must not promise that every visible run can filter +findings to a concrete snapshot; when visible runs include legacy entries +without `finding_ids`, or when the selected run itself predates findings +snapshots, the shell should say so explicitly. That same findings surface should keep its section chrome functional rather than promotional. Inside the Patrol findings tab, the selected tab already names the surface, so the findings card should not add another in-card product diff --git a/frontend-modern/src/components/patrol/RunHistoryPanel.tsx b/frontend-modern/src/components/patrol/RunHistoryPanel.tsx index 93e2effae..54dc7f177 100644 --- a/frontend-modern/src/components/patrol/RunHistoryPanel.tsx +++ b/frontend-modern/src/components/patrol/RunHistoryPanel.tsx @@ -2,7 +2,10 @@ import { For, Show } from 'solid-js'; import type { Accessor } from 'solid-js'; import type { PatrolRunRecord } from '@/api/patrol'; import { getRunHistoryEmptyState } from '@/utils/patrolEmptyStatePresentation'; -import { getRunHistoryLoadingState } from '@/utils/patrolRunPresentation'; +import { + getRunHistoryLoadingState, + getRunHistorySelectionHint, +} from '@/utils/patrolRunPresentation'; import { RunHistoryEntry } from './RunHistoryEntry'; import RefreshCwIcon from 'lucide-solid/icons/refresh-cw'; @@ -35,7 +38,9 @@ export function RunHistoryPanel(props: RunHistoryPanelProps) {

Recent patrol runs

-

Select a run to filter findings to that snapshot

+

+ {getRunHistorySelectionHint(props.runs, props.selectedRun)} +