Two defects, both found by driving the real editor in Firefox: 1. The editor drew grab handles with a grab cursor on sets it refuses to reorder, so the live Food menu looked draggable and did nothing. Handles and the move buttons are now rendered only when reordering is possible, and the notice says what can still be done. 2. Reordering was saved only from dragend. Browsers suppress mouse events during a drag and dragend is not guaranteed to arrive, which left the rows visibly reordered while the server kept the old order — the drag looked like it worked and then reverted on reload. The order now commits from dragover after a pause in the drag, with drop/dragend/mouse events as faster paths, deduped against the last confirmed order and reported in the page. To make (1) coherent the Current set may now be reordered while its Pages stay fixed: order is presentation, media URLs are content-hashed and pages are rendered per request, so nothing stale can be served (ADR 0006). Archives stay frozen. Admin pages are no-store and assets cache for 5 minutes, so a fix like this one is not masked by a stale admin.js. scripts/check-dnd.mjs drives the real editor and asserts the drag persists; it is the only automated check that reaches this path.
35 lines
915 B
JSON
35 lines
915 B
JSON
{
|
|
"name": "menu-admin",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=24"
|
|
},
|
|
"scripts": {
|
|
"start": "node src/server.ts",
|
|
"predev": "node scripts/dev-env.ts",
|
|
"dev": "SECURE_COOKIES=false node --watch src/server.ts",
|
|
"dev:env": "node scripts/dev-env.ts",
|
|
"seed": "node scripts/seed-dev.ts",
|
|
"check-site": "node scripts/check-site.ts",
|
|
"verify": "node src/cli/verify.ts",
|
|
"repair": "node src/cli/repair.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "node --test test/*.test.ts",
|
|
"check-dnd": "node scripts/check-dnd.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cookie": "^11.1.2",
|
|
"@fastify/formbody": "^9.0.0",
|
|
"@fastify/multipart": "^10.1.2",
|
|
"@fastify/static": "^10.1.4",
|
|
"fastify": "^5.12.5",
|
|
"sharp": "^0.35.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^26.6.2",
|
|
"typescript": "^7.0.2"
|
|
}
|
|
}
|