From f087d961970e658c07dc48631522dd3e428d69eb Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Mon, 6 Jul 2026 15:09:06 +0200 Subject: [PATCH] [import] Warn before CSV update creates unmatched entities When updating existing data from a CSV, lines whose names don't match any existing entity (e.g. leading zeros stripped by the spreadsheet) were silently created. The preview modal now lists the entries that will be created and requires an explicit confirmation checkbox before the import can run. The Shots and Edits pages also build the existing- entity lookup from the full cache instead of the filtered display list, mirroring the Assets fix for #927, so the check stays accurate. Fixes cgwire/kitsu#771 Co-Authored-By: Claude Fable 5 --- src/components/modals/ImportRenderModal.vue | 68 ++++++++++++++++++-- src/components/pages/Edits.vue | 7 +- src/components/pages/Shots.vue | 19 +++--- src/lib/csv.js | 21 ++++++ src/locales/en.js | 2 + tests/unit/lib/csv.spec.js | 71 +++++++++++++++++++++ 6 files changed, 174 insertions(+), 14 deletions(-) diff --git a/src/components/modals/ImportRenderModal.vue b/src/components/modals/ImportRenderModal.vue index 1cd01b64c2..53255839fd 100644 --- a/src/components/modals/ImportRenderModal.vue +++ b/src/components/modals/ImportRenderModal.vue @@ -131,6 +131,19 @@ +
+

+ {{ $t('main.csv.new_entities_to_create', newEntityNames.length) }} +

+

+ {{ newEntityNames.join(', ') }} +

+ +
+