diff --git a/apps/client/src/components/layouts/global/aside.tsx b/apps/client/src/components/layouts/global/aside.tsx
index a2b50a7f..ff5958b0 100644
--- a/apps/client/src/components/layouts/global/aside.tsx
+++ b/apps/client/src/components/layouts/global/aside.tsx
@@ -27,7 +27,9 @@ export default function Aside() {
switch (tab) {
case "comments":
- component = ;
+ component = (
+
+ );
title = "Comments";
break;
case "toc":
@@ -45,25 +47,26 @@ export default function Aside() {
return (
- {component && (
- <>
-
- {t(title)}
-
-
-
-
-
-
-
- {tab === "comments" ? (
- component
- ) : (
+ {component &&
+ (tab === "comments" ? (
+ component
+ ) : (
+ <>
+
+
+ {t(title)}
+
+
+
+
+
+
+
{component}
- )}
- >
- )}
+ >
+ ))}
);
}
diff --git a/apps/client/src/features/comment/components/comment-list-with-tabs.tsx b/apps/client/src/features/comment/components/comment-list-with-tabs.tsx
index ae02e72f..91fe3e38 100644
--- a/apps/client/src/features/comment/components/comment-list-with-tabs.tsx
+++ b/apps/client/src/features/comment/components/comment-list-with-tabs.tsx
@@ -11,6 +11,8 @@ import {
Badge,
Text,
ScrollArea,
+ Title,
+ Tooltip,
} from "@mantine/core";
import CommentListItem from "@/features/comment/components/comment-list-item";
import {
@@ -26,12 +28,17 @@ import { IPagination } from "@/lib/types.ts";
import { extractPageSlugId } from "@/lib";
import { useTranslation } from "react-i18next";
import { useGetSpaceBySlugQuery } from "@/features/space/queries/space-query.ts";
-import { IconArrowUp, IconMessageOff } from "@tabler/icons-react";
+import { IconArrowUp, IconMessageOff, IconX } from "@tabler/icons-react";
import { useAtom } from "jotai";
import { currentUserAtom } from "@/features/user/atoms/current-user-atom";
import { CustomAvatar } from "@/components/ui/custom-avatar.tsx";
-function CommentListWithTabs() {
+interface CommentListWithTabsProps {
+ title?: string;
+ onClose?: () => void;
+}
+
+function CommentListWithTabs({ title, onClose }: CommentListWithTabsProps) {
const { t } = useTranslation();
const { pageSlug } = useParams();
const { data: page } = usePageQuery({ pageId: extractPageSlugId(pageSlug) });
@@ -194,28 +201,70 @@ function CommentListWithTabs() {
overflow: "hidden",
}}
>
-
-
- {activeComments.length}
-
- }
- >
- {t("Open")}
-
-
- {resolvedComments.length}
-
- }
- >
- {t("Resolved")}
-
-
+ {/* Single header row: a full-width centered tab list with the panel
+ title overlaid on the left and the close button on the right.
+ Title/close are kept OUTSIDE Tabs.List (which is role="tablist")
+ so the tablist only owns role="tab" children — the tab list still
+ spans full width, so its bottom border line stays full-width. */}
+
+ {title && (
+
+ {title}
+
+ )}
+
+
+ {activeComments.length}
+
+ }
+ >
+ {t("Open")}
+
+
+ {resolvedComments.length}
+
+ }
+ >
+ {t("Resolved")}
+
+
+ {onClose && (
+
+
+
+
+
+ )}
+