From 04ee4cb33141b8a37bfdb2c8fcebaffc6352887d Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Tue, 30 Jun 2026 10:06:49 +0200 Subject: [PATCH] feat: claim deal presence and suppress the page cursor layer while the CRM deal dialog is open --- web/src/app/app/crm/deals/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/src/app/app/crm/deals/page.tsx b/web/src/app/app/crm/deals/page.tsx index cc6a3355..836b5943 100644 --- a/web/src/app/app/crm/deals/page.tsx +++ b/web/src/app/app/crm/deals/page.tsx @@ -49,6 +49,9 @@ import useCreateDeal from "@/lib/api/hooks/app/crm/deals/useCreateDeal"; import useUpdateDeal from "@/lib/api/hooks/app/crm/deals/useUpdateDeal"; import useDeleteDeal from "@/lib/api/hooks/app/crm/deals/useDeleteDeal"; import { useConfirm } from "@/hooks/context/confirm"; +import { usePresenceResource } from "@/hooks/PresenceProvider"; +import { useSuppressGlobalCursors } from "@/components/app/presence/GlobalCursors"; +import ResourceViewers from "@/components/app/presence/ResourceViewers"; import type Deal from "@/lib/api/models/app/crm/Deal"; import type { Stage } from "@/lib/api/models/app/crm/Pipeline"; import type { AppError } from "@/lib/api/client/normalizeError"; @@ -559,6 +562,10 @@ function DealDialog({ const del = useDeleteDeal(); const confirm = useConfirm(); + usePresenceResource(editing?.id ? `deal:${editing.id}` : null, "editing"); + // While this full-screen dialog is open it owns the pointer; silence the page cursor. + useSuppressGlobalCursors(open); + const [name, setName] = React.useState(""); const [stageId, setStageId] = React.useState(""); const [value, setValue] = React.useState(""); @@ -680,6 +687,10 @@ function DealDialog({
Deal + {editing && (