{isGenerativeAiEnabled && (
diff --git a/apps/client/src/features/editor/components/mention/mention-suggestion.ts b/apps/client/src/features/editor/components/mention/mention-suggestion.ts
index 01a4ffad..658fd182 100644
--- a/apps/client/src/features/editor/components/mention/mention-suggestion.ts
+++ b/apps/client/src/features/editor/components/mention/mention-suggestion.ts
@@ -106,7 +106,7 @@ const mentionRenderItems = () => {
left: `${x}px`,
top: `${y}px`,
position: "absolute",
- zIndex: "100",
+ zIndex: "190",
});
});
},
diff --git a/apps/server/src/core/comment/comment.service.ts b/apps/server/src/core/comment/comment.service.ts
index 91a96554..84824544 100644
--- a/apps/server/src/core/comment/comment.service.ts
+++ b/apps/server/src/core/comment/comment.service.ts
@@ -66,8 +66,8 @@ export class CommentService {
const comment = await this.commentRepo.insertComment({
pageId: page.id,
content: commentContent,
- selection: createCommentDto?.selection?.substring(0, 250),
- type: 'inline',
+ selection: createCommentDto?.selection?.substring(0, 250) ?? null,
+ type: createCommentDto.type ?? 'page',
parentCommentId: createCommentDto?.parentCommentId,
creatorId: userId,
workspaceId: workspaceId,
diff --git a/apps/server/src/core/comment/dto/create-comment.dto.ts b/apps/server/src/core/comment/dto/create-comment.dto.ts
index 26bdbf26..ca21f47b 100644
--- a/apps/server/src/core/comment/dto/create-comment.dto.ts
+++ b/apps/server/src/core/comment/dto/create-comment.dto.ts
@@ -1,4 +1,4 @@
-import { IsJSON, IsOptional, IsString, IsUUID } from 'class-validator';
+import { IsIn, IsJSON, IsOptional, IsString, IsUUID } from 'class-validator';
export class CreateCommentDto {
@IsString()
@@ -11,6 +11,10 @@ export class CreateCommentDto {
@IsString()
selection: string;
+ @IsOptional()
+ @IsIn(['inline', 'page'])
+ type: string;
+
@IsOptional()
@IsUUID()
parentCommentId: string;