diff --git a/src/renderer/src/pages/ApprovalsPage.tsx b/src/renderer/src/pages/ApprovalsPage.tsx index 75c12088..fd6f165a 100644 --- a/src/renderer/src/pages/ApprovalsPage.tsx +++ b/src/renderer/src/pages/ApprovalsPage.tsx @@ -141,7 +141,9 @@ export function ApprovalsPage({ snapshot, actions, navigate, focus }: PageProps) )} + {/* Keyed by request, so notes typed for one never carry to another or survive closing. */} setEditingId(null)} diff --git a/tests/e2e/ceo-chat.spec.ts b/tests/e2e/ceo-chat.spec.ts index 7aba6929..3239655c 100644 --- a/tests/e2e/ceo-chat.spec.ts +++ b/tests/e2e/ceo-chat.spec.ts @@ -112,6 +112,11 @@ test("the pinned CEO conversation is the Messages front door", async () => { await page.getByRole("button", { name: "Review" }).first().click(); const review = page.getByRole("dialog", { name: "Raise the ads budget" }); await expect(review.getByRole("textbox", { name: "Decision notes" })).toBeVisible(); + // Notes belong to one request: closing or switching never carries them to the next. + await review.getByRole("textbox", { name: "Decision notes" }).fill("Only for the ads budget."); + await review.getByRole("button", { name: "Close" }).click(); + await page.getByRole("button", { name: "Review" }).first().click(); + await expect(review.getByRole("textbox", { name: "Decision notes" })).toHaveValue(""); await review.getByRole("button", { name: "Close" }).click(); await page.getByRole("button", { name: "Work" }).click(); await page.getByRole("button", { name: /Operationalize goal: Ship the FlowPilot MVP\./ }).first().click();