BloopAI/vibe-kanban · warning

Can only duplicate one issue at a time

Error message

Can only duplicate one issue at a time

What it means

The DuplicateIssue kanban action requires exactly one selected issue; the client-side guard in execute() throws this Error when issueIds.length !== 1 (i.e. zero or multiple issues selected). duplicateIssue on the project mutations only supports a single issue id.

Source

Thrown at packages/web-core/src/shared/actions/index.ts:1452

      if (result === 'confirmed' && ctx.projectMutations?.removeIssue) {
        for (const issueId of issueIds) {
          ctx.projectMutations.removeIssue(issueId);
        }
      }
    },
  } satisfies IssueActionDefinition,

  DuplicateIssue: {
    id: 'duplicate-issue',
    label: 'Duplicate Issue',
    icon: CopyIcon,
    shortcut: 'I D',
    requiresTarget: ActionTargetType.ISSUE,
    isVisible: (ctx) =>
      ctx.layoutMode === 'kanban' && ctx.hasSelectedKanbanIssue,
    execute: async (ctx, _projectId, issueIds) => {
      if (issueIds.length !== 1) {
        throw new Error('Can only duplicate one issue at a time');
      }
      ctx.projectMutations?.duplicateIssue(issueIds[0]);
    },
  } satisfies IssueActionDefinition,

  MarkBlocking: {
    id: 'mark-blocking',
    label: 'Mark Blocking',
    icon: ArrowBendUpRightIcon,
    requiresTarget: ActionTargetType.ISSUE,
    isVisible: (ctx) =>
      ctx.layoutMode === 'kanban' && ctx.hasSelectedKanbanIssue,
    execute: async (ctx, projectId, issueIds) => {
      if (issueIds.length === 1) {
        await ctx.openRelationshipSelection(
          projectId,
          issueIds[0],
          'blocking',

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Select exactly one issue card before running Duplicate
  2. Clear multi-selection (click a single card) and retry
  3. If you need to duplicate many issues, run Duplicate once per issue or script it via the API rather than the multi-select action

Example fix

// before
if (issueIds.length !== 1) {
  throw new Error('Can only duplicate one issue at a time');
}
// after
if (issueIds.length === 0) return;
issueIds.forEach((id) => ctx.projectMutations?.duplicateIssue(id));
Defensive patterns

Strategy: validation

Validate before calling

if (!issueIds || issueIds.length !== 1) {
  showToast('Select exactly one issue to duplicate');
  return;
}

Type guard

function hasSingleSelection(ids: string[] | undefined): ids is [string] {
  return Array.isArray(ids) && ids.length === 1;
}

Try / catch

try {
  ctx.projectMutations?.duplicateIssue(issueIds[0]);
} catch (e) {
  showToast((e as Error).message);
}

Prevention

When it happens

Trigger: Pressing the 'I D' duplicate shortcut (or invoking the Duplicate action) in kanban layout while multiple issues are selected via multi-select, or with an empty selection.

Common situations: Users shift/ctrl-clicking several kanban cards and then hitting duplicate; keyboard-driven action palette invoked with a stale or multi-item selection; a misconfigured shortcut context passing the whole selection.


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/d0a1646a6f5dc155. Report an issue: GitHub.