diff --git a/orchestrator/src/client/components/ReadyPanel.test.tsx b/orchestrator/src/client/components/ReadyPanel.test.tsx index b479701..89c634b 100644 --- a/orchestrator/src/client/components/ReadyPanel.test.tsx +++ b/orchestrator/src/client/components/ReadyPanel.test.tsx @@ -5,6 +5,7 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react"; import { ReadyPanel } from "./ReadyPanel"; import type { Job } from "../../shared/types"; import * as api from "../api"; +import { toast } from "sonner"; vi.mock("@/components/ui/dropdown-menu", () => { return { @@ -132,9 +133,10 @@ describe("ReadyPanel", () => { /> ); - fireEvent.click(screen.getByRole("menuitem", { name: /re-run fit assessment/i })); + fireEvent.click(screen.getByRole("menuitem", { name: /recalculate match/i })); await waitFor(() => expect(api.rescoreJob).toHaveBeenCalledWith("job-1")); expect(onJobUpdated).toHaveBeenCalled(); + expect(toast.success).toHaveBeenCalledWith("Match recalculated"); }); }); diff --git a/orchestrator/src/client/components/ReadyPanel.tsx b/orchestrator/src/client/components/ReadyPanel.tsx index 0b3aacf..ee82f8f 100644 --- a/orchestrator/src/client/components/ReadyPanel.tsx +++ b/orchestrator/src/client/components/ReadyPanel.tsx @@ -188,10 +188,10 @@ export const ReadyPanel: React.FC = ({ try { setIsRescoring(true); await api.rescoreJob(job.id); - toast.success("Fit assessment updated"); + toast.success("Match recalculated"); await onJobUpdated(); } catch (error) { - const message = error instanceof Error ? error.message : "Failed to re-run fit assessment"; + const message = error instanceof Error ? error.message : "Failed to recalculate match"; toast.error(message); } finally { setIsRescoring(false); @@ -407,7 +407,7 @@ export const ReadyPanel: React.FC = ({ disabled={isRescoring} > - {isRescoring ? "Re-scoring..." : "Re-run fit assessment"} + {isRescoring ? "Recalculating..." : "Recalculate match"} diff --git a/orchestrator/src/client/components/discovered-panel/DecideMode.tsx b/orchestrator/src/client/components/discovered-panel/DecideMode.tsx index df77162..bb8bacd 100644 --- a/orchestrator/src/client/components/discovered-panel/DecideMode.tsx +++ b/orchestrator/src/client/components/discovered-panel/DecideMode.tsx @@ -112,7 +112,7 @@ export const DecideMode: React.FC = ({ - {isRescoring ? "Re-scoring..." : "Re-run fit assessment"} + {isRescoring ? "Recalculating..." : "Recalculate match"} diff --git a/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.test.tsx b/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.test.tsx index 116a8ca..ed85336 100644 --- a/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.test.tsx +++ b/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.test.tsx @@ -5,6 +5,7 @@ import { fireEvent, render, screen, waitFor } from "@testing-library/react"; import { DiscoveredPanel } from "./DiscoveredPanel"; import type { Job } from "../../../shared/types"; import * as api from "../../api"; +import { toast } from "sonner"; vi.mock("@/components/ui/dropdown-menu", () => { return { @@ -125,9 +126,10 @@ describe("DiscoveredPanel", () => { /> ); - fireEvent.click(screen.getByRole("menuitem", { name: /re-run fit assessment/i })); + fireEvent.click(screen.getByRole("menuitem", { name: /recalculate match/i })); await waitFor(() => expect(api.rescoreJob).toHaveBeenCalledWith("job-2")); expect(onJobUpdated).toHaveBeenCalled(); + expect(toast.success).toHaveBeenCalledWith("Match recalculated"); }); }); diff --git a/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.tsx b/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.tsx index 4ad454a..709bdbd 100644 --- a/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.tsx +++ b/orchestrator/src/client/components/discovered-panel/DiscoveredPanel.tsx @@ -76,11 +76,11 @@ export const DiscoveredPanel: React.FC = ({ try { setIsRescoring(true); await api.rescoreJob(job.id); - toast.success("Fit assessment updated"); + toast.success("Match recalculated"); await onJobUpdated(); } catch (error) { const message = - error instanceof Error ? error.message : "Failed to re-run fit assessment"; + error instanceof Error ? error.message : "Failed to recalculate match"; toast.error(message); } finally { setIsRescoring(false);