Skip to content

View: Add time-range selection indicators across timeline, tables, and overview - #995

Merged
dhingora-amd merged 7 commits into
mainfrom
dhingora/range-selection-indicator
Aug 21, 2026
Merged

dhingora-amd merged 7 commits into
mainfrom
dhingora/range-selection-indicator

Conversation

@dhingora-amd

Copy link
Copy Markdown
Contributor

Motivation

When a time-range selection is active, several views silently recompute or filter
their results, but nothing signals that on screen. This PR makes it explicit which
data depends on the current selection, and makes the selected region easy to spot.

Technical Details

  • Pills: per-track analysis stat pills (counter min/max/avg/stddev, queue
    utilization) tint blue while a selection is active, neutral otherwise
    (Pill::SetRangeAffected).
  • Tables: the events and top-events tables show a scope indicator in the header
    — accent "Limited to time-range selection" (with a span tooltip) vs dim
    "Full trace".
  • Timeline: tracks outside the selection are dimmed (spotlight scrim); flame
    events that only partially fall inside are repainted at full brightness above the
    scrim so they still read as included in the results.
  • Overview histogram: bars outside the current view are greyed (minimap), with
    bars straddling a view edge split into in/out slices; start/end markers show where
    the selection sits in the full trace; the overview's time axis is aligned with the
    timeline graph when fully zoomed out.

…d overview

Make it explicit which results depend on the active time-range selection:

- Pills: tint per-track analysis stat pills (counter min/max/avg/stddev,
  queue utilization) blue while a selection is active; neutral otherwise.
- Tables: add a scope indicator to the events and top-events tables -
  accent "Limited to time-range selection" (with span tooltip) vs dim
  "Full trace".
- Timeline: dim tracks outside the selection (spotlight), and repaint the
  out-of-selection slice of partially-included flame events at full
  brightness so they still read as included in the results.
- Overview histogram: grey bars outside the current view (minimap) with
  straddling bars split into in/out slices, draw start/end selection
  markers showing where the selection sits in the full trace, and align
  the overview's time axis with the timeline graph when fully zoomed out.

Co-authored-by: Cursor <cursoragent@cursor.com>

@drchen-amd drchen-amd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like how it makes the event names hard to read.

Image

Comment thread src/view/src/rocprofvis_flame_track_item.cpp Outdated
Comment thread src/view/src/rocprofvis_track_item.h Outdated
Comment thread src/view/src/rocprofvis_flame_track_item.cpp Outdated
dhingora-amd and others added 2 commits August 17, 2026 16:23
Remove the main-graph range-selection dimming scrim and the foreground
repaint of partially-selected flame events. Grey overview histogram bars
outside the active selection so the selected span stays highlighted.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace Pill's bespoke m_range_affected bool with an optional text-color
override (SetTextColor) so any state can retint the pill, per review.
Callers pass kAccent while a time-range selection is active; behavior is
unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/view/src/rocprofvis_track_item.h Outdated
Comment thread src/view/src/rocprofvis_multi_track_table.cpp Outdated
Comment thread src/view/src/rocprofvis_multi_track_table.cpp Outdated
dhingora-amd and others added 2 commits August 19, 2026 11:06
Co-authored-by: Cursor <cursoragent@cursor.com>
Draw a |--<duration>--| bracket across the time-range selection in the
overview histogram's tick-mark row; when the span is too narrow, place the
duration label beside the caps on whichever side has room.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/view/src/rocprofvis_timeline_view.cpp Fixed
Comment thread src/view/src/rocprofvis_timeline_view.cpp Fixed

@tomk-amd tomk-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the shadow var issue mentioned by code ql, the it is good to go.

@tomk-amd

Copy link
Copy Markdown
Collaborator

We will need to implement an indicator for Track Details as well (separate PR):

image

dhingora-amd and others added 2 commits August 21, 2026 12:25
Co-authored-by: Cursor <cursoragent@cursor.com>
Reconcile the overview histogram with main's RenderHeader/RenderHistogram
split: pass graph_origin_x into RenderHistogram(float) so the greyscale,
selection markers, and duration bracket resolve it in scope.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dhingora-amd
dhingora-amd merged commit 54bca85 into main Aug 21, 2026
9 checks passed
@dhingora-amd
dhingora-amd deleted the dhingora/range-selection-indicator branch August 21, 2026 18:41
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.

4 participants