From d5cecb0b54cbb34ea923e1d24e291aa16be567e6 Mon Sep 17 00:00:00 2001 From: Gitead Date: Sat, 25 Jul 2026 00:29:26 -0400 Subject: [PATCH] fix: only skip appointment-attachment merge when automated claim already has files skipAppointmentAttachmentMerge was blanket-set for any autoSubmit path (chatbot, Claim with AI batch automation, insurance-status auto-check), so screenshots/files attached directly on the appointment were silently dropped from the MassHealth Selenium upload whenever a claim was auto-submitted. Now the merge is only skipped if the automated flow actually supplied its own files. Co-Authored-By: Claude Sonnet 5 --- apps/Frontend/src/components/claims/claim-form.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/Frontend/src/components/claims/claim-form.tsx b/apps/Frontend/src/components/claims/claim-form.tsx index bd7275f1..7cc16cfb 100755 --- a/apps/Frontend/src/components/claims/claim-form.tsx +++ b/apps/Frontend/src/components/claims/claim-form.tsx @@ -1023,10 +1023,11 @@ export function ClaimForm({ insuranceSiteKey: "MH", claimId: createdClaim.id, uploadedFiles, - // Chatbot-driven submissions already include every file the user intends to send — - // skip the backend's appointment-attachment fallback merge so old files saved on the - // appointment (e.g. via the Schedule editor) aren't silently added as extra uploads. - skipAppointmentAttachmentMerge: !!autoSubmit, + // Only skip the backend's appointment-attachment fallback merge when this automated + // submission already supplied its own files — otherwise files saved directly on the + // appointment (e.g. a screenshot attached via the Schedule editor) would never reach + // the insurance upload at all. + skipAppointmentAttachmentMerge: !!autoSubmit && !!uploadedFiles?.length, }); // 5. Close form