{"record":{"id":"1455ac886b9c69c5","repo":"tinyhumansai/openhuman","slug":"ai-panel-backfill-status-check-failed","errorCode":null,"errorMessage":"[ai-panel] backfill status check failed","messagePattern":"\\[ai-panel\\] backfill status check failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/settings/panels/useReembedBackfillModal.ts","lineNumber":46,"sourceCode":"const POLL_MS = 2000;\n\n/**\n * @param save Persists settings; resolves `true` only on a successful write\n *   (a failed save did not change the embedder, so nothing to surface).\n */\nexport function useReembedBackfillModal(save: () => Promise<boolean>): ReembedBackfillModal {\n  const [reembed, setReembed] = useState<ReembedState>({ open: false, pending: 0 });\n\n  const handleSave = useCallback(async () => {\n    const ok = await save();\n    if (!ok) return;\n    try {\n      const st = await memoryTreeBackfillStatus();\n      if (st.in_progress) {\n        setReembed({ open: true, pending: st.pending_jobs });\n      }\n    } catch (e) {\n      console.warn('[ai-panel] backfill status check failed', e);\n    }\n  }, [save]);\n\n  const dismissReembed = useCallback(() => setReembed({ open: false, pending: 0 }), []);\n\n  useEffect(() => {\n    if (!reembed.open) return;\n    let cancelled = false;\n    // Serialize polls — if a status call takes >POLL_MS, skip the next tick\n    // rather than overlapping requests.\n    let inFlight = false;\n    const id = window.setInterval(() => {\n      if (inFlight) return;\n      inFlight = true;\n      void (async () => {\n        try {\n          const st = await memoryTreeBackfillStatus();\n          if (cancelled) return;","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/settings/panels/useReembedBackfillModal.ts#L28-L64","documentation":"The initial memory-tree backfill status check failed after a successful settings save: memoryTreeBackfillStatus rejected, so the hook could not determine whether a re-embed backfill was triggered (st.in_progress). Consequently the backfill progress modal is never opened — a running backfill proceeds unmonitored rather than being surfaced to the user.","triggerScenarios":"Thrown at app/src/components/settings/panels/useReembedBackfillModal.ts:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the warned error — core RPC transport or auth expiry are the usual causes","Re-save the embedder setting to re-trigger the status check once healthy","The backfill itself runs core-side regardless; verify progress later via the AI/memory settings status","Persistent failures: inspect core logs for the memory tree backfill status handler"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}