;
-
-export const UserHasAccess: Story = {
- args: {
- userCanView: true,
- children: Content that the user can view
,
- },
-};
-
-export const UserDeniedAccess: Story = {
- args: {
- userCanView: false,
- children: Content that should not be visible
,
- },
-};
diff --git a/apps/nextjs/src/components/AppComponents/Chat/Chat/ChatUserAccessCheck.tsx b/apps/nextjs/src/components/AppComponents/Chat/Chat/ChatUserAccessCheck.tsx
deleted file mode 100644
index b8b889bf8..000000000
--- a/apps/nextjs/src/components/AppComponents/Chat/Chat/ChatUserAccessCheck.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from "react";
-
-import { Flex } from "@radix-ui/themes";
-
-export interface ChatUserAccessCheckProps {
- userCanView: boolean;
- children: React.ReactNode;
-}
-
-const ChatUserAccessCheck: React.FC = ({
- userCanView,
- children,
-}) => {
- if (!userCanView) {
- return (
-
-
- Sorry, you do not have permission to view this page.
-
-
- );
- }
-
- return <>{children}>;
-};
-
-export default ChatUserAccessCheck;
diff --git a/apps/nextjs/src/components/AppComponents/Chat/chat-history.stories.tsx b/apps/nextjs/src/components/AppComponents/Chat/chat-history.stories.tsx
index ee875272b..21c3e5120 100644
--- a/apps/nextjs/src/components/AppComponents/Chat/chat-history.stories.tsx
+++ b/apps/nextjs/src/components/AppComponents/Chat/chat-history.stories.tsx
@@ -1,3 +1,4 @@
+import * as Dialog from "@radix-ui/react-dialog";
import type { Meta, StoryObj } from "@storybook/react";
import { ChatHistory } from "./chat-history";
@@ -9,6 +10,13 @@ const meta: Meta = {
layout: "centered",
},
tags: ["autodocs"],
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
};
export default meta;
diff --git a/apps/nextjs/src/components/AppComponents/Chat/sidebar-actions.stories.tsx b/apps/nextjs/src/components/AppComponents/Chat/sidebar-actions.stories.tsx
index 496c40aae..d0310566d 100644
--- a/apps/nextjs/src/components/AppComponents/Chat/sidebar-actions.stories.tsx
+++ b/apps/nextjs/src/components/AppComponents/Chat/sidebar-actions.stories.tsx
@@ -27,6 +27,8 @@ export const Default: Story = {
},
};
+// NOTE: The modal appears on a parent element which isn't captured by visual testing
+// TODO: Test the modal directly
export const SharePending: Story = {
args: {
...Default.args,
@@ -38,6 +40,8 @@ export const SharePending: Story = {
},
};
+// NOTE: The modal appears on a parent element which isn't captured by visual testing
+// TODO: Test the modal directly
export const RemovePending: Story = {
args: {
...Default.args,