From 74ddef2d7b7bcb2d4dc96b6558839ba9acf01978 Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 3 Mar 2026 10:01:05 +0800 Subject: [PATCH] fix: clear shared Production IDs before setting new ones Fixed material validation always using historical order numbers instead of current input. The setSharedProductionIds function was accumulating IDs without clearing old ones, causing validation to use all previously entered order numbers. Changes: - Added sharedProductionIds.clear() before adding new IDs - Ensures Set only contains the latest order numbers from extractor page This fixes the root cause where changing the order number in the extractor page would not update the validation data source, as old IDs were never removed from the shared Set. Co-Authored-By: Claude Sonnet 4.5 --- src/main/ipc/validation-handler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/ipc/validation-handler.ts b/src/main/ipc/validation-handler.ts index c98c166..0d61dc2 100644 --- a/src/main/ipc/validation-handler.ts +++ b/src/main/ipc/validation-handler.ts @@ -35,6 +35,7 @@ const sharedProductionIds = new Set() * Set shared Production IDs */ export function setSharedProductionIds(ids: string[]): void { + sharedProductionIds.clear() ids.forEach((id) => sharedProductionIds.add(id)) }