refactor(layout): remove the legacy mobile layout from MainLayout and Header

Phone viewports run the separate MobileApp shell (and a viewport crossing
now reloads into it), so the desktop layout's mobile branch was
unreachable: the drawer machinery, the full-screen secondaryView surface
switch (including the terminal/diagram desktop carve-out nothing could
trigger), the mobile header with its tab bar, the Cmd+number tab
shortcuts, the mobile quota panel, and the surface guard that reset
non-chat tabs. DrawerContext had no consumers left and is deleted.
Header drops from 2630 to 1853 lines; the desktop render is unchanged.
This commit is contained in:
Bohdan Triapitsyn
2026-08-24 16:15:16 +03:00
parent 841eca5720
commit 8b7d7803de
3 changed files with 78 additions and 1208 deletions
@@ -1,29 +0,0 @@
import React from 'react';
import type { MotionValue } from 'motion/react';
export interface DrawerContextValue {
leftDrawerOpen: boolean;
rightDrawerOpen: boolean;
toggleLeftDrawer: () => void;
toggleRightDrawer: () => void;
// Motion values for real-time drawer dragging
leftDrawerX: MotionValue<number>;
rightDrawerX: MotionValue<number>;
leftDrawerWidth: React.MutableRefObject<number>;
rightDrawerWidth: React.MutableRefObject<number>;
setMobileLeftDrawerOpen: (open: boolean) => void;
setRightSidebarOpen: (open: boolean) => void;
}
const DrawerContext = React.createContext<DrawerContextValue | null>(null);
export const DrawerProvider: React.FC<{
children: React.ReactNode;
value: DrawerContextValue;
}> = ({ children, value }) => {
return (
<DrawerContext.Provider value={value}>
{children}
</DrawerContext.Provider>
);
};