From 3e4fa8ca9ca348d335b63eb766b86539a8590ee7 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Thu, 4 Jun 2026 17:07:48 -0500 Subject: [PATCH] fix(desktop): lock profile-rail drag to the x-axis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit overflow-x-auto makes overflow-y compute to auto, so a vertical drag translate faulted in a cross-axis scrollbar. Pin the drag transform to y:0 with a modifier — squares only slide horizontally now. --- .../src/app/chat/sidebar/profile-switcher.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx b/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx index bd4ecb6175e..0f39670176e 100644 --- a/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx +++ b/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx @@ -3,6 +3,7 @@ import { DndContext, type DragEndEvent, KeyboardSensor, + type Modifier, PointerSensor, useSensor, useSensors @@ -41,6 +42,10 @@ import { import { CreateProfileDialog } from '../../profiles/create-profile-dialog' import { PROFILES_ROUTE } from '../../routes' +// The rail is a single horizontal strip; pin drags to the x-axis so a vertical +// nudge can't translate a square down and fault in a cross-axis scrollbar. +const lockToXAxis: Modifier = ({ transform }) => ({ ...transform, y: 0 }) + // Arc-Spaces-style profile rail at the sidebar foot: a default↔all toggle pinned // left, the colored named profiles scrolling between, and Manage pinned right. // The active profile pops in its own color — the "where am I" cue. Only mounted @@ -105,7 +110,12 @@ export function ProfileRail() { )}
- + profile.name)} strategy={horizontalListSortingStrategy}> {named.map(profile => (