Skip to content

Conversation

@ym
Copy link
Contributor

@ym ym commented Nov 27, 2025

Fixes #1004

Copilot finished reviewing on behalf of ym November 27, 2025 09:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where upload file sizes could not be parsed properly by refactoring how file metadata (particularly dates) are stored and formatted. The key change is storing dates as Date objects in the component state instead of pre-formatted strings, allowing for more flexible formatting at display time.

Key Changes

  • Added isInvalidDate helper function to safely handle invalid Date objects in the date formatter
  • Changed StorageFile.createdAt type from string to Date to store raw Date objects instead of formatted strings
  • Updated file list mapping to store Date objects directly, moving date formatting to the display layer

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ui/src/utils.ts Added invalid date handling to the date formatter and fixed formatting/whitespace
ui/src/routes/devices.$id.mount.tsx Introduced StorageFile interface and changed date storage from formatted strings to Date objects

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ym and others added 2 commits November 27, 2025 10:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ym ym merged commit 136966a into dev Nov 27, 2025
3 checks passed
@ym ym deleted the fix/upload-file-size branch November 27, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mounting Virtual Media on other languages

3 participants