The feature currently always injects a EOL linebreak because that's how the editor works. This means that if a file lacks that character, "restoring" it will never remove it from the PR. So it's actually a bug in a way.
posted by fregante over 3 years ago
Hopefully they add a restore API at some point too so we can support restoring large files.
Speaking of which, if we know a size limit, we can probably just detect this limit before sending the API request.
E.G. on click immediately show the "file too big" error