paperclipai/paperclip · error

Queue reordering is unavailable.

Error message

Queue reordering is unavailable.

What it means

TaskChatThread's queued-messages onReorder handler throws this fixed message when the onReorderQueuedComments callback prop was not provided. The queue UI is rendered but reordering capability was not wired by the parent, so the handler cannot perform the mutation.

Source

Thrown at ui/src/components/TaskChatThread.tsx:2708

                "bg-background/80 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/60",
            )}
          >
            {composerAccessory}
            {tailTurnStatus ? (
              <TaskChatTurnStatusIsland model={tailTurnStatus} />
            ) : null}
            <RunnerGoalWidget control={runnerGoal} />
            <div
              className="relative isolate flex flex-col"
              data-testid="task-chat-composer-stack"
            >
              {queuedMessageQueue ? (
                <TaskChatQueuedMessages
                  queue={queuedMessageQueue}
                  onEdit={beginQueuedEdit}
                  onReorder={async (orderedCommentIds, revision) => {
                    if (!onReorderQueuedComments)
                      throw new Error("Queue reordering is unavailable.");
                    await onReorderQueuedComments(orderedCommentIds, revision);
                  }}
                  onSteer={async (commentId, revision) => {
                    if (!onSteerQueuedComment)
                      throw new Error("Steering is unavailable.");
                    await onSteerQueuedComment(commentId, revision);
                  }}
                  onInterrupt={
                    onInterruptQueued && queuedMessageQueue.targetRunId
                      ? async () => {
                          await onInterruptQueued(
                            queuedMessageQueue.targetRunId!,
                          );
                        }
                      : undefined
                  }
                  onDiscard={async (commentId, revision) => {
                    if (commentId.startsWith("optimistic-")) {

View on GitHub (pinned to 01ad858492)

Solutions

  1. Pass onReorderQueuedComments wherever queuedMessageQueue is provided
  2. Hide/disable drag-reorder affordances when the callback is absent
  3. Co-locate the props so queue and reorder callbacks are always supplied together

Example fix

// before
if (!onReorderQueuedComments) throw new Error("Queue reordering is unavailable.");
// after
if (!onReorderQueuedComments) {
  toastActions?.pushToast({ title: "Reordering is not available here", tone: "warning" });
  return;
}
Defensive patterns

Strategy: validation

Validate before calling

if (!onReorderQueuedComments) return; // hide reorder handles

Type guard

function canReorder(p: { onReorderQueuedComments?: unknown }): p is { onReorderQueuedComments: (ids: string[], rev: number) => Promise<void> } { return typeof p.onReorderQueuedComments === 'function'; }

Try / catch

try { await onReorder(orderedCommentIds, revision); } catch (e) { if (/reordering is unavailable/.test(e.message)) showToast('Reordering not supported here'); else throw e; }

Prevention

When it happens

Trigger: TaskChatQueuedMessages rendered with a queue but parent omitted onReorderQueuedComments (feature flag off, caller using a limited embedding of TaskChatThread, or partial prop wiring after refactor).

Common situations: Embedding the thread in a read-only surface, a regression where a new queue feature renders without its mutation callbacks, conditional prop passing that evaluates to undefined.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10). Data as JSON: /api/errors/558641cfd468ad3c. Report an issue: GitHub.