-
Notifications
You must be signed in to change notification settings - Fork 0
perf: Don't process date overrides outside of requested boundaries #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: eval-pr-13495-target-1763590614259
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -106,7 +106,7 @@ export function buildDateRanges({ | |||||
| ); | ||||||
| const groupedDateOverrides = groupByDate( | ||||||
| availability.reduce((processed: DateRange[], item) => { | ||||||
| if ("date" in item && !!item.date) { | ||||||
| if ("date" in item && !!item.date && item.date >= dateFrom && item.date <= dateTo) { | ||||||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Date overrides on the first/last requested day are now skipped because the new guard compares the midnight override date with the exact request timestamps; convert both sides to day boundaries before filtering. Prompt for AI agents[internal] Confidence score: 7/10 [internal] Posted by: General AI Review Agent
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filtering date overrides by Prompt for AI agents[internal] Confidence score: 8/10 [internal] Posted by: General AI Review Agent
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filtering overrides by raw timestamp drops valid same-day overrides when Prompt for AI agents[internal] Confidence score: 8/10 [internal] Posted by: General AI Review Agent |
||||||
| processed.push(processDateOverride({ item, timeZone })); | ||||||
| } | ||||||
| return processed; | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date overrides that share the start day of the request window are now skipped because the comparison uses the override’s midnight timestamp against the exact
dateFromtime rather than day boundaries, so any request starting after midnight on that day drops a valid override.Prompt for AI agents
[internal] Confidence score: 7/10
[internal] Posted by: General AI Review Agent