Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3159,6 +3159,13 @@ function ChatViewContent(props: ChatViewProps) {
if (!activeThreadRef) return;
useRightPanelStore.getState().open(activeThreadRef, "agents");
}, [activeThreadRef]);
const addPlanSurface = useCallback(() => {
if (!activeThreadRef) return;
if (activeThreadKey) {
clearPlanSidebarDismissal(activeThreadKey);
}
useRightPanelStore.getState().open(activeThreadRef, "plan");
}, [activeThreadKey, activeThreadRef]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan tab opens removed surface

High Severity

addPlanSurface opens the plan right-panel kind and clears dismissal via clearPlanSidebarDismissal, but that surface was removed in rightPanelStore v9. Plans now render inline, migration still drops plan surfaces, rightPanelContent has no plan branch, and PlanSidebar / the dismissal helper are gone—so the new Plan picker entry cannot open a working plan tab.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a121143. Configure here.

const openFileSurface = useCallback(
(relativePath: string) => {
if (!activeThreadRef || !activeProject) return;
Expand Down Expand Up @@ -6356,6 +6363,7 @@ function ChatViewContent(props: ChatViewProps) {
onAddDiff={addDiffSurface}
onAddFiles={addFilesSurface}
onAddAgents={addAgentsSurface}
onAddPlan={addPlanSurface}
browserAvailable={isPreviewSupportedInRuntime()}
diffAvailable={isServerThread && isGitRepo}
filesAvailable={activeProject !== null}
Expand Down Expand Up @@ -6384,6 +6392,7 @@ function ChatViewContent(props: ChatViewProps) {
onAddDiff={addDiffSurface}
onAddFiles={addFilesSurface}
onAddAgents={addAgentsSurface}
onAddPlan={addPlanSurface}
browserAvailable={isPreviewSupportedInRuntime()}
diffAvailable={isServerThread && isGitRepo}
filesAvailable={activeProject !== null}
Expand Down
15 changes: 15 additions & 0 deletions apps/web/src/components/RightPanelTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ interface RightPanelTabsProps {
onAddDiff: () => void;
onAddFiles: () => void;
onAddAgents: () => void;
onAddPlan: () => void;
browserAvailable: boolean;
diffAvailable: boolean;
filesAvailable: boolean;
Expand Down Expand Up @@ -93,6 +94,7 @@ function RightPanelEmptyState(props: {
onAddDiff: () => void;
onAddFiles: () => void;
onAddAgents: () => void;
onAddPlan: () => void;
browserAvailable: boolean;
diffAvailable: boolean;
filesAvailable: boolean;
Expand Down Expand Up @@ -138,6 +140,14 @@ function RightPanelEmptyState(props: {
disabledReason: null,
onClick: props.onAddAgents,
},
{
label: "Plan",
description: "View plan steps and tasks.",
icon: ClipboardList,
available: true,
disabledReason: null,
onClick: props.onAddPlan,
},
] as const;

return (
Expand Down Expand Up @@ -480,6 +490,10 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
<Bot />
Agents
</SurfaceMenuItem>
<SurfaceMenuItem available onClick={props.onAddPlan}>
<ClipboardList />
Plan
</SurfaceMenuItem>
</MenuPopup>
</Menu>
) : null}
Expand All @@ -495,6 +509,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
onAddDiff={props.onAddDiff}
onAddFiles={props.onAddFiles}
onAddAgents={props.onAddAgents}
onAddPlan={props.onAddPlan}
browserAvailable={props.browserAvailable}
diffAvailable={props.diffAvailable}
filesAvailable={props.filesAvailable}
Expand Down
Loading