Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: the drag-and-drop switches go, the gesture has one behaviour (#11441)
Michael Han432b4db69e90
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsxindex 804d2b99685..6188ea989dd 100644--- a/studio/frontend/src/components/app-sidebar.tsx+++ b/studio/frontend/src/components/app-sidebar.tsx@@ -29,7 +29,6 @@ import {} from "@/components/ui/context-menu";import {DropdownMenu,- DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,@@ -316,9 +315,6 @@ const PROJECT_CHAT_LIMIT = 4;const SIDEBAR_PROJECT_LIMIT = 5;// The shared radio item ticks on the right; these read as settings, so tick first.-// Check on the left, like the radio dot, so both kinds of item line up.-const menuCheckItemClass =- "pl-9 pr-3 [&>[data-slot=dropdown-menu-checkbox-item-indicator]]:right-auto [&>[data-slot=dropdown-menu-checkbox-item-indicator]]:left-3";const menuRadioItemClass ="pl-9 pr-3 [&>[data-slot=dropdown-menu-radio-item-indicator]]:right-auto [&>[data-slot=dropdown-menu-radio-item-indicator]]:left-3";@@ -1894,19 +1890,7 @@ export function AppSidebar() {}// Drag-and-drop. lib/sidebar-drag.ts plans each drop; the hook paints the plan and hands it- // back on drop. Each preference is a way the gesture can get in the way.- const dragHints = useSidebarOrganizationStore((s) => s.dragHints);- const reorderSwitchesSort = useSidebarOrganizationStore(- (s) => s.reorderSwitchesSort,- );- const dragOpensFolders = useSidebarOrganizationStore((s) => s.dragOpensFolders);- const setDragHints = useSidebarOrganizationStore((s) => s.setDragHints);- const setReorderSwitchesSort = useSidebarOrganizationStore(- (s) => s.setReorderSwitchesSort,- );- const setDragOpensFolders = useSidebarOrganizationStore(- (s) => s.setDragOpensFolders,- );+ // back on drop.// Read at event time, so a plan sees the lists as drawn.const dropContext = useCallback((): SidebarDropContext => ({@@ -1921,7 +1905,6 @@ export function AppSidebar() {recents: recentRowIds,projectChats: (projectId) => projectChatRowIds.get(projectId) ?? [],},- reorderSwitchesSort,}),[organizeBy,@@ -1933,7 +1916,6 @@ export function AppSidebar() {projectRowIds,recentRowIds,projectChatRowIds,- reorderSwitchesSort,],);const dropHintRef = useRef<HTMLDivElement | null>(null);@@ -1947,7 +1929,6 @@ export function AppSidebar() {const coarsePointer = useIsCoarsePointer();const dnd = useSidebarDrag({context: dropContext,- springOpen: dragOpensFolders,hintRef: dropHintRef,// A closed folder or section the pointer rests on opens.onSpringOpen: (zone) => {@@ -2039,7 +2020,6 @@ export function AppSidebar() {const next = moveIdBy(orderedIds, item.id, delta);if (next === orderedIds) return;const resorts = sort !== undefined && sort.value !== "manual";- if (resorts && !reorderSwitchesSort) return;setManualOrder(item.scope, next);if (resorts) {sort.set("manual");@@ -2125,7 +2105,7 @@ export function AppSidebar() {* between answers rather than unmounted. No inline style: a re-render would write it back* over the transform the pointer set. */const dropHintPortal =- draggingRow && dragHints && typeof document !== "undefined"+ draggingRow && typeof document !== "undefined"? createPortal(<divref={dropHintRef}@@ -3185,25 +3165,6 @@ export function AppSidebar() {// The "..." every list header carries. Only chat lists regroup, so that half// is opt-in; Pinned takes the sort half alone.- // The drag-and-drop preferences, as the Organize menus list them.- const DRAG_OPTIONS: Array<{- key: TranslationKey;- get: () => boolean;- set: (value: boolean) => void;- }> = [- { key: "shell.organize.dragHints", get: () => dragHints, set: setDragHints },- {- key: "shell.organize.reorderSwitchesSort",- get: () => reorderSwitchesSort,- set: setReorderSwitchesSort,- },- {- key: "shell.organize.dragOpensFolders",- get: () => dragOpensFolders,- set: setDragOpensFolders,- },- ];-function renderSidebarHeaderMenu(options: {ariaLabel: string;sortLabel: string;@@ -3216,8 +3177,7 @@ export function AppSidebar() {side="bottom"align="end"sideOffset={2}- // Wide enough for the drag-and-drop items to fit on one line.- className="unsloth-plus-menu w-64"+ className="unsloth-plus-menu w-56"trigger={(triggerRef) => (<buttonref={triggerRef}@@ -3274,22 +3234,6 @@ export function AppSidebar() {</DropdownMenuRadioItem>))}</DropdownMenuRadioGroup>- {options.includeOrganize && (- <>- <DropdownMenuSeparator />- <DropdownMenuLabel>{t("shell.organize.dragDrop")}</DropdownMenuLabel>- {DRAG_OPTIONS.map((option) => (- <DropdownMenuCheckboxItem- key={option.key}- checked={option.get()}- onCheckedChange={(checked) => option.set(checked === true)}- className={menuCheckItemClass}- >- {t(option.key)}- </DropdownMenuCheckboxItem>- ))}- </>- )}</NonModalDropdownMenu>);}diff --git a/studio/frontend/src/features/chat/hooks/use-sidebar-drag.ts b/studio/frontend/src/features/chat/hooks/use-sidebar-drag.tsindex ffe13368aea..cc7372d5cee 100644--- a/studio/frontend/src/features/chat/hooks/use-sidebar-drag.ts+++ b/studio/frontend/src/features/chat/hooks/use-sidebar-drag.ts@@ -39,8 +39,6 @@ export interface UseSidebarDragOptions {onDrop: (plan: SidebarDropPlan, drag: SidebarDragItem) => void;/** Opens the closed folder or section the pointer rested on. */onSpringOpen?: (zone: SidebarDropZone) => void;- /** Whether resting on a closed folder or section opens it. */- springOpen: boolean;/** The hint element. Positioned directly, so pointer moves do not re-render the sidebar. */hintRef?: React.RefObject<HTMLDivElement | null>;}@@ -176,7 +174,7 @@ export function useSidebarDrag(options: UseSidebarDragOptions): SidebarDragApi {return;}showPlan(next);- if (zoneOptions?.closed && optionsRef.current.springOpen) {+ if (zoneOptions?.closed) {if (spring.current?.key !== springKey) {cancelSpring();spring.current = {diff --git a/studio/frontend/src/features/chat/lib/sidebar-drag.ts b/studio/frontend/src/features/chat/lib/sidebar-drag.tsindex f7de336b23e..abbd0bce895 100644--- a/studio/frontend/src/features/chat/lib/sidebar-drag.ts+++ b/studio/frontend/src/features/chat/lib/sidebar-drag.ts@@ -62,9 +62,6 @@ export interface SidebarDropContext {recents: string[];projectChats: (projectId: string) => string[];};- /** Whether a reorder in a Priority or Last updated list is taken (switching it to Manual)- * or refused. */- reorderSwitchesSort: boolean;}/** What the drop does, for the hint. */@@ -207,7 +204,6 @@ function planPinnedDrop(if (!target) return null;if (target.id === drag.id) return STAY;const resorts = ctx.pinnedSort !== "manual";- if (inList && resorts && !ctx.reorderSwitchesSort) return null;const next = inList? insertIdAt(ids, drag.id, target.id, target.edge): placeIdAt(ids, drag.id, target.id, target.edge);@@ -417,8 +413,8 @@ function landingIn(};}-/** Reorders a chat within its list. A sorted list switches to Manual, or refuses when the- * user turned that off. */+/** Reorders a chat within its list. A sorted list switches to Manual, or the sort would undo+ * the drop. */function reorder(drag: SidebarDragItem,scope: string,@@ -429,7 +425,6 @@ function reorder(ctx: SidebarDropContext,): SidebarDropOutcome {const sort = sortKey === "pinned" ? ctx.pinnedSort : ctx.chatSort;- if (sort !== "manual" && !ctx.reorderSwitchesSort) return null;const next = insertIdAt(ids, drag.id, targetId, edge);if (next === ids) return STAY;return {diff --git a/studio/frontend/src/features/chat/stores/sidebar-organization-store.ts b/studio/frontend/src/features/chat/stores/sidebar-organization-store.tsindex 502746e0b6f..a532b522c1c 100644--- a/studio/frontend/src/features/chat/stores/sidebar-organization-store.ts+++ b/studio/frontend/src/features/chat/stores/sidebar-organization-store.ts@@ -36,18 +36,10 @@ export interface SidebarOrganizationState {pinnedSort: SidebarChatSort;/** Scope key -> row ids, in the order the user dragged them into. */manualOrder: Record<string, string[]>;- /** Drag-and-drop preferences: the hint beside the cursor, whether a reorder switches a- * sorted list to Manual, and whether folders open under a resting pointer. */- dragHints: boolean;- reorderSwitchesSort: boolean;- dragOpensFolders: boolean;setOrganizeBy: (value: SidebarOrganizeBy) => void;setChatSort: (value: SidebarChatSort) => void;setPinnedSort: (value: SidebarChatSort) => void;setManualOrder: (scope: string, ids: string[]) => void;- setDragHints: (value: boolean) => void;- setReorderSwitchesSort: (value: boolean) => void;- setDragOpensFolders: (value: boolean) => void;}/** Drops `draggedId` against the `edge` side of `targetId`, keeping the rest in order. The edge@@ -169,9 +161,6 @@ export const useSidebarOrganizationStore = create<SidebarOrganizationState>()(chatSort: "priority",pinnedSort: "manual",manualOrder: {},- dragHints: true,- reorderSwitchesSort: true,- dragOpensFolders: true,setOrganizeBy: (value) => set({ organizeBy: value }),setChatSort: (value) => set({ chatSort: value }),setPinnedSort: (value) => set({ pinnedSort: value }),@@ -179,9 +168,6 @@ export const useSidebarOrganizationStore = create<SidebarOrganizationState>()(set((state) => ({manualOrder: { ...state.manualOrder, [scope]: ids },})),- setDragHints: (value) => set({ dragHints: value }),- setReorderSwitchesSort: (value) => set({ reorderSwitchesSort: value }),- setDragOpensFolders: (value) => set({ dragOpensFolders: value }),}),{name: SIDEBAR_ORGANIZATION_STORAGE_KEY,@@ -211,17 +197,12 @@ export const useSidebarOrganizationStore = create<SidebarOrganizationState>()(}}}- const readFlag = (value: unknown, fallback: boolean): boolean =>- typeof value === "boolean" ? value : fallback;return {...current,organizeBy,chatSort,pinnedSort,manualOrder,- dragHints: readFlag(saved?.dragHints, true),- reorderSwitchesSort: readFlag(saved?.reorderSwitchesSort, true),- dragOpensFolders: readFlag(saved?.dragOpensFolders, true),};},},diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 464ff2f5a74..2704ad03376 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -220,10 +220,6 @@ export const ar = {organizeChats: "تنظيم المحادثات",organizeProjects: "تنظيم المشاريع",sortPinnedChats: "ترتيب المحادثات المثبتة",- dragDrop: "السحب والإفلات",- dragHints: "إظهار تلميح أثناء السحب",- reorderSwitchesSort: "إعادة الترتيب تبدّل إلى الترتيب اليدوي",- dragOpensFolders: "فتح المجلدات أسفل المؤشر",moveUp: "تحريك لأعلى",moveDown: "تحريك لأسفل",},diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex d86bbfeaac0..0cb231ffac0 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -223,10 +223,6 @@ export const de = {organizeChats: "Chats organisieren",organizeProjects: "Projekte organisieren",sortPinnedChats: "Angeheftete Chats sortieren",- dragDrop: "Ziehen und Ablegen",- dragHints: "Hinweis beim Ziehen anzeigen",- reorderSwitchesSort: "Umordnen wechselt zu manueller Reihenfolge",- dragOpensFolders: "Ordner unter dem Zeiger öffnen",moveUp: "Nach oben",moveDown: "Nach unten",},diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex cc184b60bee..ae44a3905cf 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -225,10 +225,6 @@ export const en = {organizeChats: "Organize chats",organizeProjects: "Organize projects",sortPinnedChats: "Sort pinned chats",- dragDrop: "Drag and drop",- dragHints: "Show a hint while dragging",- reorderSwitchesSort: "Reordering sets Manual order",- dragOpensFolders: "Open folders while hovering",moveUp: "Move up",moveDown: "Move down",},diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 0bce9143a5d..a9fe301cc46 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -222,10 +222,6 @@ export const es = {organizeChats: "Organizar chats",organizeProjects: "Organizar proyectos",sortPinnedChats: "Ordenar chats fijados",- dragDrop: "Arrastrar y soltar",- dragHints: "Mostrar una pista al arrastrar",- reorderSwitchesSort: "Reordenar cambia a orden manual",- dragOpensFolders: "Abrir carpetas bajo el puntero",moveUp: "Subir",moveDown: "Bajar",},diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 95b76e11c0c..4b061238935 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -223,10 +223,6 @@ export const fr = {organizeChats: "Organiser les discussions",organizeProjects: "Organiser les projets",sortPinnedChats: "Trier les discussions épinglées",- dragDrop: "Glisser-déposer",- dragHints: "Afficher une indication pendant le glissement",- reorderSwitchesSort: "Réordonner passe en ordre manuel",- dragOpensFolders: "Ouvrir les dossiers sous le pointeur",moveUp: "Monter",moveDown: "Descendre",},diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 52e2551e525..1e969ed0465 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -223,10 +223,6 @@ export const hi = {organizeChats: "चैट व्यवस्थित करें",organizeProjects: "प्रोजेक्ट व्यवस्थित करें",sortPinnedChats: "पिन की गई चैट क्रमबद्ध करें",- dragDrop: "खींचें और छोड़ें",- dragHints: "खींचते समय संकेत दिखाएँ",- reorderSwitchesSort: "क्रम बदलने पर मैन्युअल क्रम पर स्विच करें",- dragOpensFolders: "पॉइंटर के नीचे फ़ोल्डर खोलें",moveUp: "ऊपर ले जाएँ",moveDown: "नीचे ले जाएँ",},diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex f06dc02f3db..4eee258bd6d 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -187,10 +187,6 @@ export const it = {organizeChats: "Organizza le chat",organizeProjects: "Organizza i progetti",sortPinnedChats: "Ordina le chat fissate",- dragDrop: "Trascina e rilascia",- dragHints: "Mostra un suggerimento durante il trascinamento",- reorderSwitchesSort: "Riordinare passa all'ordine manuale",- dragOpensFolders: "Apri le cartelle sotto il puntatore",moveUp: "Sposta su",moveDown: "Sposta giù",},diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex e3d15e081c8..0479f8c8b3c 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -222,10 +222,6 @@ export const ja = {organizeChats: "チャットを整理",organizeProjects: "プロジェクトを整理",sortPinnedChats: "ピン留めチャットを並べ替え",- dragDrop: "ドラッグ&ドロップ",- dragHints: "ドラッグ中にヒントを表示",- reorderSwitchesSort: "並べ替えると手動順序に切り替える",- dragOpensFolders: "ポインターの下のフォルダーを開く",moveUp: "上へ移動",moveDown: "下へ移動",},diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex de26267d3d3..24291758d7e 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -220,10 +220,6 @@ export const ko = {organizeChats: "채팅 정리",organizeProjects: "프로젝트 정리",sortPinnedChats: "고정된 채팅 정렬",- dragDrop: "드래그 앤 드롭",- dragHints: "드래그 중 힌트 표시",- reorderSwitchesSort: "순서 변경 시 수동 정렬로 전환",- dragOpensFolders: "포인터 아래 폴더 열기",moveUp: "위로 이동",moveDown: "아래로 이동",},diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex 8aa04bf948e..16467228fdd 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -222,10 +222,6 @@ export const ptBR = {organizeChats: "Organizar conversas",organizeProjects: "Organizar projetos",sortPinnedChats: "Ordenar conversas fixadas",- dragDrop: "Arrastar e soltar",- dragHints: "Mostrar uma dica ao arrastar",- reorderSwitchesSort: "Reordenar muda para ordem manual",- dragOpensFolders: "Abrir pastas sob o ponteiro",moveUp: "Mover para cima",moveDown: "Mover para baixo",},diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex efaf402fbb4..16976dc630b 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -222,10 +222,6 @@ export const ru = {organizeChats: "Настроить чаты",organizeProjects: "Настроить проекты",sortPinnedChats: "Сортировать закреплённые чаты",- dragDrop: "Перетаскивание",- dragHints: "Показывать подсказку при перетаскивании",- reorderSwitchesSort: "Перестановка включает ручной порядок",- dragOpensFolders: "Открывать папки под указателем",moveUp: "Переместить вверх",moveDown: "Переместить вниз",},diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex f5e1bc23913..ec1ffee32c2 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -218,10 +218,6 @@ export const zhCN = {organizeChats: "整理对话",organizeProjects: "整理项目",sortPinnedChats: "对置顶对话排序",- dragDrop: "拖放",- dragHints: "拖动时显示提示",- reorderSwitchesSort: "重新排序时切换为手动排序",- dragOpensFolders: "打开指针下方的文件夹",moveUp: "上移",moveDown: "下移",},diff --git a/studio/frontend/tests/sidebar-row-drag.test.ts b/studio/frontend/tests/sidebar-row-drag.test.tsindex 39c5eda486c..f78d84746e8 100644--- a/studio/frontend/tests/sidebar-row-drag.test.ts+++ b/studio/frontend/tests/sidebar-row-drag.test.ts@@ -70,7 +70,6 @@ function context(projectChats: (projectId) =>({ work: ["c1", "c2"], home: ["c3"], misc: [] })[projectId] ?? [],},- reorderSwitchesSort: true,...overrides,};}@@ -140,8 +139,8 @@ test("a chat reorders within its own list, on the edge under the pointer", () =>assert.equal(plan.effects.switchSort, undefined);});-// A sorted list would undo the drop, so it switches to Manual, unless the user turned that off.-test("a reorder in a sorted list switches it to Manual order, or is refused", () => {+// A sorted list would undo the drop, so it switches to Manual.+test("a reorder in a sorted list switches it to Manual order", () => {const drag = chat("r2", "recents", RECENTS_ORDER_SCOPE, null);const zone = chatRow("recents", RECENTS_ORDER_SCOPE, "r1");const switching = plannedDrop(planSidebarDrop(drag, zone, "top", context()));@@ -161,22 +160,12 @@ test("a reorder in a sorted list switches it to Manual order, or is refused", ()),);assert.equal(pinnedSwitch.effects.switchSort, "pinned");- assert.equal(- planSidebarDrop(drag, zone, "top", context({ reorderSwitchesSort: false })),- null,- );// And a list already on Manual never asks.- assert.equal(- plannedDrop(- planSidebarDrop(- drag,- zone,- "top",- context({ chatSort: "manual", reorderSwitchesSort: false }),- ),- ).action.kind,- "reorder",+ const manual = plannedDrop(+ planSidebarDrop(drag, zone, "top", context({ chatSort: "manual" })),);+ assert.equal(manual.action.kind, "reorder");+ assert.equal(manual.effects.switchSort, undefined);});// An edge the row is already on is not a move, and a line there would promise one. The spot@@ -856,8 +845,8 @@ test("alt and an arrow reorder a row without a pointer", async () => {APP_SIDEBAR,/reorderRowBy\(item, orderedIds, sort, event\.key === "ArrowDown" \? 1 : -1\);/,);- // Same rule as a drop.- assert.match(APP_SIDEBAR, /if \(resorts && !reorderSwitchesSort\) return;/);+ // Same rule as a drop: a sorted list switches to Manual.+ assert.match(APP_SIDEBAR, /if \(resorts\) \{\n\s*sort\.set\("manual"\);/);// A touch browser starts no drag, so its row menus keep Move up and Move down.assert.match(APP_SIDEBAR, /function renderMoveRowItems\(/);// A pinned folder moves under Pinned's sort rule, from the keyboard and the touch menu alike:@@ -903,43 +892,24 @@ test("the hint beside the cursor names every kind of drop", () => {]) {assert.ok(APP_SIDEBAR.includes(use), `${use} is never rendered`);}- // In a portal, and only while the user wants it.+ // In a portal, so the sidebar cannot clip it.assert.match(APP_SIDEBAR,- /draggingRow && dragHints && typeof document !== "undefined"\n\s*\? createPortal\(/,+ /draggingRow && typeof document !== "undefined"\n\s*\? createPortal\(/,);assert.ok(APP_SIDEBAR.includes('data-testid="sidebar-drop-hint"'));});-// The three preferences persist and sit in the Organize menu.-test("drag-and-drop preferences persist and show in the Organize menu", () => {- const state = useSidebarOrganizationStore.getState();- assert.equal(state.dragHints, true);- assert.equal(state.reorderSwitchesSort, true);- assert.equal(state.dragOpensFolders, true);- state.setDragHints(false);- state.setReorderSwitchesSort(false);- state.setDragOpensFolders(false);- const next = useSidebarOrganizationStore.getState();- assert.equal(next.dragHints, false);- assert.equal(next.reorderSwitchesSort, false);- assert.equal(next.dragOpensFolders, false);- for (const key of [- "dragDrop",- "dragHints",- "reorderSwitchesSort",- "dragOpensFolders",- ]) {- assert.ok(EN.includes(`${key}:`), `${key} is missing from the en locale`);- assert.ok(- APP_SIDEBAR.includes(`shell.organize.${key}`),- `${key} is never rendered`,- );+// The gesture has one behaviour, not three switches: the hint shows, a reorder in a sorted list+// switches it to Manual, and a closed folder opens under a resting pointer. Nothing to persist.+test("drag-and-drop has no preferences of its own", () => {+ const state = useSidebarOrganizationStore.getState() as Record<string, unknown>;+ for (const key of ["dragHints", "reorderSwitchesSort", "dragOpensFolders"]) {+ assert.equal(state[key], undefined, `${key} is back in the store`);+ assert.ok(!EN.includes(`${key}:`), `${key} is back in the en locale`);}- assert.match(- APP_SIDEBAR,- /<DropdownMenuCheckboxItem\n\s*key=\{option\.key\}\n\s*checked=\{option\.get\(\)\}/,- );+ assert.ok(!EN.includes("dragDrop:"));+ assert.ok(!APP_SIDEBAR.includes("DRAG_OPTIONS"));});// Resting on a closed folder or section opens it.@@ -953,7 +923,7 @@ test("a closed folder or section opens under a resting pointer", () => {APP_SIDEBAR,/if \(zone\.section === "pinned"\) setPinnedOpen\(true\);/,);- assert.match(APP_SIDEBAR, /springOpen: dragOpensFolders,/);+ assert.match(HOOK, /if \(zoneOptions\?\.closed\) \{/);});// A chat dropped into a folder or Recents is moved, and the move can fail. Its slot in the new