From 6d6bfdf6c109bc3c58e338981a823b654059d059 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Mon, 20 Jul 2026 23:33:59 -0700 Subject: [PATCH] FN-8449: collapse planning history AI thinking by default Keep Planning Mode history focused on questions and answers until operators explicitly expand AI thinking. - Render planning history without forcing AI thinking open - Verify thinking starts collapsed and expands through its existing toggle - Add a patch changeset for the operator-facing fix Files changed: .changeset/fn-8449-planning-history-thinking.md | 7 +++++++ packages/dashboard/app/components/PlanningModeModal.tsx | 3 ++- .../__tests__/PlanningModeModal.planning-flow.test.tsx | 10 ++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-8449 Fusion-Task-Lineage: e318eb85-561b-4d02-8fe8-1b82dcd87cc1 Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-8449-planning-history-thinking.md | 7 +++++++ .../dashboard/app/components/PlanningModeModal.tsx | 3 ++- .../__tests__/PlanningModeModal.planning-flow.test.tsx | 10 ++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .changeset/fn-8449-planning-history-thinking.md diff --git a/.changeset/fn-8449-planning-history-thinking.md b/.changeset/fn-8449-planning-history-thinking.md new file mode 100644 index 0000000000..338fdfbd6d --- /dev/null +++ b/.changeset/fn-8449-planning-history-thinking.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Planning Mode history now collapses AI thinking by default. +category: fix +dev: PlanningModeModal history panel omits defaultShowThinking so ConversationHistory keeps blocks collapsed until expanded (FN-8449). diff --git a/packages/dashboard/app/components/PlanningModeModal.tsx b/packages/dashboard/app/components/PlanningModeModal.tsx index 1025f7a9bb..891cf33ece 100644 --- a/packages/dashboard/app/components/PlanningModeModal.tsx +++ b/packages/dashboard/app/components/PlanningModeModal.tsx @@ -2804,7 +2804,8 @@ export function PlanningModeModal({ isOpen, onClose, onTaskCreated, onTasksCreat
{historyPanelEntries.length > 0 ? ( - + // FNXC:PlanningHistory 2026-07-20-23:24: FN-8449 keeps history thinking collapsed so operators can scan Q&A first; the existing toggle remains available to expand it, matching the FN-7974 chat default. + ) : (
diff --git a/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx b/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx index 542863a3e2..3f0be25412 100644 --- a/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx +++ b/packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx @@ -110,7 +110,7 @@ describe("PlanningModeModal sequential flow", () => { expect(mockConnectPlanningStream).not.toHaveBeenCalled(); }); - it("opens question, answer, and expanded AI reasoning history beside Sessions", async () => { + it("opens question, answer, and collapsed AI reasoning history beside Sessions", async () => { mockFetchAiSession.mockResolvedValue({ ...base, status: "awaiting_input", @@ -138,8 +138,14 @@ describe("PlanningModeModal sequential flow", () => { expect(screen.getByRole("region", { name: "Question and answer history" })).toBeInTheDocument(); expect(screen.getByText("Which outcome matters most?")).toBeInTheDocument(); expect(screen.getByText("Secure defaults")).toBeInTheDocument(); - expect(screen.getByText("I updated the plan to prioritize secure defaults.")).toBeInTheDocument(); + + const thinkingToggle = screen.getByRole("button", { name: "Show AI thinking" }); + expect(thinkingToggle).toHaveAttribute("aria-expanded", "false"); + expect(screen.queryByText("I updated the plan to prioritize secure defaults.")).toBeNull(); + + fireEvent.click(thinkingToggle); expect(screen.getByRole("button", { name: "Hide AI thinking" })).toHaveAttribute("aria-expanded", "true"); + expect(screen.getByText("I updated the plan to prioritize secure defaults.")).toBeInTheDocument(); fireEvent.click(screen.getByRole("button", { name: "Close history" })); expect(screen.queryByRole("region", { name: "Question and answer history" })).toBeNull();