{"record":{"id":"aa700bb3d633d7ee","repo":"tinyhumansai/openhuman","slug":"overlay-could-not-resolve-current-monitor-for-po","errorCode":null,"errorMessage":"[overlay] could not resolve current monitor for positioning","messagePattern":"\\[overlay\\] could not resolve current monitor for positioning","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/overlay/OverlayApp.tsx","lineNumber":664,"sourceCode":"        try {\n          const { x, y } = JSON.parse(saved) as { x: number; y: number };\n          await appWindow.setPosition(new LogicalPosition(x, y));\n          userDraggedRef.current = true;\n          return;\n        } catch {\n          localStorage.removeItem(OVERLAY_POSITION_KEY);\n        }\n      }\n\n      if (userDraggedRef.current) {\n        return;\n      }\n\n      // Default: pin to bottom-right corner\n      try {\n        const monitor = await currentMonitor();\n        if (!monitor) {\n          console.warn('[overlay] could not resolve current monitor for positioning');\n          return;\n        }\n\n        const x = monitor.workArea.position.x + monitor.workArea.size.width - width - margin;\n        const y = monitor.workArea.position.y + monitor.workArea.size.height - height - margin;\n        await appWindow.setPosition(new LogicalPosition(x, y));\n      } catch (error) {\n        console.warn('[overlay] failed to pin overlay bottom-right after resize', error);\n      }\n    };\n\n    void updateWindowFrame();\n  }, [status]);\n\n  // ── Render ────────────────────────────────────────────────────────────\n  const bubbles = useMemo<OverlayBubble[]>(() => (bubble ? [bubble] : []), [bubble]);\n  const orbClassName = useMemo(() => {\n    if (status === 'active') {","sourceCodeStart":646,"sourceCodeEnd":682,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/overlay/OverlayApp.tsx#L646-L682","documentation":"Overlay default-positioning path: no saved drag position existed (or the saved one was invalid and was removed), so the code asked Tauri's currentMonitor() for the display geometry to pin the overlay bottom-right — and it returned null/undefined. The function returns without repositioning; the OS/window-manager default placement is used instead, which may land the overlay on a non-ideal screen or spot.","triggerScenarios":"Thrown at app/src/overlay/OverlayApp.tsx:664 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drag the overlay once — the manual position persists to localStorage and bypasses monitor resolution","Reconnect/enable displays if the window is on a detached monitor","Restart the app; monitor enumeration is often transiently empty during startup"],"exampleFix":null,"handlingStrategy":"fallback","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"}