Make a workspace page a dashboard and drop its coordinator from the rail

The workspace rail now lists only the bots attached to the workspace, with the back link returning to the workspace page from a bot's conversation. /admin/workspaces/<id> becomes a read-only dashboard (picture, context, latest activity, bots, computers) that links into the editable settings page.
This commit is contained in:
2026-10-19 13:40:59 +01:00
parent 7b1ccfeb62
commit e5747effa8
16 changed files with 425 additions and 63 deletions
@@ -1,7 +1,5 @@
import { useContext, useState } from "react";
import EmptyContent from "@moduletrace/twui/elements/EmptyContent";
import { Settings } from "lucide-react";
import HeaderIconButton from "@/src/components/general/header-icon-button";
import { AppContext } from "@/src/pages/__root";
import canManageCrew from "@/src/utils/rbac/can-manage-crew";
import SettingsSectionHeading from "../../../(partials)/settings-section-heading";
@@ -13,19 +11,12 @@ import WorkspaceDetailsGroup from "../(partials)/workspace-details-group";
import WorkspaceImageGroup from "../(partials)/workspace-image-group";
import WorkspaceModels from "../(partials)/workspace-models";
type Props = {
/**
* On the workspace's own page: show the link into its settings.
*/
show_settings_link?: boolean;
};
/**
* A workspace's page: its picture, context, bots, computers and models,
* A workspace's settings: its picture, context, bots, computers and models,
* then deleting it. Super admins and admins manage it; a member with no
* bots sees an empty note.
*/
export default function WorkspaceOverview({ show_settings_link }: Props) {
export default function WorkspaceOverview() {
const { pageProps } = useContext(AppContext);
const [workspace, setWorkspace] = useState(pageProps?.workspace);
@@ -56,16 +47,7 @@ export default function WorkspaceOverview({ show_settings_link }: Props) {
workspace.description ||
"Context, bots, computers and models for this workspace."
}
breadcrumb_title={show_settings_link ? undefined : name}
action={
show_settings_link ? (
<HeaderIconButton
icon={Settings}
title="Workspace settings"
href={`/admin/settings/workspaces/${workspace_id}`}
/>
) : undefined
}
breadcrumb_title={name}
>
<WorkspaceImageGroup workspace={workspace} />
<WorkspaceDetailsGroup workspace={workspace} onSaved={setWorkspace} />