From 55200e95d8a86186ed987e076813b87e4629d57d Mon Sep 17 00:00:00 2001 From: "molecule-ai[bot]" <276602405+molecule-ai[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 19:24:02 +0000 Subject: [PATCH] =?UTF-8?q?fix(gate-5):=20update=20test=20=E2=80=94=20zinc?= =?UTF-8?q?-400=20italic=20+=20tilde=20assertion=20for=20low-score=20badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/__tests__/MemoryInspectorPanel.test.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/canvas/src/components/__tests__/MemoryInspectorPanel.test.tsx b/canvas/src/components/__tests__/MemoryInspectorPanel.test.tsx index e6a17fca..31ef0925 100644 --- a/canvas/src/components/__tests__/MemoryInspectorPanel.test.tsx +++ b/canvas/src/components/__tests__/MemoryInspectorPanel.test.tsx @@ -501,7 +501,7 @@ describe("MemoryInspectorPanel — semantic search", () => { expect(badge?.className).not.toContain("text-zinc-600"); }); - it("colors similarity-badge zinc-600 when score is below 0.5", async () => { + it("colors similarity-badge zinc-400 italic with tilde prefix when score is below 0.5", async () => { mockGet.mockResolvedValue([ // eslint-disable-next-line @typescript-eslint/no-explicit-any { ...ENTRY_A, similarity_score: 0.31 }, @@ -509,9 +509,11 @@ describe("MemoryInspectorPanel — semantic search", () => { render(); await waitFor(() => screen.getByText("task-queue")); const badge = document.querySelector('[data-testid="similarity-badge"]'); - expect(badge?.className).toContain("text-zinc-600"); + expect(badge?.className).toContain("text-zinc-400"); + expect(badge?.className).toContain("italic"); expect(badge?.className).not.toContain("text-blue-500"); - expect(badge?.className).not.toContain("text-zinc-400"); + expect(badge?.className).not.toContain("text-zinc-600"); + expect(badge?.textContent).toBe("~31%"); }); it("clear button resets debouncedQuery immediately and re-fetches without ?q=", async () => {