core/apps/webapp/app/routes/home.inbox.$logId.tsx
Harshith Mullapudi bcc0560cf0
Feat: Space (#93)
* Feat: change space assignment from statement to episode

* feat: add default spaces and improve integration, space tools discovery in MCP

* feat: change spaces to episode based

* Feat: take multiple spaceIds while ingesting

* Feat: modify mcp tool descriptions, add spaceId in mcp url

* feat: add copy

* bump: new version 0.1.24

---------

Co-authored-by: Manoj <saimanoj58@gmail.com>
2025-10-09 12:38:42 +05:30

50 lines
1.5 KiB
TypeScript

import { json, type LoaderFunctionArgs } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { Inbox } from "lucide-react";
import { PageHeader } from "~/components/common/page-header";
import { LogDetails } from "~/components/logs/log-details";
import { LogOptions } from "~/components/logs/log-options";
import { getIngestionQueueForFrontend } from "~/services/ingestionLogs.server";
import { requireUserId } from "~/services/session.server";
export async function loader({ request, params }: LoaderFunctionArgs) {
const userId = await requireUserId(request);
const logId = params.logId;
try {
const log = await getIngestionQueueForFrontend(logId as string, userId);
return json({ log: log });
} catch (e) {
return json({ log: null });
}
}
export default function InboxNotSelected() {
const { log } = useLoaderData<typeof loader>();
if (!log) {
return (
<div className="flex h-full w-full flex-col">
<PageHeader title="Episode" showTrigger={false} />
<div className="flex h-full flex-col items-center justify-center gap-2">
<Inbox size={30} />
No episode data found
</div>
</div>
);
}
return (
<div className="flex h-[calc(100vh_-_20px)] w-full flex-col overflow-hidden">
<PageHeader
title="Episode"
showTrigger={false}
actionsNode={<LogOptions id={log.id} />}
/>
<LogDetails log={log as any} />
</div>
);
}