From 84c07718aaa4224953cf7f6cf986e825c8900cd5 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Thu, 25 Jun 2026 11:13:07 +0900 Subject: feat(workspaces): open workspace in a new browser tab The 'Open' button on a workspace card did client-side navigation (onNavigate -> pushState), opening the workspace in the SAME tab. Replace the JS click handler with a native anchor using target="_blank" (+ rel=noopener noreferrer) so clicking Open opens the workspace in a NEW browser tab. The new tab does a full load and routes to / via the existing parsePath -> App wiring. The card no longer needs the onNavigate prop (its only navigation was the Open button), so drop it from WorkspaceCard + WorkspacesHome and update the card tests to assert the new-tab link attributes instead of the onNavigate call. --- src/features/workspaces/ui/WorkspaceCard.svelte | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/features/workspaces/ui/WorkspaceCard.svelte') diff --git a/src/features/workspaces/ui/WorkspaceCard.svelte b/src/features/workspaces/ui/WorkspaceCard.svelte index 6348bb9..81d6fe3 100644 --- a/src/features/workspaces/ui/WorkspaceCard.svelte +++ b/src/features/workspaces/ui/WorkspaceCard.svelte @@ -8,11 +8,9 @@ let { ws, store, - onNavigate, }: { ws: WorkspaceEntry; store: WorkspaceStore; - onNavigate: (path: string) => void; } = $props(); // ── Title: double-click to rename inline ────────────────────────────────── @@ -79,10 +77,6 @@ await store.remove(ws.id); deleting = false; } - - function open(): void { - onNavigate(workspacePath(ws.id)); - }
  • @@ -163,10 +157,8 @@ { - e.preventDefault(); - open(); - }} + target="_blank" + rel="noopener noreferrer" > Open -- cgit v1.2.3