fix: remove features string from window.open to enable tab reuse

window.open(url, name, 'noopener,noreferrer') with a non-empty features
string forces a new popup window and ignores the name for tab reuse.
Remove the third parameter so the browser focuses existing named tabs.

Quality gates: tsc --noEmit pass, npm run build pass, 80/80 tests pass
This commit is contained in:
Developer
2026-06-09 12:18:28 +00:00
parent 486f3cbc44
commit e5e29aca49
3 changed files with 223 additions and 222 deletions
+3 -3
View File
@@ -37,14 +37,14 @@ export function useInstanceActions(
const handleOpen = useCallback((session: Session) => {
const tabName = `session-${session.id}`;
if (session.url) {
window.open(session.url, tabName, "noopener,noreferrer");
window.open(session.url, tabName);
return;
}
if (session.tool_type_interfaces?.includes("terminal")) {
window.open(`/instances/${session.id}/terminal`, tabName, "noopener,noreferrer");
window.open(`/instances/${session.id}/terminal`, tabName);
return;
}
window.open(`/projects/${session.project_id}`, tabName, "noopener,noreferrer");
window.open(`/projects/${session.project_id}`, tabName);
}, []);
const handleStart = useCallback(