Redesign timeline annotations: track-bound notes with inline editing and floating windows#896
Open
dhingora-amd wants to merge 10 commits into
Open
Redesign timeline annotations: track-bound notes with inline editing and floating windows#896dhingora-amd wants to merge 10 commits into
dhingora-amd wants to merge 10 commits into
Conversation
Annotations were anchored to an absolute vertical position, so they stayed put when tracks were reordered, collapsed, or resized. Bind each sticky note to a track and store its offset relative to the track top so it follows the track, while keeping it freely draggable. - StickyNote stores a track id and a track-relative y offset; a per-frame TrackLayout resolver maps track ids to/from absolute Y. - Notes re-anchor to whichever track they are dragged over; legacy notes with no binding re-anchor on first render (backward compatible). - During a track reorder, the bound note rides the floating preview via a foreground drag ghost instead of being left behind until drop. - Add a Track column to the annotations list and carry the track id through navigation so "jump to note" resolves the correct position. - Persist the track id in the project file (legacy files load unbound). Co-authored-by: Cursor <cursoragent@cursor.com>
Annotations are pinned to a timestamp, but there was no visual cue for which point on the timeline a note refers to. Draw a vertical guide at the note's time, spanning the graph height down to the ruler, so the latched time is easy to read against the axis ticks. - The guide appears while a note is hovered (minimized marker or expanded panel) or being dragged, and is hidden otherwise to avoid clutter. - Tinted with the sticky-note accent color and drawn behind the marker. Co-authored-by: Cursor <cursoragent@cursor.com>
Render the expanded sticky note as its own floating ImGui window so it can be moved anywhere in the app instead of being clipped to the timeline. ImGui now owns the window's move/resize, so the manual HandleResize path and the resize/drag-within-timeline state are removed; HandleDrag now only handles the minimized marker. Also recolor the sticky-note palette to a cohesive yellow, fixing the dark-mode brown-background / blue-border clash and the light-mode blue border, and keep button hover/active states within the palette. Co-authored-by: Cursor <cursoragent@cursor.com>
The minimized anchor marker now stays on the timeline while a note is expanded, so its location is always visible. Hovering either the marker or the floating window lights both with a soft accent halo, making it easy to tell which marker belongs to which window. Clicking the marker expands a minimized note or raises the window to the front when it is already open. Split the sticky-note render into focused marker/window/glow helpers and replace the position sentinel and remaining literals with named helpers and constants. Co-authored-by: Cursor <cursoragent@cursor.com>
Draw the marker's hover glow on the timeline draw list instead of the foreground one so the expanded window occludes it when the anchor sits behind it, rather than the halo painting over the note. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the Add/Edit annotation modal popups with inline editing on the note itself, and make the timeline anchor easier to place. - Create notes inline: a new note opens expanded and focused, commits on the first keystroke, and auto-discards if left empty, removing the separate Add/Edit modal dialogs and the kStickyNoteEdited round-trip. - Make the expanded note's title (click-to-edit) and body inline-editable, with trash/close buttons in the window. - Allow dragging the timeline anchor while the note is expanded; clamp the anchor to the visible track viewport and pan/scroll the timeline when it nears a viewport edge, keeping render continuous during the drag. - Draw the hovered/dragged note's time guide across the full visible track area instead of only near the top. - Remove dead annotation code (modal/edit paths, unused members, empty destructor, stale includes), introduce INVALID_STICKY_ID, and refresh the agent docs. Co-authored-by: Cursor <cursoragent@cursor.com>
When an expanded note's header overlapped its timeline anchor icon, dragging the header to move the window also satisfied the anchor's hit test, so the note's timeline position moved along with the window. Suppress starting an anchor drag when the click lands inside the expanded note window's rect, so only the window moves. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
A note stayed on the timeline when its track was hidden, landing on another track and showing the stale track as its parent. Skip a note's rendering and interaction when its bound track's display flag is off. Co-authored-by: Cursor <cursoragent@cursor.com>
drchen-amd
reviewed
Jun 25, 2026
| sticky_json[JSON_KEY_ANNOTATION_TITLE] = notes[i].GetTitle(); | ||
| sticky_json[JSON_KEY_ANNOTATION_ID] = notes[i].GetID(); | ||
| sticky_json[JSON_KEY_ANNOTATION_TRACK_ID] = | ||
| static_cast<double>(notes[i].GetTrackId()); |
| else | ||
| { | ||
| ImGui::PushID("note_track"); | ||
| ElidedText(track_name.c_str(), ImGui::GetContentRegionAvail().x); |
Member
| ImGui::SetCursorPos(ImVec2( | ||
| win_size.x - action_btn_size * 2.0f - kHeaderButtonGap - kNoteMargin, | ||
| action_btn_y)); | ||
| if(ImGui::Button( |
Member
drchen-amd
reviewed
Jun 25, 2026
drchen-amd
left a comment
Member
There was a problem hiding this comment.
We can remove StickyNoteEvent in rocprofvis_events.cpp. This is no longer used in current implementation.
Member
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
Timeline annotations (sticky notes) were clunky to use. Creating and editing
a note required separate "Add" and "Edit" modal popups, notes floated free in
content space rather than belonging to any track, and the timeline anchor was
hard to place — it couldn't be moved while a note was expanded and couldn't be
dragged past the visible range. This PR reworks annotations end-to-end into a
direct, inline experience and ties each note to the track it describes.
Technical Details
with their Y position stored relative to that track's top. The bound
track_idis persisted (JSON_KEY_ANNOTATION_TRACK_ID) andNavigationEventcarries it so "go to note" lands on the right track. The annotation list
gains a Track column showing the bound track's name, or "Unbound" for legacy
notes saved before this change.
kStickyNoteEditedround-trip). A new note opens expanded and focused,commits on the first keystroke, and auto-discards if left empty. The
expanded note's title is click-to-edit and the body is inline-editable, with
trash/close buttons in the window.
window that stays where the user drags it (position tracked live, not
persisted).
whether the note is minimized or expanded. It is clamped to the visible
track viewport, and the timeline pans/scrolls when the anchor nears a
viewport edge so it can be placed beyond the currently visible range
(rendering stays continuous during the drag for smooth motion).
spanning the full visible track area.
to a warmer amber look with better contrast.
empty destructor, stale includes), added an
INVALID_STICKY_IDsentinel,and updated the agent docs in
.agents/AGENTS.md.