fixed docker

This commit is contained in:
2026-02-04 14:29:42 +00:00
parent f1e13f87f6
commit b0ef60ff32
6 changed files with 704 additions and 205 deletions

View File

@@ -96,6 +96,15 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
api.analysisJobs.getById,
pendingJobId ? { jobId: pendingJobId as any } : "skip"
);
const opportunities = useQuery(
api.opportunities.listByProject,
selectedProjectId
? {
projectId: selectedProjectId as any,
limit: 200,
}
: "skip"
);
// Set default selected project
React.useEffect(() => {
@@ -118,6 +127,18 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
const editingProject = projects?.find((project) => project._id === editingProjectId);
const canDeleteProject = (projects?.length ?? 0) > 1;
const selectedSourceIds = selectedProject?.dorkingConfig?.selectedSourceIds || [];
const inboxCount = React.useMemo(() => {
if (!opportunities) return 0;
const normalized = opportunities as { status?: string }[];
return normalized.filter((lead) => {
const status = lead.status ?? "new";
if (status === "ignored") return false;
if (status === "converted") return false;
if (status === "archived") return false;
if (status === "sent") return false;
return true;
}).length;
}, [opportunities]);
const selectedProjectName = selectedProject?.name || "Select Project";
const handleToggle = async (sourceId: string, checked: boolean) => {
@@ -416,7 +437,13 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
>
<Link href="/app/inbox">
<Inbox />
<span>Inbox</span>
<span className="truncate">Inbox</span>
{inboxCount > 0 && (
<div className="relative ml-auto flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-primary px-1 text-[10px] font-semibold text-primary-foreground group-data-[collapsible=icon]:hidden">
<span className="absolute -inset-0.5 animate-ping rounded-full bg-primary/60" />
<span className="relative">{inboxCount}</span>
</div>
)}
</Link>
</SidebarMenuButton>
</SidebarMenuItem>