You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Chat attachment 10-file cap and cross-batch duplicate detection are bypassable by concurrent attach batches (and compressed-image dedup misses) #2078
Area / route
Chat composer attachment handling. use-convex-file-upload.ts, chat-input.tsx. Two related dedup/cap defects preserved below.
Sites
[24] Chat 10-file cap and cross-batch duplicate detection are bypassable by concurrent attach batches (in-flight uploads not counted)
Evidence: count check use-convex-file-upload.ts:230-247 and dedup use-convex-file-upload.ts:208-225 both read attachmentsRef.current only; uploadingFiles tracked separately at lines 282-283 and committed to attachments only at line 335; attach button not disabled during upload — chat-input.tsx:326 (attachDisabled = disabled || isLoading) and chat-input.tsx:1050
[23] Re-attaching an image > 1MB is not detected as a duplicate (dedup compares original name/size against the stored compressed/renamed values)
Evidence: use-convex-file-upload.ts:208-225 (existingKeys from att.fileName:att.fileSize, incoming key from entry.file.name:entry.file.size); compression rename+resize at lib/utils/compress-image.ts:129-142; stored attachment uses fileToUpload.name/.size at use-convex-file-upload.ts:325-333
Notes
[24] fix: fold isUploading into attachDisabled and/or count in-flight files in both the count gate and the dedup gate. [23] fix: compute the dedup key from the same canonical values (track the original file identity on the stored attachment, or dedup after compression). Severity medium: worst outcome is an extra valid chip / skipped dedup — no corruption.
Filed by an automated manual-review pass (live browser QA + a 25-agent code-grounded audit, each finding adversarially verified). Deduped against open issues (incl. #1972–#1999, settings/forms epic #1941–#1966, audit cluster #1842–#1846) and recently-closed issues.
Activity
fix: chat attachment cap & cross-batch dedup bypassable by concurrent…