mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-25 05:52:34 +00:00
kanban dashboard: fix batch QOL oracle blockers
- Preserve failedIds partial-failure highlighting after moveSelected/ applyBulk by clearing only selectedIds/lastSelectedId instead of calling clearSelected() (which also wiped failedIds). - Fix touch/native multi-drag drop stale closure by adding props.selectedIds and props.onMoveSelected to the hermes-kanban:drop useEffect dependency array. Fixes t_5bfafb73.
This commit is contained in:
parent
0ea234e093
commit
98c499b235
1 changed files with 7 additions and 5 deletions
12
plugins/kanban/dashboard/dist/index.js
vendored
12
plugins/kanban/dashboard/dist/index.js
vendored
|
|
@ -675,14 +675,15 @@
|
||||||
} else {
|
} else {
|
||||||
setFailedIds(new Set());
|
setFailedIds(new Set());
|
||||||
}
|
}
|
||||||
clearSelected();
|
setSelectedIds(new Set());
|
||||||
|
setLastSelectedId(null);
|
||||||
loadBoard();
|
loadBoard();
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
setError(`Move failed: ${err.message || err}`);
|
setError(`Move failed: ${err.message || err}`);
|
||||||
setFailedIds(new Set(selectedIds));
|
setFailedIds(new Set(selectedIds));
|
||||||
loadBoard();
|
loadBoard();
|
||||||
});
|
});
|
||||||
}, [selectedIds, loadBoard, clearSelected, board]);
|
}, [selectedIds, loadBoard, board]);
|
||||||
|
|
||||||
const createTask = useCallback(function (body) {
|
const createTask = useCallback(function (body) {
|
||||||
return SDK.fetchJSON(withBoard(`${API}/tasks`, board), {
|
return SDK.fetchJSON(withBoard(`${API}/tasks`, board), {
|
||||||
|
|
@ -792,14 +793,15 @@
|
||||||
} else {
|
} else {
|
||||||
setFailedIds(new Set());
|
setFailedIds(new Set());
|
||||||
}
|
}
|
||||||
clearSelected();
|
setSelectedIds(new Set());
|
||||||
|
setLastSelectedId(null);
|
||||||
loadBoard();
|
loadBoard();
|
||||||
})
|
})
|
||||||
.catch(function (e) {
|
.catch(function (e) {
|
||||||
setError(String(e.message || e));
|
setError(String(e.message || e));
|
||||||
setFailedIds(new Set(selectedIds));
|
setFailedIds(new Set(selectedIds));
|
||||||
});
|
});
|
||||||
}, [selectedIds, loadBoard, clearSelected, board]);
|
}, [selectedIds, loadBoard, board]);
|
||||||
|
|
||||||
// --- board switching ----------------------------------------------------
|
// --- board switching ----------------------------------------------------
|
||||||
const switchBoard = useCallback(function (nextSlug) {
|
const switchBoard = useCallback(function (nextSlug) {
|
||||||
|
|
@ -1803,7 +1805,7 @@
|
||||||
}
|
}
|
||||||
el.addEventListener("hermes-kanban:drop", onTouchDrop);
|
el.addEventListener("hermes-kanban:drop", onTouchDrop);
|
||||||
return function () { el.removeEventListener("hermes-kanban:drop", onTouchDrop); };
|
return function () { el.removeEventListener("hermes-kanban:drop", onTouchDrop); };
|
||||||
}, [props.column.name, props.onMove]);
|
}, [props.column.name, props.onMove, props.selectedIds, props.onMoveSelected]);
|
||||||
|
|
||||||
const handleDragOver = function (e) {
|
const handleDragOver = function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue