feat: open all sessions in new tabs; sidebar terminal links
Sidebar SessionItem was only opening web tool URLs in new tabs. Terminal sessions linked to the project page in the same tab. SessionCard 'Open' buttons for terminal sessions navigated in-place. Changes: - app-shell.tsx: SessionItem now builds terminal URLs (/instances/:id/terminal) and always uses target=_blank - session-card.tsx: compute openHref for both web and terminal sessions, render <a> links with target=_blank instead of callback buttons - use-instance-actions.ts: handleOpen now uses window.open(..., '_blank') for terminal sessions and project fallback All session opening (sidebar, cards, callbacks) now consistently opens in a new tab. Quality gates: tsc clean
This commit is contained in:
@@ -40,10 +40,10 @@ export function useInstanceActions(
|
||||
return;
|
||||
}
|
||||
if (session.tool_type_interfaces?.includes("terminal")) {
|
||||
window.location.href = `/instances/${session.id}/terminal`;
|
||||
window.open(`/instances/${session.id}/terminal`, "_blank", "noopener,noreferrer");
|
||||
return;
|
||||
}
|
||||
window.location.href = `/projects/${session.project_id}`;
|
||||
window.open(`/projects/${session.project_id}`, "_blank", "noopener,noreferrer");
|
||||
}, []);
|
||||
|
||||
const handleStart = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user