diff --git a/surfsense_web/app/dashboard/[search_space_id]/team/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/team/page.tsx new file mode 100644 index 000000000..c75eaf4e4 --- /dev/null +++ b/surfsense_web/app/dashboard/[search_space_id]/team/page.tsx @@ -0,0 +1,15 @@ +import { TeamContent } from "./team-content"; + +export default async function TeamPage({ + params, +}: { + params: Promise<{ search_space_id: string }>; +}) { + const { search_space_id } = await params; + + return ( +
+ +
+ ); +} diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx index 0ef65d98b..e87798a14 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx @@ -307,9 +307,9 @@ export function AgentPermissionsContent() { - Allow — run without asking - Ask — pause for approval - Deny — block silently + Allow (run without asking) + Ask (pause for approval) + Deny (block silently)

diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentStatusContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentStatusContent.tsx index e32e1bfc6..fd7be1a23 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentStatusContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentStatusContent.tsx @@ -285,8 +285,8 @@ export function AgentStatusContent() {

- Showing a read-only mirror of the backend's AgentFeatureFlags. Flip an env - var and restart the backend to change a value. + Showing a read-only mirror of the backend's AgentFeatureFlags. Flip an + env var and restart the backend to change a value.

diff --git a/surfsense_web/atoms/layout/dialogs.atom.ts b/surfsense_web/atoms/layout/dialogs.atom.ts index e9ee0c6ea..01c4628cc 100644 --- a/surfsense_web/atoms/layout/dialogs.atom.ts +++ b/surfsense_web/atoms/layout/dialogs.atom.ts @@ -1,5 +1,3 @@ import { atom } from "jotai"; -export const teamDialogAtom = atom(false); - export const announcementsDialogAtom = atom(false); diff --git a/surfsense_web/components/layout/providers/LayoutDataProvider.tsx b/surfsense_web/components/layout/providers/LayoutDataProvider.tsx index 5d1f2566b..917d1c6e1 100644 --- a/surfsense_web/components/layout/providers/LayoutDataProvider.tsx +++ b/surfsense_web/components/layout/providers/LayoutDataProvider.tsx @@ -11,7 +11,7 @@ import { toast } from "sonner"; import { currentThreadAtom, resetCurrentThreadAtom } from "@/atoms/chat/current-thread.atom"; import { documentsSidebarOpenAtom } from "@/atoms/documents/ui.atoms"; import { statusInboxItemsAtom } from "@/atoms/inbox/status-inbox.atom"; -import { announcementsDialogAtom, teamDialogAtom } from "@/atoms/layout/dialogs.atom"; +import { announcementsDialogAtom } from "@/atoms/layout/dialogs.atom"; import { rightPanelCollapsedAtom } from "@/atoms/layout/right-panel.atom"; import { deleteSearchSpaceMutationAtom } from "@/atoms/search-spaces/search-space-mutation.atoms"; import { searchSpacesAtom } from "@/atoms/search-spaces/search-space-query.atoms"; @@ -19,7 +19,6 @@ import { removeChatTabAtom, syncChatTabAtom, type Tab } from "@/atoms/tabs/tabs. import { currentUserAtom } from "@/atoms/user/user-query.atoms"; import { ActionLogDialog } from "@/components/agent-action-log/action-log-dialog"; import { AnnouncementsDialog } from "@/components/announcements/AnnouncementsDialog"; -import { TeamDialog } from "@/components/settings/team-dialog"; import { AlertDialog, AlertDialogAction, @@ -375,7 +374,6 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid setIsCreateSearchSpaceDialogOpen(true); }, []); - const setTeamDialogOpen = useSetAtom(teamDialogAtom); const setAnnouncementsDialog = useSetAtom(announcementsDialogAtom); const handleUserSettings = useCallback(() => { @@ -566,8 +564,8 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid }, [router, searchSpaceId]); const handleManageMembers = useCallback(() => { - setTeamDialogOpen(true); - }, [setTeamDialogOpen]); + router.push(`/dashboard/${searchSpaceId}/team`); + }, [router, searchSpaceId]); const handleLogout = useCallback(async () => { try { @@ -661,11 +659,13 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid const isChatPage = pathname?.includes("/new-chat") ?? false; const isUserSettingsPage = pathname?.includes("/user-settings") === true; const isSearchSpaceSettingsPage = pathname?.includes("/search-space-settings") === true; + const isTeamPage = pathname?.endsWith("/team") === true; const useWorkspacePanel = pathname?.endsWith("/buy-more") === true || pathname?.endsWith("/more-pages") === true || isUserSettingsPage || - isSearchSpaceSettingsPage; + isSearchSpaceSettingsPage || + isTeamPage; return ( <> @@ -705,12 +705,12 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid isChatPage={isChatPage} useWorkspacePanel={useWorkspacePanel} workspacePanelViewportClassName={ - isUserSettingsPage || isSearchSpaceSettingsPage + isUserSettingsPage || isSearchSpaceSettingsPage || isTeamPage ? "items-start justify-center px-6 py-8 md:px-10 md:py-10" : undefined } workspacePanelContentClassName={ - isUserSettingsPage || isSearchSpaceSettingsPage ? "max-w-5xl" : undefined + isUserSettingsPage || isSearchSpaceSettingsPage || isTeamPage ? "max-w-5xl" : undefined } isLoadingChats={isLoadingThreads} activeSlideoutPanel={activeSlideoutPanel} @@ -891,7 +891,6 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid onOpenChange={setIsCreateSearchSpaceDialogOpen} /> - {/* Agent action log + revert dialog */} diff --git a/surfsense_web/components/settings/team-dialog.tsx b/surfsense_web/components/settings/team-dialog.tsx deleted file mode 100644 index eb601fb64..000000000 --- a/surfsense_web/components/settings/team-dialog.tsx +++ /dev/null @@ -1,32 +0,0 @@ -"use client"; - -import { useAtom } from "jotai"; -import { useTranslations } from "next-intl"; -import { TeamContent } from "@/app/dashboard/[search_space_id]/team/team-content"; -import { teamDialogAtom } from "@/atoms/layout/dialogs.atom"; -import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; - -interface TeamDialogProps { - searchSpaceId: number; -} - -export function TeamDialog({ searchSpaceId }: TeamDialogProps) { - const t = useTranslations("sidebar"); - const [open, setOpen] = useAtom(teamDialogAtom); - - return ( - - e.preventDefault()} - > - {t("manage_members")} -
-
- -
-
-
-
- ); -}