- Shipped
- August 21, 2026 at 2:23 PM UTC
- Author
- kamo
- Commit
- 62a26af
A document id is a 19-digit int64 — 1200096283020258886, some 133x past Number.MAX_SAFE_INTEGER. OrganizerTab joined the selection into a key so the effect would depend on its contents rather than the array's identity, then split it back apart with .map(Number), which rounded every id to …258800. The server matched no document, skipped each one, and the Selected Docs binder stayed empty: "3 of 3 newly selected document(s) could not be added". The binder's ZIP download had the same Number() on its item ids. What hid it: Document.id was declared number while holding a string. The server sends it as a string and every id flowed through untouched, so downloads and deletes worked and .map(Number) read as a no-op cast rather than as data loss. The declared type is now string — which is what the value has always been — and that alone makes this bug a compile error rather than an empty binder. Four more declarations were lying the same way (SharedDocument.imgId, the share/organizer/delete targets and their dialog props); tsc found each one the moment the truth was told.