New Topic
diff --git a/src/components/messaging/TopicThreadList.tsx b/src/components/messaging/TopicThreadList.tsx
index 1be34f8..76c41d5 100644
--- a/src/components/messaging/TopicThreadList.tsx
+++ b/src/components/messaging/TopicThreadList.tsx
@@ -79,7 +79,7 @@ export default function TopicThreadList({
type="button"
onClick={(e) => { e.stopPropagation(); setPendingDelete({ id: t.id, subject: t.subject }); }}
title="Delete topic"
- className="absolute right-2 top-2 hidden group-hover:flex h-6 w-6 items-center justify-center rounded-md bg-background/80 text-muted-foreground hover:text-destructive"
+ className="absolute right-2 bottom-2 flex h-7 w-7 items-center justify-center rounded-md bg-background/70 text-muted-foreground opacity-60 hover:opacity-100 hover:text-destructive hover:bg-background"
>
diff --git a/src/pages/MessagesPage.tsx b/src/pages/MessagesPage.tsx
index 5d5f632..6b4753e 100644
--- a/src/pages/MessagesPage.tsx
+++ b/src/pages/MessagesPage.tsx
@@ -4,6 +4,7 @@ import ConversationList from "@/components/messaging/ConversationList";
import ChatView from "@/components/messaging/ChatView";
import TopicThreadList from "@/components/messaging/TopicThreadList";
import TopicThreadView from "@/components/messaging/TopicThreadView";
+import NewTopicThreadDialog from "@/components/messaging/NewTopicThreadDialog";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
export default function MessagesPage() {
@@ -12,6 +13,8 @@ export default function MessagesPage() {
const [selectedThreadId, setSelectedThreadId] = useState(null);
const [searchParams, setSearchParams] = useSearchParams();
const [tab, setTab] = useState<"direct" | "topics">("direct");
+ const [composerOpen, setComposerOpen] = useState(false);
+ const [boardPrefill, setBoardPrefill] = useState(undefined);
// Deep-link from a topic notification (/dashboard/messages?thread=).
useEffect(() => {
@@ -35,7 +38,15 @@ export default function MessagesPage() {
}
};
+ // "Message whole board" from the Direct dialog → open the group-topic composer
+ // prefilled with that board's members.
+ const handleMessageWholeBoard = (memberIds: string[]) => {
+ setBoardPrefill(memberIds);
+ setComposerOpen(true);
+ };
+
return (
+ <>
setTab(v as "direct" | "topics")} className="space-y-3">
Direct
@@ -48,6 +59,7 @@ export default function MessagesPage() {
@@ -63,5 +75,14 @@ export default function MessagesPage() {
+
+ { setTab("topics"); handleSelectThread(id); }}
+ />
+ >
);
}