Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export const Panel = memo(function Panel() {
const router = useRouter()
const params = useParams()
const workspaceId = params.workspaceId as string
const workflowId = params.workflowId as string
const copilotDraftScopeKey = `${workspaceId}:copilot:${workflowId}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

URL id mismatches active workflow

Medium Severity

The copilotDraftScopeKey is built from params.workflowId, but the Copilot chat session and related hooks rely on activeWorkflowId from the workflow registry. This mismatch can cause drafts to be scoped to a different workflow than the active Copilot session, particularly during navigation or hydration.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0e77e00. Configure here.


const posthog = usePostHog()
const posthogRef = useRef(posthog)
Expand Down Expand Up @@ -898,6 +900,7 @@ export const Panel = memo(function Panel() {
onCancelQueueEdit={copilotCancelQueueEdit}
userId={session?.user?.id}
chatId={copilotResolvedChatId}
draftScopeKey={copilotDraftScopeKey}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale draft on workflow change

Medium Severity

When navigating between workflows, the MothershipChat component remains mounted, preventing UserInput from re-initializing its draft state. Although the draftScopeKey updates, UserInput continues to display the previous workflow's draft, and autosaves overwrite the new workflow's draft with the old text.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0e77e00. Configure here.

layout='copilot-view'
/>
</div>
Expand Down
Loading