{"record":{"id":"c75141b669df06bf","repo":"paperclipai/paperclip","slug":"run-details-are-still-loading","errorCode":null,"errorMessage":"Run details are still loading.","messagePattern":"Run details are still loading\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/SkillStudio.tsx","lineNumber":3056,"sourceCode":"  });\n\n  const cancelMutation = useMutation({\n    mutationFn: () => companySkillsApi.cancelTestRun(companyId, skillId, runId),\n    onSuccess: () =>\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.companySkills.testRunDetail(companyId, skillId, runId),\n      }),\n    onError: onError(\"Couldn't cancel run\"),\n  });\n\n  // Re-run reproduces the VIEWED run's snapshots — pinned skill version, saved\n  // input (or the ad-hoc snapshot), and agent — rather than whatever the picker\n  // happens to hold this session (PAP-13001 Bug A). Reading detailQuery.data at\n  // mutate() time keeps the hook order stable across the loading guards below.\n  const reRunMutation = useMutation({\n    mutationFn: () => {\n      const d = detailQuery.data;\n      if (!d) throw new Error(\"Run details are still loading.\");\n      return companySkillsApi.createTestRun(companyId, skillId, buildReRunRequest(d));\n    },\n    onSuccess: (run) => {\n      queryClient.invalidateQueries({\n        queryKey: [\"company-skills\", companyId, skillId, \"test-runs\"],\n      });\n      onSelectRun(run.id);\n    },\n    onError: onError(\"Couldn't re-run\"),\n  });\n\n  const deleteMutation = useMutation({\n    mutationFn: () => companySkillsApi.deleteTestRun(companyId, skillId, runId),\n    onSuccess: () => {\n      queryClient.invalidateQueries({\n        queryKey: [\"company-skills\", companyId, skillId, \"test-runs\"],\n      });\n      onSelectRun(null);","sourceCodeStart":3038,"sourceCodeEnd":3074,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/pages/SkillStudio.tsx#L3038-L3074","documentation":"Error \"Run details are still loading.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/SkillStudio.tsx:3056 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for the run details to finish loading, then retry the action."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}