Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: keep layout picker dropdown anchored on scroll

Adam Eivy1c6f0797a01c
diff --git a/client/src/components/dashboard/LayoutPicker.jsx b/client/src/components/dashboard/LayoutPicker.jsx
index d2f8a29339..fa004f1be1 100644
--- a/client/src/components/dashboard/LayoutPicker.jsx
+++ b/client/src/components/dashboard/LayoutPicker.jsx
@@ -50,7 +50,15 @@ export default function LayoutPicker({ layouts, activeLayoutId, onSelect, onEdit
};
compute();
window.addEventListener('resize', compute);
- return () => window.removeEventListener('resize', compute);
+ // Capture-phase scroll catches scrolls in any ancestor (the Dashboard
+ // sits inside Layout's overflow-auto <main>, so window-level scroll
+ // events alone wouldn't fire and the fixed-positioned menu would
+ // detach from its trigger as the page scrolled).
+ window.addEventListener('scroll', compute, { capture: true, passive: true });
+ return () => {
+ window.removeEventListener('resize', compute);
+ window.removeEventListener('scroll', compute, { capture: true });
+ };
}, [open]);
return (