feat: enhance vm image url expiry date display#198
Conversation
Co-authored-by: danieltaox <danieltaox@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: danieltaox <danieltaox@gmail.com>
There was a problem hiding this comment.
Greptile Summary
This PR enhances the user experience in the sf vms images list command by improving how URL expiry dates are displayed. The change modifies src/lib/vm/image/show.tsx to show both the ISO string format and a human-readable date with timezone information, bringing consistency with the existing sf nodes list --verbose command.
The implementation adds necessary dayjs plugins for timezone handling (utc and timezone) and leverages the existing formatDate helper function from the codebase. Instead of showing only the raw ISO timestamp like 2025-01-15T10:30:00.000Z, users now see a more comprehensive format: 2025-01-15T10:30:00.000Z (Jan 15 10:30 am EST). This follows the established pattern used throughout the CLI application where dates are displayed with both machine-readable and human-readable formats.
The change integrates seamlessly with the existing codebase architecture by reusing the formatDate utility function and following the same date formatting conventions already established in the nodes list functionality. The timezone display uses dayjs's format method with the "z" specifier to show the timezone abbreviation, providing users with clear context about when their image URLs will expire.
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it only affects display formatting without changing any business logic
- Score reflects simple, well-tested date formatting changes using existing utility functions and established patterns
- No files require special attention as this is a straightforward UI enhancement using proven components
1 file reviewed, no comments
Display human-readable date alongside ISO string for "URL Expiry" in
sf vms images listto matchsf nodes list --verbose.Slack Thread