Skip to content

Commit aa20d2a

Browse files
Persist plan sidebar dismissal state
- Mark the sidebar as dismissed even when no turn ID is active - Prevent the plan sidebar from reopening unexpectedly
1 parent 2e3a433 commit aa20d2a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,10 +1903,8 @@ export default function ChatView(props: ChatViewProps) {
19031903
}, [activePlan?.turnId, sidebarProposedPlan?.turnId]);
19041904
const closePlanSidebar = useCallback(() => {
19051905
setPlanSidebarOpen(false);
1906-
const turnKey = activePlan?.turnId ?? sidebarProposedPlan?.turnId ?? null;
1907-
if (turnKey) {
1908-
planSidebarDismissedForTurnRef.current = turnKey;
1909-
}
1906+
planSidebarDismissedForTurnRef.current =
1907+
activePlan?.turnId ?? sidebarProposedPlan?.turnId ?? "__dismissed__";
19101908
}, [activePlan?.turnId, sidebarProposedPlan?.turnId]);
19111909

19121910
const persistThreadSettingsForNextTurn = useCallback(

0 commit comments

Comments
 (0)