Repository navigation
fix: include the entire end day in executions date-range filter (#2075) - #2239
Merged
Merged
Conversation
Contributor
Author
Desk Review — #2075 (Executions date-range end-day exclusion)Verdict: READY TO MERGE ✅ Reviewed the whole implementation (not just the diff) over two rounds: 5 breadth subagents (correctness / robustness / elegance / tests / resolution+consumers) and a confirmation pass on the one potentially-blocking finding. Evidence
Why it's correct
Non-blocking notes (optional, do not gate merge)
None of the above blocks merge. The fix is focused, well-tested, and fully resolves the reported issue. |
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.
Closes #2075
Problem
The Executions date-range filter excluded the entire end day. Picking "Today" (or any range whose end is today) returned essentially no rows.
Root cause was a date-to-timestamp collapse:
tovalue as a bareYYYY-MM-DDstring with no end-of-day handling.new Date("2026-06-24").getTime(), which JS parses as UTC midnight, then filtered with.lte("startedAt", toDate).startedAtis an epoch timestamp, any run later than 00:00 UTC on the end day failed the predicate and was dropped.A secondary skew existed because the picker computed
startOfDayin local time while the backend interpreted the serialized date as UTC.Fix
Make the picker boundaries and the backend parsing agree on a single, fully-inclusive convention:
executions-table.tsx): serialize the actual full-day boundary instants —startOfDay(from).toISOString()andendOfDay(to).toISOString()— instead of a bare date. This captures the user’s local-day boundaries as absolute instants, fixing both the end-day collapse and the local/UTC skew.date_range_filter.ts, new shared helper):parseExecutionDateBoundsparses those instants directly. For backward compatibility with older links that carry a bareYYYY-MM-DDdateTo, it expands the value to the last millisecond of that UTC day so the end day stays inclusive. Applied to all three consumers (list_executions,list_executions_cursor,list_executions_paginated_native) so they no longer diverge.Tests
date_range_filter.test.tscovering full-ISO parsing, bare-date end-of-day expansion, the midday-run regression, and invalid input.tsc --noEmitandoxlint --type-awareare clean.