Guard the second manage-agents handler before its side effects too

The previous commit claimed both handlers, but only the first one
changed: the search text expected `if (...) return;` on a single line
while prettier had already wrapped it across two, so the second
replacement silently matched nothing. A ctrl/cmd/shift-click on the
collapsed-list entry therefore still closed the mobile nav and cleared
the selected agent in the tab it left behind.
This commit is contained in:
Alex committed 2026-09-22 00:54:57 +01:00
1 parent 2da6445934
commit f50df10311
1 file changed
+2 -2
+2 -2
View File
@@ -646,11 +646,11 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
to={AGENTS_MANAGE_ROOT}
end
onClick={(event) => {
closeNavOnMobile();
dispatch(setSelectedAgent(null));
if (event.metaKey || event.ctrlKey || event.shiftKey)
return;
event.preventDefault();
closeNavOnMobile();
dispatch(setSelectedAgent(null));
goToLevel(AGENTS_MANAGE_ROOT);
}}
className={({ isActive }) =>