{"record":{"id":"558641cfd468ad3c","repo":"paperclipai/paperclip","slug":"queue-reordering-is-unavailable","errorCode":null,"errorMessage":"Queue reordering is unavailable.","messagePattern":"Queue reordering is unavailable\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/components/TaskChatThread.tsx","lineNumber":2708,"sourceCode":"                \"bg-background/80 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/60\",\n            )}\n          >\n            {composerAccessory}\n            {tailTurnStatus ? (\n              <TaskChatTurnStatusIsland model={tailTurnStatus} />\n            ) : null}\n            <RunnerGoalWidget control={runnerGoal} />\n            <div\n              className=\"relative isolate flex flex-col\"\n              data-testid=\"task-chat-composer-stack\"\n            >\n              {queuedMessageQueue ? (\n                <TaskChatQueuedMessages\n                  queue={queuedMessageQueue}\n                  onEdit={beginQueuedEdit}\n                  onReorder={async (orderedCommentIds, revision) => {\n                    if (!onReorderQueuedComments)\n                      throw new Error(\"Queue reordering is unavailable.\");\n                    await onReorderQueuedComments(orderedCommentIds, revision);\n                  }}\n                  onSteer={async (commentId, revision) => {\n                    if (!onSteerQueuedComment)\n                      throw new Error(\"Steering is unavailable.\");\n                    await onSteerQueuedComment(commentId, revision);\n                  }}\n                  onInterrupt={\n                    onInterruptQueued && queuedMessageQueue.targetRunId\n                      ? async () => {\n                          await onInterruptQueued(\n                            queuedMessageQueue.targetRunId!,\n                          );\n                        }\n                      : undefined\n                  }\n                  onDiscard={async (commentId, revision) => {\n                    if (commentId.startsWith(\"optimistic-\")) {","sourceCodeStart":2690,"sourceCodeEnd":2726,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/components/TaskChatThread.tsx#L2690-L2726","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Pass onReorderQueuedComments wherever queuedMessageQueue is provided","Hide/disable drag-reorder affordances when the callback is absent","Co-locate the props so queue and reorder callbacks are always supplied together"],"exampleFix":"// before\nif (!onReorderQueuedComments) throw new Error(\"Queue reordering is unavailable.\");\n// after\nif (!onReorderQueuedComments) {\n  toastActions?.pushToast({ title: \"Reordering is not available here\", tone: \"warning\" });\n  return;\n}","handlingStrategy":"validation","validationCode":"if (!onReorderQueuedComments) return; // hide reorder handles","typeGuard":"function canReorder(p: { onReorderQueuedComments?: unknown }): p is { onReorderQueuedComments: (ids: string[], rev: number) => Promise<void> } { return typeof p.onReorderQueuedComments === 'function'; }","tryCatchPattern":"try { await onReorder(orderedCommentIds, revision); } catch (e) { if (/reordering is unavailable/.test(e.message)) showToast('Reordering not supported here'); else throw e; }","preventionTips":["Pass queue mutation callbacks whenever queue data is passed","Make queue + reorder props a single required object","Hide drag handles when the callback is absent","Add a type-level check that queuedMessageQueue implies onReorderQueuedComments"],"tags":["ui-state","callback","props"],"backgroundTag":"missing-required-argument","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}