From 6b2df8a35686f50d4570423197a402de819b59c6 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Tue, 31 Mar 2026 16:43:26 +0800 Subject: [PATCH] feat(web): show toast with link after creating an issue After creating an issue, a success toast appears showing the issue identifier (e.g. MUL-72) with a "View issue" action button that navigates to the issue detail page. Similar to Linear's behavior. --- apps/web/features/modals/create-issue.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/web/features/modals/create-issue.tsx b/apps/web/features/modals/create-issue.tsx index abb0d0c6..3d77a379 100644 --- a/apps/web/features/modals/create-issue.tsx +++ b/apps/web/features/modals/create-issue.tsx @@ -1,6 +1,7 @@ "use client"; import { useState, useRef } from "react"; +import { useRouter } from "next/navigation"; import { Bot, CalendarDays, ChevronRight, Maximize2, Minimize2, UserMinus, X } from "lucide-react"; import { cn } from "@/lib/utils"; import { toast } from "sonner"; @@ -62,6 +63,7 @@ function PillButton({ // --------------------------------------------------------------------------- export function CreateIssueModal({ onClose, data }: { onClose: () => void; data?: Record | null }) { + const router = useRouter(); const workspaceName = useWorkspaceStore((s) => s.workspace?.name); const members = useWorkspaceStore((s) => s.members); const agents = useWorkspaceStore((s) => s.agents); @@ -125,6 +127,12 @@ export function CreateIssueModal({ onClose, data }: { onClose: () => void; data? useIssueStore.getState().addIssue(issue); clearDraft(); onClose(); + toast.success(`${issue.identifier} created`, { + action: { + label: "View issue", + onClick: () => router.push(`/issues/${issue.id}`), + }, + }); } catch { toast.error("Failed to create issue"); } finally {