Repository navigation
fix(web): compute log period starts from the current date - #45360
Merged
Merged
Conversation
Added a test to verify that each period starts on the current date when the page is open past midnight, including the use of fake timers.
Add test for starting periods on current date after midnight.
Add unit tests for LongTimeRangePicker component to verify date selection behavior after midnight.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45360 +/- ##
=======================================
Coverage 89.77% 89.78%
=======================================
Files 6239 6239
Lines 390902 390926 +24
Branches 79285 79285
=======================================
+ Hits 350934 350987 +53
+ Misses 33870 33840 -30
- Partials 6098 6099 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@lyzno1 All checks have passed. This PR fixes the Logs period filters when the page stays open past midnight. The filters counted days only once at page load, so some start dates were wrong the next day. The filters and the Overview picker now use the current date each time. Could you take a look when you have time? |
crazywoola
approved these changes
Nov 3, 2026
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #45354
Summary
The log period filters stored their day counts once at module load. After the page stayed open past midnight, Month to date, Quarter to date, Year to date, Last 3 months, and Last 12 months started on the wrong date.
log/filter.tsxandworkflow-log/filter.tsxnow compute these day counts when the value is read. The count uses calendar days and rounds the result, so daylight saving changes do not move the start date.index.tsxa fresh day count when the request is built. A resolver would fix nothing more for this issue.Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods