From 8dd8714c0e1ab5ea3401cd57434de1dc29a1192b Mon Sep 17 00:00:00 2001 From: NiveditJain Date: Mon, 6 Apr 2026 20:29:27 +0000 Subject: [PATCH 1/2] fix: rename "Hooks" to "Policies" in UI and CLI output Updates display strings in hooks-client.tsx and manager.ts to use "Policies" terminology consistently, matching the installed feature name. Co-Authored-By: Claude Sonnet 4.6 --- app/policies/hooks-client.tsx | 10 +++++----- src/hooks/manager.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/policies/hooks-client.tsx b/app/policies/hooks-client.tsx index f04b365d..ad75b6e8 100644 --- a/app/policies/hooks-client.tsx +++ b/app/policies/hooks-client.tsx @@ -427,7 +427,7 @@ function ActivityTab({ {hooksInstalled === false ? ( <> -

Hooks are not installed

+

Policies are not installed

Go to the{" "} - {" "}and click Install to enable hook monitoring. + {" "}and click Install to enable policy monitoring.

) : ( @@ -857,7 +857,7 @@ function PoliciesTab({ onHooksInstallChange }: { onHooksInstallChange?: (install if (!config) return; const installed = config.installedScopes.length > 0; if (!installed) { - setHooksWarning("Hooks are not installed. Install hooks to continue."); + setHooksWarning("Policies are not installed. Install policies to continue."); return; } setHooksWarning(null); @@ -953,7 +953,7 @@ function PoliciesTab({ onHooksInstallChange }: { onHooksInstallChange?: (install className={`h-2 w-2 rounded-full shrink-0 ${installed ? "bg-emerald-500" : "bg-muted-foreground/50"}`} /> - {installed ? "Hooks installed" : "Hooks not installed"} + {installed ? "Policies installed" : "Policies not installed"} {installed && ( @@ -980,7 +980,7 @@ function PoliciesTab({ onHooksInstallChange }: { onHooksInstallChange?: (install disabled={isPending} className="text-xs h-7 px-3" > - {installed ? "Reinstall" : "Install hooks"} + {installed ? "Reinstall" : "Install policies"} diff --git a/src/hooks/manager.ts b/src/hooks/manager.ts index 283f56cf..08da5887 100644 --- a/src/hooks/manager.ts +++ b/src/hooks/manager.ts @@ -511,7 +511,7 @@ export async function listHooks(cwd?: string): Promise { if (installedScopes.length === 0) { // State A: No hooks installed — show table with configured state + descriptions - console.log("\nFailproof AI Hook Policies \u2014 not installed\n"); + console.log("\nFailproof AI Policies \u2014 not installed\n"); console.log(` ${"Status".padEnd(statusCol)}${"Name".padEnd(nameColWidth)}Description`); console.log(` ${"\u2500".repeat(6)} ${"\u2500".repeat(nameColWidth - 2)} ${"\u2500".repeat(38)}`); @@ -520,7 +520,7 @@ export async function listHooks(cwd?: string): Promise { printBetaSection(printSimpleRow); if (config.enabledPolicies.length > 0) { - console.log("\n Hooks not installed. Run `failproofai --install-policies` to activate."); + console.log("\n Policies not installed. Run `failproofai --install-policies` to activate."); } else { console.log("\n Run `failproofai --install-policies` to get started."); } From 09d4955324f3cbe818bfc78ef6c218499d8b359d Mon Sep 17 00:00:00 2001 From: NiveditJain Date: Mon, 6 Apr 2026 20:35:16 +0000 Subject: [PATCH 2/2] fix: update test assertion to match renamed "Policies" terminology MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Hooks not installed" string was renamed to "Policies — not installed" in the source, but the test assertion wasn't updated to match. Co-Authored-By: Claude Sonnet 4.6 --- __tests__/hooks/manager.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/hooks/manager.test.ts b/__tests__/hooks/manager.test.ts index aee336ec..2bde51f6 100644 --- a/__tests__/hooks/manager.test.ts +++ b/__tests__/hooks/manager.test.ts @@ -756,7 +756,7 @@ describe("hooks/manager", () => { const calls = vi.mocked(console.log).mock.calls.map((c) => c[0]); const output = calls.join("\n"); - expect(output).toContain("Hooks not installed"); + expect(output).toContain("Policies — not installed"); expect(output).toContain("--install-policies"); });