Skip to content

fix(desktop-gpui): keep new timeline segments inside their gap - #2744

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/new-segment-gap-placement
Oct 21, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
yashranaway:fix/new-segment-gap-placement

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

adding a zoom or other segment in a gap on the timeline used a fixed one second rule, but new segments are at least 80 pixels wide, which is several seconds when zoomed out. so near a neighbour the new segment could overlap it, near the start it could begin before zero, and near the end it ran past the project.

now it fits the new segment inside the gap it's in, or doesn't place one if the gap is too small at that zoom level. same function drives the hover preview and the insert, so both agree. tests cover both edges of a neighbour, the timeline start and end, and empty or invalid input.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

new_gap_segment now fits new segments inside the available gap and project bounds.

  • New timeline segments stay inside the gap under the pointer.

No actionable issues were found. Tests were inspected but not run.

Reviews (1) · Last reviewed commit: "fix(desktop-gpui): keep new zoom segment..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit 7894016 into CapSoftware:main Oct 21, 2026
44 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants