diff --git a/src/gui/src/UI/Dashboard/TabApps.js b/src/gui/src/UI/Dashboard/TabApps.js
index e951ecf3a..2691be6f8 100644
--- a/src/gui/src/UI/Dashboard/TabApps.js
+++ b/src/gui/src/UI/Dashboard/TabApps.js
@@ -1,5 +1,6 @@
import UIContextMenu from '../UIContextMenu.js';
import { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js';
+import { reconcileAppOrder, serializeAppOrder, APPS_ORDER_KV_KEY } from './appOrder.js';
/** Lowercase app names that must not offer Uninstall in the My Apps tile context menu. */
const APP_NAMES_NO_UNINSTALL = new Set([
@@ -13,7 +14,7 @@ const APP_NAMES_NO_UNINSTALL = new Set([
'ai',
]);
-/**
+/*
* Copyright (C) 2024-present Puter Technologies Inc.
*
* This file is part of Puter.
@@ -32,6 +33,20 @@ const APP_NAMES_NO_UNINSTALL = new Set([
* along with this program. If not, see .
*/
+// -- Drag-to-reorder tuning --
+const DRAG_START_DISTANCE = 5; // px a mouse/pen must travel before a drag begins
+const DRAG_TOUCH_CANCEL_DISTANCE = 10; // px of finger travel that reclassifies a press as a scroll
+const DRAG_TOUCH_LONGPRESS_MS = 450; // hold time before a touch begins reordering
+const DRAG_EDGE_ZONE = 60; // px from a scroller edge that arms a page flip
+const DRAG_EDGE_DWELL_MS = 480; // hold time at an edge before the page flips
+const DRAG_FLIP_SETTLE_MS = 440; // time to let a page flip's smooth-scroll settle
+const DRAG_FLIP_ANIM_MS = 320; // reflow animation duration (iOS-like, unhurried)
+const DRAG_FLIP_EASING = 'cubic-bezier(0.34, 1.08, 0.64, 1)'; // gentle spring settle
+// A tile only becomes the drop target once the dragged icon's centre is well
+// inside it (this fraction is trimmed off every edge). The resulting deadzone
+// around each tile is what stops items flickering back and forth at a boundary.
+const DRAG_HIT_INSET = 0.28;
+
// External apps (not owned by a Puter user) can report an opaque app-… id
// as their title (uid === name === title); in that case show the hostname
// of index_url instead, and open the app's website (index_url) on click —
@@ -80,10 +95,10 @@ function buildNoAppsHtml () {
// iOS-home-screen-style pager: fixed cols × rows pages in a horizontal
// scroll-snap scroller, with page dots below and hover arrows for mouse users.
-function buildPagerHtml (apps, layout) {
+function buildPagerHtml (apps, layout, instant) {
const pageCount = Math.ceil(apps.length / layout.perPage);
- let h = `