Skip to content

feat(gpui): rename timeline lanes - #2847

Open
YoavLevavi wants to merge 1 commit into
CapSoftware:mainfrom
YoavLevavi:feat/gpui-track-names
Open

YoavLevavi wants to merge 1 commit into
CapSoftware:mainfrom
YoavLevavi:feat/gpui-track-names

Conversation

@YoavLevavi

Copy link
Copy Markdown
Contributor

Rename timeline lanes: double-click a lane's label in the gutter to give it a name ("Music", "Voice-over"...).

  • ProjectConfiguration::track_names, keyed "<track>:<lane>" (for example audio:1), #[serde(default)].
  • A small rename dialog. Enter confirms, Escape cancels, and an empty name restores the track's own label. One undo step.
  • track_chip shows the name, and TimelineModel carries the names so drawing doesn't touch the project.

Testing: cargo test --bin cap-gpui (new lane_names_come_from_the_project_by_track_and_lane).

🤖 Generated with Claude Code

Names are stored per lane in ProjectConfiguration::track_names, keyed
"<track>:<lane>"; an empty name restores the track's own label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@YoavLevavi

Copy link
Copy Markdown
Contributor Author

@greptileai

@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@richiemcilroy

Copy link
Copy Markdown
Member

Thanks @YoavLevavi, lane names are handy, and the dialog follows the preset dialog's patterns nicely (Enter/Escape, one undo step, an empty name restores the default). One functional issue: names are keyed "<track>:<lane>", but lanes can be reordered by dragging the gutter, and finish_lane_reorder (apps/desktop-gpui/src/editor_window.rs:4555) rewrites every segment's track through edits::reorder_track_lane / edits::reorder_overlay_track without touching track_names. If you name lane 1 "Music" and drag it above lane 0, the music now sits on lane 0 while lane 1, holding the other audio, is still called "Music". Could you remap project.track_names with the same from/to shift in those reorder paths (in the same edit, so it stays one undo step) and add a test for it? Two smaller things: track_name_key was inserted between track_chip and its doc comment (apps/desktop-gpui/src/editor_timeline.rs:1791-1798), so please move it above that comment. And please add skip_serializing_if = "std::collections::BTreeMap::is_empty" to track_names (crates/project/src/configuration.rs:2686), so projects without names save unchanged, the way #2781 does for locked_tracks.

This branch has not been deployed

No deployments
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