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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user