{"record":{"id":"d12794136ede5dd7","repo":"tinyhumansai/openhuman","slug":"overlay-failed-to-pin-overlay-bottom-right-after","errorCode":null,"errorMessage":"[overlay] failed to pin overlay bottom-right after resize","messagePattern":"\\[overlay\\] failed to pin overlay bottom-right after resize","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/overlay/OverlayApp.tsx","lineNumber":672,"sourceCode":"      }\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') {\n      return 'border-blue-950 bg-blue-700';\n    }\n    return 'border-slate-950 bg-slate-800';\n  }, [status]);\n  const tetrahedronInverted = status === 'active';\n  const orbSizeClassName = status === 'active' ? 'h-[52px] w-[52px]' : 'h-[40px] w-[40px]';\n  const orbCanvasClassName = status === 'active' ? 'h-[92%] w-[92%]' : 'h-[88%] w-[88%]';\n  const orbStyle =","sourceCodeStart":654,"sourceCodeEnd":690,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/overlay/OverlayApp.tsx#L654-L690","documentation":"Pinning the overlay window to the bottom-right of the monitor work area after a resize failed: computing or applying the new LogicalPosition threw (currentMonitor lookup succeeded — a missing monitor is warned separately). The overlay keeps whatever position it had; since the default pin only runs when the user has not dragged the window, the window may sit mispositioned relative to the new size until the next layout pass.","triggerScenarios":"Thrown at app/src/overlay/OverlayApp.tsx:672 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the warned error for the Tauri window-manager failure reason","If the overlay is visibly mispositioned, drag it once (setting userDraggedRef) or trigger a resize to force repositioning","Multi-monitor sleeps/wakes can invalidate monitor handles — reopening the overlay refreshes the monitor query","Persistent failures point to a shell-level window issue; check the Tauri log"],"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-14T05:17:10.506Z"}