Skip to content

The open-source app everyone uses to manage agents at work

Restrict sidebar reordering to mouse input

dottab1b3408efab9
diff --git a/ui/src/components/CompanyRail.tsx b/ui/src/components/CompanyRail.tsx
index 2ec8fc063a..0448c79aaa 100644
--- a/ui/src/components/CompanyRail.tsx
+++ b/ui/src/components/CompanyRail.tsx
@@ -4,7 +4,7 @@ import { useQueries } from "@tanstack/react-query";
import {
DndContext,
closestCenter,
- PointerSensor,
+ MouseSensor,
useSensor,
useSensors,
type DragEndEvent,
@@ -244,7 +244,8 @@ export function CompanyRail() {
// Require 8px of movement before starting a drag to avoid interfering with clicks
const sensors = useSensors(
- useSensor(PointerSensor, {
+ // Keep sidebar reordering mouse-only so touch input can scroll/tap without drag affordances.
+ useSensor(MouseSensor, {
activationConstraint: { distance: 8 },
})
);
diff --git a/ui/src/components/SidebarProjects.tsx b/ui/src/components/SidebarProjects.tsx
index cc6f417c4b..3c63ebc3f9 100644
--- a/ui/src/components/SidebarProjects.tsx
+++ b/ui/src/components/SidebarProjects.tsx
@@ -4,7 +4,7 @@ import { useQuery } from "@tanstack/react-query";
import { ChevronRight, Plus } from "lucide-react";
import {
DndContext,
- PointerSensor,
+ MouseSensor,
closestCenter,
type DragEndEvent,
useSensor,
@@ -153,7 +153,8 @@ export function SidebarProjects() {
const projectMatch = location.pathname.match(/^\/(?:[^/]+\/)?projects\/([^/]+)/);
const activeProjectRef = projectMatch?.[1] ?? null;
const sensors = useSensors(
- useSensor(PointerSensor, {
+ // Project reordering is intentionally desktop-only; touch should remain tap/scroll behavior.
+ useSensor(MouseSensor, {
activationConstraint: { distance: 8 },
}),
);