hi @Eric_Koleda
I ran into a race condition with mutable Attachment columns in two-way sync tables when using “send edits immediately” mode.
Setup:
- Sync table with a mutable
Attachmentscolumn (codaType: ValueHintType.Attachment, single or array doesn’t matter) - “Send edits immediately” enabled (the default for our users and the only way sync tables experience is tolerable)
Steps to reproduce:
- Drop a file into the Attachments cell
- Coda begins uploading the file to codahosted.io
- Auto-edit fires before the upload finishes
executeUpdatereceives an empty string for the attachment field, not the codahosted URL
What I expected:
Auto-edit should wait for the file upload to complete before firing, so executeUpdate receives the codahosted URL.
What actually happens:
The edit is sent immediately. If the file is small enough to upload before the auto-edit debounce triggers, and if you’re lucky, it works fine — the codahosted URL arrives in
newValue. But for larger files (anything more than a few kb), the upload loses the race and the pack receives "".
Could this addressed?