Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Use singular verb agreement when one existing issue remains

rcourtmana0ddd97267b8
diff --git a/frontend-modern/src/components/patrol/RunHistoryEntry.tsx b/frontend-modern/src/components/patrol/RunHistoryEntry.tsx
index 3b749030c8..0fd46cfd29 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 <strong>{run.existing_findings}</strong> existing issue
- {run.existing_findings !== 1 ? 's' : ''} remain.
+ {run.existing_findings !== 1 ? 's remain' : ' remains'}.
</>
) : !hasFindingsSnapshot ? (
<span class="text-blue-600 dark:text-blue-400">
diff --git a/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx b/frontend-modern/src/components/patrol/__tests__/RunHistoryEntry.test.tsx
index 1a0ae381f4..c281992cf5 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(() => (
+ <RunHistoryEntry
+ run={{
+ ...run,
+ id: 'run-existing-issue-singular',
+ existing_findings: 1,
+ status: 'issues_found',
+ findings_summary: 'One existing issue remains',
+ }}
+ isLive={false}
+ patrolStream={patrolStream}
+ selected={true}
+ onSelect={vi.fn()}
+ />
+ ));
+
+ 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(() => (
<RunHistoryEntry