Skip to content
TypeScript

fix(web): make the empty workspace draggable on desktop (#13713)

Otavio Salvadoreeea71a88108
diff --git a/apps/web/src/components/NoProjectsHero.tsx b/apps/web/src/components/NoProjectsHero.tsx
index de125d384eb..2da1c0aadb8 100644
--- a/apps/web/src/components/NoProjectsHero.tsx
+++ b/apps/web/src/components/NoProjectsHero.tsx
@@ -2,9 +2,11 @@ import { PlusIcon } from "lucide-react";
import { useCallback } from "react";
import { openCommandPalette } from "../commandPaletteBus";
+import { isElectron } from "../env";
import { Button } from "./ui/button";
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "./ui/empty";
import { SidebarInset } from "./ui/sidebar";
+import { WorkspacePageHeader } from "./WorkspacePageHeader";
export function NoProjectsHero() {
const openAddProject = useCallback(() => openCommandPalette({ open: "add-project" }), []);
@@ -12,6 +14,8 @@ export function NoProjectsHero() {
return (
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
<div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
+ {/* The desktop window only moves where CSS opts in, so keep a titlebar strip. */}
+ {isElectron ? <WorkspacePageHeader electron /> : null}
<Empty size="hero" className="flex-1">
<div className="w-full max-w-lg px-8 py-12">
<EmptyHeader className="max-w-none">
diff --git a/apps/web/src/routes/_chat.index.tsx b/apps/web/src/routes/_chat.index.tsx
index 28cbbaedb76..61e9e7a2e3a 100644
--- a/apps/web/src/routes/_chat.index.tsx
+++ b/apps/web/src/routes/_chat.index.tsx
@@ -91,6 +91,7 @@ function IndexDraftLanding() {
function DraftStartError({ onRetry }: { readonly onRetry: () => void }) {
return (
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
+ {isElectron ? <WorkspacePageHeader electron /> : null}
<Empty className="flex-1">
<EmptyHeader className="max-w-md">
<EmptyTitle>Couldn’t start a new thread</EmptyTitle>