Square off the rail header and add a back button

The rail header now sits in the standard 64px row with a hairline under
it, matching the pane headers, and shows the full logo off the chat
pages instead of the bare stone. A back button joins the conversation
and settings headers (workspace pages only for the conversation). The
rail's own back link and the dividers around it are switched off for now.

Also renames the bot and workspace Delete group to Danger Zone, lifts the
step budget to 50, and lets Logo render without its home link.
This commit is contained in:
2026-10-22 08:30:51 +01:00
parent 96735de48f
commit 9af5323530
17 changed files with 194 additions and 61 deletions
-3
View File
@@ -79,9 +79,6 @@ export default function App({
return (
<AppContext.Provider value={appContextObject}>
<Layout
// no_header_divider={
// url?.pathname ? ["/"].includes(url.pathname) : undefined
// }
blank={
url?.pathname
? ["/auth/logout"].includes(url.pathname)
@@ -16,6 +16,7 @@ import { BotComputersContext } from "../(data)/bot-computers-context";
import BotProfileModal from "./bot-profile-modal";
import ConversationHeaderMenu from "./conversation-header-menu";
import HeaderMetaItem from "./header-meta-item";
import BackButton from "@/src/components/general/back-button";
type Props = {
bot: BotWithLastMessage;
@@ -48,9 +49,12 @@ export default function ConversationHeader({
? computer.name || `Computer ${computer.id}`
: null;
const is_workspace = pageProps?.url?.pathname.includes(`/workspaces/`);
return (
<Row className="h-16 shrink-0 gap-2! md:gap-3! flex-nowrap items-center px-3 md:px-6 border-0 border-b border-solid border-hairline">
<RailDrawerButton />
{is_workspace ? <BackButton /> : null}
<BotProfileModal bot={bot} />
<Stack className="min-w-0 gap-0!">
<H1 className="text-lg! leading-6! tracking-normal! font-bold text-ink truncate w-full line-clamp-1">
@@ -4,6 +4,8 @@ import Stack from "@moduletrace/twui/layout/Stack";
import H1 from "@moduletrace/twui/layout/H1";
import Span from "@moduletrace/twui/layout/Span";
import RailDrawerButton from "@/src/layouts/bots/(partials)/rail-drawer-button";
import BackButton from "@/src/components/general/back-button";
import { twMerge } from "tailwind-merge";
type Props = {
title: string;
@@ -25,13 +27,29 @@ export default function SettingsPaneHeader({
action,
}: Props) {
return (
<Row className="h-16 shrink-0 gap-2! md:gap-3! flex-nowrap items-center px-3 md:px-6 border-0 border-b border-solid border-hairline">
<Row
className={twMerge(
"h-16 shrink-0 gap-2! md:gap-3! flex-nowrap items-center px-3",
"md:px-6 border-0 border-b border-solid border-hairline",
)}
>
<RailDrawerButton />
<BackButton />
<Stack className="min-w-0 gap-0!">
<H1 className="text-lg! leading-6! tracking-normal! font-bold text-ink truncate">
<H1
className={twMerge(
"text-lg! leading-6! tracking-normal! font-bold text-ink truncate line-clamp-1",
"whitespace-nowrap w-full",
)}
>
{title}
</H1>
<Span className="text-[13px] leading-[18px] text-ink-secondary truncate">
<Span
className={twMerge(
"text-[13px] leading-[18px] text-ink-secondary truncate",
"line-clamp-1 whitespace-nowrap w-full",
)}
>
{description}
</Span>
</Stack>
@@ -45,9 +45,9 @@ export default function BotDeleteGroup({ bot }: Props) {
return (
<SettingsGroup
id="delete"
title="Delete"
description="Deletes the bot with its conversations, tasks and models."
id="danger-zone"
title="Danger Zone"
description="Dangerous section. Actions here are irreversible. Tread carefully"
>
<Button
title={`Delete ${name}`}
@@ -19,12 +19,20 @@ export default function WorkspaceDeleteGroup({ workspace }: Props) {
const name = workspace.name || "this workspace";
const remove = async () => {
if (!window.confirm(`Delete ${name} and every conversation in it? Its bots and computers stay.`)) return;
if (
!window.confirm(
`Delete ${name} and every conversation in it? Its bots and computers stay.`,
)
)
return;
setLoading(true);
setError(undefined);
const res = await postAdminApi({ path: "workspaces/delete-workspace", body: { workspace_id: workspace.id } });
const res = await postAdminApi({
path: "workspaces/delete-workspace",
body: { workspace_id: workspace.id },
});
if (res.success) {
window.location.href = "/admin/settings/workspaces";
@@ -37,9 +45,9 @@ export default function WorkspaceDeleteGroup({ workspace }: Props) {
return (
<SettingsGroup
id="delete"
title="Delete"
description="Deletes the workspace and its conversations. Its bots and computers stay yours."
id="danger-zone"
title="Danger Zone"
description="Irreversible actions live here. Be careful."
>
<Button
title={`Delete ${name}`}
@@ -54,7 +62,9 @@ export default function WorkspaceDeleteGroup({ workspace }: Props) {
>
Delete workspace
</Button>
<SettingsStatus status={error ? { error: true, msg: error } : undefined} />
<SettingsStatus
status={error ? { error: true, msg: error } : undefined}
/>
</SettingsGroup>
);
}