{"record":{"id":"2060b8ca5860d224","repo":"paperclipai/paperclip","slug":"project-mapping-cancelled","errorCode":null,"errorMessage":"Project mapping cancelled.","messagePattern":"Project mapping cancelled\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"cli/src/commands/worktree.ts","lineNumber":2777,"sourceCode":"        },\n        ...(nameMatch\n          ? [{\n              value: nameMatch.id,\n              label: `Map to ${nameMatch.name}`,\n              hint: \"Recommended: exact name match\",\n            }]\n          : []),\n        {\n          value: null,\n          label: \"Leave unset\",\n          hint: \"Keep imported issues without a project\",\n        },\n        ...targetChoices.filter((choice) => choice.value !== nameMatch?.id),\n      ],\n      initialValue: nameMatch?.id ?? null,\n    });\n    if (p.isCancel(selection)) {\n      throw new Error(\"Project mapping cancelled.\");\n    }\n    if (selection === importSelectionValue) {\n      importProjectIds.add(sourceProjectId);\n      continue;\n    }\n    mappings[sourceProjectId] = selection;\n  }\n\n  return {\n    importProjectIds: [...importProjectIds],\n    projectIdOverrides: mappings,\n  };\n}\n\nexport async function worktreeListCommand(opts: WorktreeListOptions): Promise<void> {\n  const choices = toMergeSourceChoices(process.cwd());\n  if (opts.json) {\n    console.log(JSON.stringify(choices, null, 2));","sourceCodeStart":2759,"sourceCodeEnd":2795,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/worktree.ts#L2759-L2795","documentation":"Thrown by promptForProjectMappings when the user cancels the @clack/prompts select prompt for a missing source project mapping. During merge planning, source issues may reference projects absent in the target; the CLI prompts per-project to Import, Map, or Leave unset. Pressing escape/Ctrl-C (p.isCancel) aborts the entire merge flow with this message. It is a user-initiated cancellation, not a system fault.","triggerScenarios":"User hits Esc or Ctrl-C at the 'Project X is missing in target' select prompt; non-interactive shell where @clack detects cancel; user intentionally bails out of mapping.","commonSituations":"Decided not to proceed mid-flow; realised the target needs setup first; accidentally cancelled.","solutions":["Re-run merge-history and complete the prompts, choosing Import / Map / Leave unset for each missing project.","If you want to avoid prompts, pre-create the projects in the target or pass flags that pre-supply mappings if available.","Run in an interactive TTY so the prompt is answerable."],"exampleFix":"// before: user cancels the project-mapping select prompt\n// after (complete the prompt)\npaperclipai worktree:merge-history   # choose Import/Map/Leave for each project","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await promptForProjectMappings(input); }\ncatch (err) {\n  if (/Project mapping cancelled/.test(String((err as Error).message))) {\n    // treat as non-fatal: abort merge gracefully, no rollback needed\n    return;\n  } else throw err;\n}","preventionTips":["Pre-create source projects in the target to skip prompts.","Run merge-history in an interactive TTY so prompts are answerable.","Treat cancellation as a clean abort, not an error to suppress silently."],"tags":["worktree","merge","prompt","user-cancel"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}