View: Add sortable timeline tracks (topology/default/custom) - #982
Open
dhingora-amd wants to merge 4 commits into
Open
View: Add sortable timeline tracks (topology/default/custom)#982dhingora-amd wants to merge 4 commits into
dhingora-amd wants to merge 4 commits into
Conversation
Right-click the track-list header to sort tracks by Topology, Default (track type), or a remembered Custom order. Dragging a track to reorder becomes the Custom order, and the choice persists per project. Reordering is now view-only: it updates each track's display index (TrackInfo::index) instead of syncing the controller's graph order. Data fetch is keyed by track id and bookmarks jump by time range, so the controller order is pure presentation state - this drops the per-reorder controller round-trip (SetGraphIndex removed). - Cache the deduped sidebar-tree order in TrackTopology for the Topology sort (topology is stable, so it is computed once per tree build). - Persist sort_mode + custom_order in project settings; validate the stored custom order is a full permutation before applying. - Match the other right-click menus (IconMenuItem + base-style padding). Co-authored-by: Cursor <cursoragent@cursor.com>
dhingora-amd
requested review from
Sajeeth-Wimalasuriyan,
amokiche-amd,
drchen-amd and
tomk-amd
as code owners
August 5, 2026 19:41
drchen-amd
reviewed
Aug 6, 2026
Member
- Rename DataProvider::SetTrackDisplayOrder -> SetTrackIndex (TrackInfo only keeps an index, not a display order). - Reuse the existing "order" project key for the remembered custom order and drop the separate "custom_order" key; loading applies it only when the sort mode is custom (legacy projects still restore). - Point at TrackTopology's cached order via a const pointer instead of a std::function provider. - Add a full-width down-arrow button at the bottom of the track-list header to open the sort menu, with its height clamped to the arrow. Co-authored-by: Cursor <cursoragent@cursor.com>
drchen-amd
reviewed
Aug 6, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
drchen-amd
reviewed
Aug 11, 2026
- Commit m_sort_mode only after the reorder is confirmed; ApplyTrackOrder now reports success/failure so a rejected order can't desync view state. - SetTrackIndex validates the whole order before reindexing, so a bad id can no longer leave the track list half-updated. - Apply a deferred topology sort once instead of retrying every frame. - Remove unused GetSortMode() and dead hidden_tracks variable. Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Motivation
Give users a quick way to organize timeline tracks instead of only manual
drag-reorder. Also decouples reordering from the controller — its graph order
is presentation-only (fetch is keyed by track id), so the round-trip was
unnecessary.
Technical Details
order), Default (load order), Custom (remembered manual order; drag
auto-switches to it).
TrackInfo::index+ fireskTrackMetadataChanged; removed the controllerSetGraphIndexsync.TrackTopology(computed once per tree build).sort_mode+custom_orderper project (validated before applying).IconMenuItem+ base-style padding).