Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(web): navigate to /issues when switching workspaces

Jiayuanb1f7364097fa
diff --git a/apps/web/app/(dashboard)/_components/app-sidebar.tsx b/apps/web/app/(dashboard)/_components/app-sidebar.tsx
index 7657d0397f..257bb51810 100644
--- a/apps/web/app/(dashboard)/_components/app-sidebar.tsx
+++ b/apps/web/app/(dashboard)/_components/app-sidebar.tsx
@@ -132,6 +132,7 @@ export function AppSidebar() {
key={ws.id}
onClick={() => {
if (ws.id !== workspace?.id) {
+ router.push("/issues");
switchWorkspace(ws.id);
}
}}
diff --git a/apps/web/features/modals/create-workspace.tsx b/apps/web/features/modals/create-workspace.tsx
index 29c5485613..6400b1dd1b 100644
--- a/apps/web/features/modals/create-workspace.tsx
+++ b/apps/web/features/modals/create-workspace.tsx
@@ -1,6 +1,7 @@
"use client";
import { useState } from "react";
+import { useRouter } from "next/navigation";
import { toast } from "sonner";
import { ArrowLeft } from "lucide-react";
import { Input } from "@/components/ui/input";
@@ -18,6 +19,7 @@ import { useWorkspaceStore } from "@/features/workspace";
const SLUG_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
export function CreateWorkspaceModal({ onClose }: { onClose: () => void }) {
+ const router = useRouter();
const [name, setName] = useState("");
const [slug, setSlug] = useState("");
const [creating, setCreating] = useState(false);
@@ -50,6 +52,7 @@ export function CreateWorkspaceModal({ onClose }: { onClose: () => void }) {
slug: slug.trim(),
});
onClose();
+ router.push("/issues");
await switchWorkspace(ws.id);
} catch {
toast.error("Failed to create workspace");