fix(firmware_flasher): sort versions newest-first, ISO date format#607
Conversation
- Add published_at (ISO 8601) to each release descriptor as a stable sort key independent of GitHub API response order - Sort firmware version dropdown by published_at descending when a board is selected, ensuring the latest build is always listed first; prior code relied on undocumented API response order which could produce oldest-first under cache or pagination edge cases - Change date display from DD-MM-YYYY HH:MM to YYYY-MM-DD HH:MM; formattedDate is computed fresh from published_at on every release data load (1-hour cache TTL) so all displayed dates update automatically — FirmwareCache is unaffected (keyed on release.file) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughIn ChangesFirmware Flasher Version Descriptor and Sort
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/js/tabs/firmware_flasher.js`:
- Around line 184-185: The formattedDate variable is constructed using local
timezone Date methods (getMonth, getDate, getHours, getMinutes) which causes
different users in different timezones to see different timestamps for the same
firmware release. To ensure consistent date display across all users, replace
all the local timezone getter methods with their UTC equivalents: getUTCMonth,
getUTCDate, getUTCHours, and getUTCMinutes in the date formatting logic for the
formattedDate construction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4d11bd53-8a94-474e-a8c2-f272ab7c01e6
📒 Files selected for processing (1)
src/js/tabs/firmware_flasher.js
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (macos-26, macos-arm64)
- GitHub Check: build (windows-2025, windows-x64, x64)
- GitHub Check: build (macos-26-intel, macos-x86_64)
- GitHub Check: build (windows-2025, windows-ia32, ia32)
- GitHub Check: build (ubuntu-24.04, linux-x64)
🔇 Additional comments (2)
src/js/tabs/firmware_flasher.js (2)
187-198: LGTM!
339-341: LGTM!
Published_at from GitHub API is UTC; local-timezone getters (getMonth, getDate, getHours, getMinutes) caused users in different timezones to see different timestamps for the same release. Swap all to UTC equivalents. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
AI Generated comment Code changes in this PR are complete and working as expected. Two commits address the original issue:
The Windows CI failure ( |
AI Generated pull-request
Summary
published_at(ISO 8601) to each release descriptor as a stable sort key, independent of GitHub API response orderpublished_atdescending when a board is selected — latest build always listed first; prior code relied on undocumented API response order which could produce oldest-first under cache or pagination edge casesDD-MM-YYYY HH:MMtoYYYY-MM-DD HH:MM;formattedDateis computed fresh frompublished_aton every release data load (1-hour cache TTL), so all displayed dates update automatically —FirmwareCacheis unaffected (keyed onrelease.file)Test plan
YYYY-MM-DD HH:MMformat for all build typesSummary by CodeRabbit