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) <noreply@runfusion.ai>
This commit is contained in:
7
.changeset/fn-8449-planning-history-thinking.md
Normal file
7
.changeset/fn-8449-planning-history-thinking.md
Normal file
@@ -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).
|
||||
@@ -2804,7 +2804,8 @@ export function PlanningModeModal({ isOpen, onClose, onTaskCreated, onTasksCreat
|
||||
</div>
|
||||
<div className="planning-history-scroll">
|
||||
{historyPanelEntries.length > 0 ? (
|
||||
<ConversationHistory entries={historyPanelEntries} defaultShowThinking />
|
||||
// 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.
|
||||
<ConversationHistory entries={historyPanelEntries} />
|
||||
) : (
|
||||
<div className="planning-history-empty">
|
||||
<History size={24} />
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user