diff --git a/apps/desktop/src/renderer/src/components/desktop-layout.tsx b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
index b4b716c11..8d39f99f2 100644
--- a/apps/desktop/src/renderer/src/components/desktop-layout.tsx
+++ b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
@@ -129,6 +129,25 @@ function MainTopBar() {
);
}
+// The canvas hugs the expanded sidebar with a hairline gap. When the sidebar
+// leaves the main flow, the left margin must grow to mirror the fixed mr-2 so
+// the floating canvas sits symmetrically inside the window frame.
+function MainCanvas({ children }: { children: React.ReactNode }) {
+ const { state, isMobile } = useSidebar();
+ const sidebarHidden = state === "collapsed" || isMobile;
+
+ return (
+
+ {children}
+
+ );
+}
+
function useInternalLinkHandler() {
useEffect(() => {
const handler = (e: Event) => {
@@ -219,10 +238,10 @@ export function DesktopShell() {
{/* Right side: header + content container */}
-
+
{slug && }
-
+