diff --git a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx index 3b749030c..0fd46cfd2 100644 --- a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx +++ b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx @@ -273,7 +273,7 @@ export function RunHistoryEntry(props: RunHistoryEntryProps) { ) : run.existing_findings > 0 ? ( <> No new issues, but {run.existing_findings} existing issue - {run.existing_findings !== 1 ? 's' : ''} remain. + {run.existing_findings !== 1 ? 's remain' : ' remains'}. ) : !hasFindingsSnapshot ? ( diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx index 1a0ae381f..c281992cf 100644 --- a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx +++ b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx @@ -378,6 +378,41 @@ describe('RunHistoryEntry', () => { expect(screen.queryByText(/^All clear$/)).not.toBeInTheDocument(); }); + it('uses singular verb agreement when a single existing issue remains', () => { + render(() => ( + + )); + + expect( + screen.getByText( + (_, element) => + element?.tagName === 'P' && + (element.textContent?.includes('No new issues, but 1 existing issue remains.') ?? false), + ), + ).toBeInTheDocument(); + // Guard against the regression: the prior wording was "1 existing issue remain." + expect( + screen.queryByText( + (_, element) => + element?.tagName === 'P' && + (element.textContent?.includes('existing issue remain.') ?? false) && + !(element.textContent?.includes('remains.') ?? false), + ), + ).not.toBeInTheDocument(); + }); + it('surfaces deterministic triage runs that skipped the llm', () => { render(() => (