diff --git a/ui/src/i18n/locales/en.ts b/ui/src/i18n/locales/en.ts index 33d30767159c..99a00c64e41f 100644 --- a/ui/src/i18n/locales/en.ts +++ b/ui/src/i18n/locales/en.ts @@ -2798,19 +2798,14 @@ export const en: TranslationMap = { acknowledgeRisk: "Acknowledge risk and install", defaultRiskWarning: "Review the ClawHub warning before installing this plugin.", policyReviewTitle: "Security review needed", - policyReviewBodyUnknown: "Your install policy flagged this plugin. It has not been installed.", - policyReviewBodyOne: "Your install policy found 1 warning. This plugin has not been installed.", - policyReviewBodyMany: - "Your install policy found {count} warnings. This plugin has not been installed.", - policyReviewReason: "Why it was flagged", - policyReviewFindings: "Policy findings", - policyReviewFindingCount: "{count} found", - policyReviewTechnicalDetails: "Scan details", - policyReviewPolicyResponse: "Policy response", + policyReviewBodyUnknown: "Policy flagged this plugin. Not installed.", + policyReviewBodyKnown: "Policy warnings: {count}. Not installed.", + policyReviewFindings: "Findings", + policyReviewTechnicalDetails: "Details", + policyReviewPolicyResponse: "Reason", policyReviewRule: "Rule {count}", policyReviewLocation: "Location", policyReviewEvidence: "Evidence", - policyReviewGuidance: "Continue only if you trust this plugin.", installAnyway: "Install anyway", connectToChange: "Connect to the gateway to change plugins.", adminRequired: "Browsing only. Plugin changes require operator.admin access.", diff --git a/ui/src/pages/plugins/plugins.e2e.test.ts b/ui/src/pages/plugins/plugins.e2e.test.ts index 8807979952f5..95c4bd1e959a 100644 --- a/ui/src/pages/plugins/plugins.e2e.test.ts +++ b/ui/src/pages/plugins/plugins.e2e.test.ts @@ -689,8 +689,8 @@ describeControlUiE2e("Control UI Plugins mocked Gateway E2E", () => { const review = row.getByRole("alert"); await review.waitFor({ state: "visible" }); expect(await review.textContent()).toContain("Security review needed"); - expect(await review.textContent()).toContain("Your install policy found 1 warning"); - expect(await review.textContent()).toContain("This plugin has not been installed"); + expect(await review.textContent()).toContain("Policy warnings: 1"); + expect(await review.textContent()).toContain("Not installed"); expect(await review.textContent()).toContain("Semgrep found a risky command."); expect(await review.textContent()).not.toContain("raw terminal install-policy output"); await captureScreenshot(page, "09-policy-review-desktop.png"); diff --git a/ui/src/pages/plugins/view.test.ts b/ui/src/pages/plugins/view.test.ts index 8c059e5f21d1..48024920d590 100644 --- a/ui/src/pages/plugins/view.test.ts +++ b/ui/src/pages/plugins/view.test.ts @@ -715,16 +715,16 @@ describe("renderPlugins", () => { ); const alert = expectDefined(row.querySelector('[role="alert"]'), "install policy warning"); expect(normalizedText(alert)).toContain("Security review needed"); - expect(normalizedText(alert)).toContain("Your install policy found 1 warning"); - expect(normalizedText(alert)).toContain("This plugin has not been installed"); - expect(normalizedText(alert)).toContain("Policy findings"); + expect(normalizedText(alert)).toContain("Policy warnings: 1"); + expect(normalizedText(alert)).toContain("Not installed"); + expect(normalizedText(alert)).toContain("Findings"); expect(normalizedText(alert)).toContain("Semgrep found a risky command."); const technicalDetails = expectDefined( alert.querySelector(".plugins-policy-review__details"), "install policy scan details", ); expect(technicalDetails.open).toBe(false); - expect(normalizedText(technicalDetails.querySelector("summary"))).toBe("Scan details"); + expect(normalizedText(technicalDetails.querySelector("summary"))).toBe("Details"); expect( technicalDetails?.querySelector(".plugins-policy-review__details-chevron svg"), ).not.toBeNull(); diff --git a/ui/src/pages/plugins/view.ts b/ui/src/pages/plugins/view.ts index 4694f13738b2..2d0161ce7611 100644 --- a/ui/src/pages/plugins/view.ts +++ b/ui/src/pages/plugins/view.ts @@ -390,9 +390,7 @@ function renderRowMessage( const reviewBody = findings.length === 0 ? t("pluginsPage.policyReviewBodyUnknown") - : findings.length === 1 - ? t("pluginsPage.policyReviewBodyOne") - : t("pluginsPage.policyReviewBodyMany", { count: String(findings.length) }); + : t("pluginsPage.policyReviewBodyKnown", { count: String(findings.length) }); return html`