feat: Parse & display binary files
Hi team! Iām happy to continue working on this task. I implemented binary file parsing in the backend and continued working on #4852 to view the results.
#4852 had too many changes to apply, making rebase burdensome, so I applied those changes in this PR.
āļø Reasoning
The current implementation doesn't provide image previews and file sizes for binary files, especially image files.
In this PR, I implemented the parsing of binary files from read_file_from_workspace to display the size and image files in the fileDiff component.
š§¢ Changes
- Add size display for binary files in the fileDiff component.
- Add image file preview in the fileDiff component.
- Implemented binary file parsing in
read_file_from_workspace.
Preview
https://github.com/user-attachments/assets/362548a6-6a6f-440f-9058-73a55e8d5e6f
š« Affected issues
Fixes: #2752 Fixes: #3093 Fixes: #4957 Closes: #4852
@Zamoca42 is attempting to deploy a commit to the GitButler Team on Vercel.
A member of the Team first needs to authorize it.
Thanks so much for picking this up and bringing it all together. I'd love to see this PR merged.
@estib-vega, maybe this PR would be interesting for you to review as it spans frontend and backend, and particularly in the frontend I think you'd do a much better job than me.
Thank you for the thoughtful work on #5111. Building on that, I was able to modify read_file_from_workspace to check status_file and successfully read untracked binary files.
Preview
https://github.com/user-attachments/assets/f29bb6a3-0c3a-449b-9d53-ae71cf76996f
Thanks for taking a look. I plan to review/fixup and will merge when done. Should get to it ~~till lunch~~ today.
Since I am very delayed here, let's merge, if there are fixes I'd like to make I will open a new PR for that.