fix(reorganize): Apply on the first click, one offer per toast, no open dialog replaced
Review of owner review 2, phase 4a (R7): the Reorganize dialogs of the desktop and the web panel. Desktop - Clicking Apply first takes the focus from the template field, which committed it and started a dry run identical to the one on screen: Apply turned off under the click. A commit now plans only when the templates differ from the shown plan (or the last dry run failed). - The Settings toast's Reorganize… disposed whatever dialog the Archive screen had open, so a running Delete stopped without being asked. An open dialog now stays and its archive is not switched; Reorganize says it waits and opens once that dialog closes, with the archive's templates read again and every part the toasts offered meanwhile. - Each Settings toast takes its own archive's offer (one pending offer per archive), and a toast gone early (dismissed, pushed out) lets the next change of that archive raise its own toast: Toast.Closed now says when a toast leaves the screen. Web panel - The Library sends the selected ids up to a thousand. all:true is used only above that, when the selection is exactly what Select all fetched without a filter and the archive has not grown since, so a sequence unticked or added later is never reorganized; otherwise the toast asks to select again. - The preview's "before" of an untitled sequence is its old name, not the new title twice. - A dry run of the same request answering during the confirmation no longer drops the confirmed apply; a plan that really changed is shown and said (Admin.Reorganize.PlanChanged). - Enter in a template plans at once (the form never submitted on Enter). - The confirm tooltip and the module header no longer say the moves are verified: moves and renames are not hashed. Strings in en and it; the reworded key exists in no other culture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit bed718fb5af2ef69943fd348690c689259872a34)
This commit is contained in:
1 parent
9ae773aa5a
commit
59ee982e4d
14 files changed
+301
-49
No files matched your search
@@ -425,17 +425,20 @@ async function renderList(root, { api, setMeta, actions, onEvent }, params) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorganize (owner review 2, R7) of the selected sequences: every sequence of the archive after Select all without a
|
||||
* filter, else their ids, at most a bulk request's thousand (one plan, one job).
|
||||
* Reorganize (owner review 2, R7) of the selected sequences: their ids, at most a bulk request's thousand (one plan,
|
||||
* one job). Beyond that, every sequence of the archive, but only while the selection is exactly what Select all
|
||||
* fetched without a filter and the archive has not grown since: a sequence unticked or added later is never included.
|
||||
*/
|
||||
async function reorganize() {
|
||||
const everything = matching !== null && !isFiltered() && selection.size === matching.length;
|
||||
if (!everything && selection.size > BULK_LIMIT) {
|
||||
const ids = [...selection.ids];
|
||||
const everything = ids.length > BULK_LIMIT && matching !== null && !isFiltered() && total === matching.length &&
|
||||
ids.length === matching.length && matching.every((s) => selection.has(s.id));
|
||||
if (!everything && ids.length > BULK_LIMIT) {
|
||||
toast(t("Admin.Reorganize.TooMany", formatNumber(BULK_LIMIT)), true);
|
||||
return;
|
||||
}
|
||||
const names = new Map(selectedRows().map((s) => [s.id, s.displayTitle]));
|
||||
await openReorganize({ api, target: everything ? { all: true } : { sequenceIds: [...selection.ids] }, names });
|
||||
await openReorganize({ api, target: everything ? { all: true } : { sequenceIds: ids }, names });
|
||||
}
|
||||
|
||||
async function retag() {
|
||||
|
||||
Reference in new issue
Block a user