{"record":{"id":"40022879212d1ac2","repo":"paperclipai/paperclip","slug":"this-item-is-not-ready-for-a-decision","errorCode":null,"errorMessage":"This item is not ready for a decision.","messagePattern":"This item is not ready for a decision\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/Pipelines.tsx","lineNumber":4895,"sourceCode":"    }\n    if (!activeRowId || !visibleRows.some((row) => row.id === activeRowId)) {\n      setActiveRowId(visibleRows[0].id);\n    }\n  }, [activeRowId, visibleRows]);\n\n  const invalidateReviewQueue = async () => {\n    if (!selectedCompanyId) return;\n    await Promise.all([\n      queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.attention(selectedCompanyId) }),\n      queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.reviewCases(selectedCompanyId) }),\n      queryClient.invalidateQueries({ queryKey: queryKeys.pipelines.list(selectedCompanyId) }),\n    ]);\n  };\n\n  const decideRow = useMutation({\n    mutationFn: async ({ row, decision, note }: { row: ReviewQueueRow; decision: \"approve\" | \"decline\" | \"request_changes\"; note?: string }) => {\n      if (row.kind === \"suggestion\") {\n        if (!row.suggestionId) throw new Error(\"This item is not ready for a decision.\");\n        await pipelinesApi.resolveSuggestion(row.caseId, {\n          suggestionId: row.suggestionId,\n          resolution: decision === \"approve\" ? \"accept\" : \"dismiss\",\n          expectedVersion: row.expectedVersion ?? undefined,\n          reason: note || null,\n        });\n        return;\n      }\n      if (row.expectedVersion === null) throw new Error(\"This item is not ready for a decision.\");\n      await pipelinesApi.reviewCase(row.caseId, {\n        decision: decision === \"request_changes\" ? \"request_changes\" : \"approve\",\n        reason: note || null,\n        expectedVersion: row.expectedVersion,\n      });\n    },\n    onMutate: ({ row }) => {\n      setPendingRowIds((current) => new Set(current).add(row.id));\n      setHiddenRowIds((current) => new Set(current).add(row.id));","sourceCodeStart":4877,"sourceCodeEnd":4913,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/pages/Pipelines.tsx#L4877-L4913","documentation":"Error \"This item is not ready for a decision.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/Pipelines.tsx:4894 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait until the item reaches a decidable state (all inputs ready), then make the decision."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}