From ec183ec60e0f02dc609cabe61f1514df05147ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 9 Oct 2026 01:34:59 -0400 Subject: [PATCH] Q154: decision notes belong to one request and reset on close or switch Co-Authored-By: Claude Opus 5.5 --- src/renderer/src/pages/ApprovalsPage.tsx | 2 ++ tests/e2e/ceo-chat.spec.ts | 5 +++++ 2 files changed, 7 insertions(+) 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();