Repository navigation
feat(desktop-gpui): double-click timeline handles to fill the gap and reset audio fades - #4251
Merged
Merged
Conversation
richiemcilroy
marked this pull request as ready for review
November 14, 2026 05:25
|
Sandchest reviewed Sandchest reviews every change for vulnerabilities an attacker could use · 1 credit · Review details |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully deployed
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.

Brings back two 0.6.0 timeline shortcuts: double-clicking a zoom or scene handle runs that edge to the neighbouring segment (or the timeline's edge), and double-clicking inside an audio fade resets that fade.
Root cause
fillStart/fillEnd(TL/ZoomTrack.tsx:359-407,TL/SceneTrack.tsx:228-262), and a double-click on an audio fade withFadeControl'sonDblClick(TL/AudioTrack.tsx:582-593). The GPUI timeline treated every press as the start of a select or drag, so a double-click did nothing extra.What changed
flowchart LR P[Track mouse down] --> C{click_count == 2?} C -- no --> D[select / drag, as before] C -- yes --> K{track and hit} K -- zoom or scene handle --> F[fill_gap_edge: run edge to neighbour or timeline edge<br/>preview frame jumps to the new edge] K -- audio, inside a fade --> R[fade_reset_at: that fade to 0] K -- anything else --> D F --> S[keep the first click's selection] R --> Sedits::fill_gap_edge(apps/desktop-gpui/src/editor_edits.rs:493) uses the existingneighbourslookup, so it agrees with the drag clamping on which segment counts as the neighbour. A neighbour that already touches the edge leaves it where it is.edits::fade_reset_atpicks the fade under the pointer: fade-in, fade-out, or the nearer edge where they overlap. Its hit zone is at least 8 px wide, so a very short fade can still be reset. It is given the time under the pointer with the same mapping the hit test uses, not the seek time, which snaps the first 10 px of the timeline to zero: a clip that starts inside that band can still have its fade-in reset.EditorWindow::double_click_segment(editor_window.rs:2660) applies either edit through the normaleditpath (one undo step, project saved as usual), logsfill-gap/fade-reset, and restores the selection the first click made, as 0.6.0 did. It is checked before the drag code (:5037); any other double-click falls through to the existing behaviour.What could regress
click_count == 2is checked first and returns early only when an edit happened.Tests
a_double_clicked_handle_fills_the_gap_to_its_neighbour: zoom and scene, start and end, to the neighbour and to the timeline's edges; a second double-click on a filled edge goes nowhere.a_double_click_inside_a_fade_resets_that_fade: inside each fade, outside both, overlapping fades, no fade, and a 0.01 s fade widened by the minimum hit span.Proof
Real app built from this branch and from main, Linux under Xvfb, driven with xdotool. Project: the reference recording with zoom segments at 2-5 s and 9-12 s, scene segments at 3-6 s and 10-13 s, and an imported audio clip at 1-15 s with 2.5 s fades. The same three double-clicks on both builds: zoom 1's end handle, scene 2's start handle, inside the audio fade-in.
zoomSegmentssceneSegments(read back from the saved
project-config.json; the app log showstimeline edit reason="fill-gap"twice andreason="fade-reset"once)A clip starting at 0.05 s with a 2.5 s fade-in, double-clicked at 0.1 s: the saved fade-in goes to 0 (it stayed at 2.5 when the seek time was used).
Recordings: this PR (light, dark), main (light, dark).


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Adds double-click shortcuts for filling zoom and scene gaps and clearing audio fades.
Reviews (6) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile