fix: timeline selections starting at offset 0#592
Open
sshane wants to merge 5 commits into
Open
Conversation
|
Welcome to connect! Make sure to:
deployed preview: https://592.connect-d5y.pages.dev |
5 tasks
Dragging on the timeline ruler from the very start (offset 0) failed to create a section. The same falsy-zero pattern affected click-route URLs, where with the URL fix in place the click would otherwise produce /log_id/0/N instead of the canonical /log_id. - TIMELINE_PUSH_SELECTION reducer: replace !action.start with action.start == null so a drag at second 0 stops getting treated as "no selection" (which previously cleared zoom and the loop). - urlForState: drop start/end only when not finite or when start === end (was: dropped whenever start === 0). - DriveListItem: dispatch null/null on click instead of (0, duration) so the URL stays /dongleId/log_id — refreshing on a still-uploading route picks up the latest duration instead of pinning the old end. - updateTimeline: when start/end aren't finite, default the loop to (0, route.duration) by looking up the route in state.routes. - Update the unit test that was asserting the buggy URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
be4d798 to
a592d3d
Compare
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.
Summary
Dragging a section on the timeline ruler from the very start (offset 0) was silently broken — the selection wouldn't render and any pre-existing loop would be cleared. Two falsy-zero bugs both rooted in treating `0` as "no value":
Both replaced with explicit null checks. Updated the unit test that was asserting the buggy URL.
Test plan
🤖 Generated with Claude Code