{"record":{"id":"ba5778eefd171532","repo":"paperclipai/paperclip","slug":"review-unavailable","errorCode":null,"errorMessage":"Review unavailable","messagePattern":"Review unavailable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/components/IssueChatThread.tsx","lineNumber":5396,"sourceCode":"\n      {uncertainSubmission ? (\n        <div\n          role=\"alert\"\n          className=\"mb-3 space-y-2 rounded-md border border-border bg-muted p-3 text-sm\"\n        >\n          <p>\n            We couldn’t confirm whether this comment was saved. It may already\n            be in the conversation. Review it before starting another draft.\n          </p>\n          <Button\n            type=\"button\"\n            variant=\"outline\"\n            size=\"sm\"\n            onClick={async () => {\n              setReviewError(false);\n              try {\n                if (!onReviewConversation)\n                  throw new Error(\"Review unavailable\");\n                await onReviewConversation();\n                if (mountedTaskKey.current !== draftKey) return;\n                const reviewed = { ...uncertainSubmission, reviewed: true };\n                setUncertainSubmission(reviewed);\n                if (\n                  draftKey &&\n                  loadDraftSubmission(draftKey)?.attemptId ===\n                    reviewed.attemptId\n                )\n                  saveDraftSubmission(draftKey, reviewed);\n              } catch {\n                setReviewError(true);\n              }\n            }}\n          >\n            Review conversation\n          </Button>\n          {reviewError ? (","sourceCodeStart":5378,"sourceCodeEnd":5414,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/ui/src/components/IssueChatThread.tsx#L5378-L5414","documentation":"IssueChatThread's uncertain-submission review button throws this when the review flow is clicked but no `onReviewConversation` callback was supplied to the component. The component cannot perform the review conversation request itself, so it fails fast instead of silently doing nothing. It is caught by the surrounding try/catch which sets `reviewError` and shows an inline error UI.","triggerScenarios":"Rendering <IssueChatThread> without an `onReviewConversation` prop while an uncertain submission exists, then clicking the 'review' outline button.","commonSituations":"Embedding IssueChatThread in a custom page or storybook harness that wires chat submission but forgets the review callback; a refactor removing the prop wiring from a parent page.","solutions":["Pass an `onReviewConversation` prop when rendering IssueChatThread wherever uncertain submissions can occur.","If the context truly has no review capability, hide the review button by not rendering uncertain submission UI (or gate on the prop).","Check the parent that renders IssueChatThread for a recently dropped prop in git history."],"exampleFix":"// before\n<IssueChatThread issueId={id} onSubmit={submit} />\n// after\n<IssueChatThread issueId={id} onSubmit={submit} onReviewConversation={reviewConversation} />","handlingStrategy":"try-catch","validationCode":"if (typeof onReviewConversation !== 'function') console.warn('IssueChatThread: review disabled — no onReviewConversation');","typeGuard":"const canReview = (p: unknown): p is () => Promise<void> => typeof p === 'function';","tryCatchPattern":"try { await onReviewConversation(); } catch { setReviewError(true); }","preventionTips":["Make onReviewConversation a required prop when uncertain submissions are enabled.","Render the review button conditionally on the prop's presence.","Add a storybook/test case rendering the composer without the prop."],"tags":["react","missing-prop","ui"],"backgroundTag":"missing-required-argument","analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}