From 98ab895e581c1da0b9acd97bd791eeeab9d2a1f0 Mon Sep 17 00:00:00 2001 From: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com> Date: Thu, 30 Apr 2026 04:39:58 +0530 Subject: [PATCH] Narrow the right sidebar and update task panel copy - Reduce inline/sidebar widths to fit the chat layout better - Rename task sidebar settings copy to match the right panel --- apps/web/src/components/settings/SettingsPanels.tsx | 10 +++++----- apps/web/src/rightPanelLayout.ts | 4 ++-- apps/web/src/routes/_chat.$environmentId.$threadId.tsx | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx index 29d09a5cdce..5bfe55710e5 100644 --- a/apps/web/src/components/settings/SettingsPanels.tsx +++ b/apps/web/src/components/settings/SettingsPanels.tsx @@ -473,7 +473,7 @@ export function useSettingsRestore(onRestored?: () => void) { ? ["Diff line wrapping"] : []), ...(settings.autoOpenPlanSidebar !== DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar - ? ["Task sidebar"] + ? ["Auto-open task panel"] : []), ...(settings.enableAssistantStreaming !== DEFAULT_UNIFIED_SETTINGS.enableAssistantStreaming ? ["Assistant output"] @@ -950,12 +950,12 @@ export function GeneralSettingsPanel() { /> updateSettings({ autoOpenPlanSidebar: DEFAULT_UNIFIED_SETTINGS.autoOpenPlanSidebar, @@ -970,7 +970,7 @@ export function GeneralSettingsPanel() { onCheckedChange={(checked) => updateSettings({ autoOpenPlanSidebar: Boolean(checked) }) } - aria-label="Open the task sidebar automatically" + aria-label="Open the task panel automatically" /> } /> diff --git a/apps/web/src/rightPanelLayout.ts b/apps/web/src/rightPanelLayout.ts index 981006315ed..5528072e57b 100644 --- a/apps/web/src/rightPanelLayout.ts +++ b/apps/web/src/rightPanelLayout.ts @@ -1,3 +1,3 @@ -export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 1180px)"; +export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 980px)"; export const RIGHT_PANEL_SHEET_CLASS_NAME = - "w-[min(88vw,820px)] max-w-[820px] p-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]"; + "w-[min(42vw,28rem)] min-w-80 max-w-[28rem] p-0 max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]"; diff --git a/apps/web/src/routes/_chat.$environmentId.$threadId.tsx b/apps/web/src/routes/_chat.$environmentId.$threadId.tsx index ff20673e2de..b59522dc4b6 100644 --- a/apps/web/src/routes/_chat.$environmentId.$threadId.tsx +++ b/apps/web/src/routes/_chat.$environmentId.$threadId.tsx @@ -26,8 +26,9 @@ import { Sidebar, SidebarInset, SidebarProvider, SidebarRail } from "~/component const DiffPanel = lazy(() => import("../components/DiffPanel")); const DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY = "chat_diff_sidebar_width"; -const DIFF_INLINE_DEFAULT_WIDTH = "clamp(28rem,48vw,44rem)"; -const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 26 * 16; +const DIFF_INLINE_DEFAULT_WIDTH = "clamp(24rem,34vw,36rem)"; +const DIFF_INLINE_SIDEBAR_MIN_WIDTH = 22 * 16; +const DIFF_INLINE_SIDEBAR_MAX_WIDTH = 36 * 16; const COMPOSER_COMPACT_MIN_LEFT_CONTROLS_WIDTH_PX = 208; const DiffLoadingFallback = (props: { mode: DiffPanelMode }) => { @@ -124,6 +125,7 @@ const DiffPanelInlineSidebar = (props: { collapsible="offcanvas" className="border-l border-border bg-card text-foreground" resizable={{ + maxWidth: DIFF_INLINE_SIDEBAR_MAX_WIDTH, minWidth: DIFF_INLINE_SIDEBAR_MIN_WIDTH, shouldAcceptWidth: shouldAcceptInlineSidebarWidth, storageKey: DIFF_INLINE_SIDEBAR_WIDTH_STORAGE_KEY,