mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
fix(frontend): remove clone notifications, allow public podcast access
This commit is contained in:
parent
9a4da10b12
commit
3c835bdf7e
4 changed files with 5 additions and 116 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
Check,
|
||||
CheckCheck,
|
||||
CheckCircle2,
|
||||
Copy,
|
||||
History,
|
||||
Inbox,
|
||||
LayoutGrid,
|
||||
|
|
@ -42,14 +41,7 @@ import { Spinner } from "@/components/ui/spinner";
|
|||
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { getConnectorIcon } from "@/contracts/enums/connectorIcons";
|
||||
import {
|
||||
type ConnectorIndexingMetadata,
|
||||
isChatClonedMetadata,
|
||||
isChatCloneFailedMetadata,
|
||||
isConnectorIndexingMetadata,
|
||||
isNewMentionMetadata,
|
||||
type NewMentionMetadata,
|
||||
} from "@/contracts/types/inbox.types";
|
||||
import { isConnectorIndexingMetadata, isNewMentionMetadata } from "@/contracts/types/inbox.types";
|
||||
import type { InboxItem } from "@/hooks/use-inbox";
|
||||
import { useMediaQuery } from "@/hooks/use-media-query";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
|
@ -213,15 +205,11 @@ export function InboxSidebar({
|
|||
[inboxItems]
|
||||
);
|
||||
|
||||
// Status tab includes: connector indexing, document processing, chat clone notifications
|
||||
// Status tab includes: connector indexing, document processing
|
||||
const statusItems = useMemo(
|
||||
() =>
|
||||
inboxItems.filter(
|
||||
(item) =>
|
||||
item.type === "connector_indexing" ||
|
||||
item.type === "document_processing" ||
|
||||
item.type === "chat_cloned" ||
|
||||
item.type === "chat_clone_failed"
|
||||
(item) => item.type === "connector_indexing" || item.type === "document_processing"
|
||||
),
|
||||
[inboxItems]
|
||||
);
|
||||
|
|
@ -342,17 +330,7 @@ export function InboxSidebar({
|
|||
router.push(url);
|
||||
}
|
||||
}
|
||||
} else if (item.type === "chat_cloned") {
|
||||
// Navigate to the cloned chat
|
||||
if (isChatClonedMetadata(item.metadata)) {
|
||||
const { search_space_id, thread_id } = item.metadata;
|
||||
const url = `/dashboard/${search_space_id}/new-chat/${thread_id}`;
|
||||
onOpenChange(false);
|
||||
onCloseMobileSidebar?.();
|
||||
router.push(url);
|
||||
}
|
||||
}
|
||||
// chat_clone_failed: just mark as read, no navigation
|
||||
},
|
||||
[markAsRead, router, onOpenChange, onCloseMobileSidebar]
|
||||
);
|
||||
|
|
@ -412,24 +390,6 @@ export function InboxSidebar({
|
|||
);
|
||||
}
|
||||
|
||||
// For chat cloned success, show green copy icon
|
||||
if (item.type === "chat_cloned") {
|
||||
return (
|
||||
<div className="h-8 w-8 flex items-center justify-center rounded-full bg-green-500/10">
|
||||
<Copy className="h-4 w-4 text-green-500" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// For chat clone failed, show red alert icon
|
||||
if (item.type === "chat_clone_failed") {
|
||||
return (
|
||||
<div className="h-8 w-8 flex items-center justify-center rounded-full bg-red-500/10">
|
||||
<AlertCircle className="h-4 w-4 text-red-500" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// For status items (connector/document), show status icons
|
||||
// Safely access status from metadata
|
||||
const metadata = item.metadata as Record<string, unknown>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue