Skip to content

Conversation

@lukecotter
Copy link
Contributor

@lukecotter lukecotter commented Jan 22, 2026

📝 PR Overview

Timeline Navigation & Interaction

This PR adds comprehensive keyboard and mouse navigation to the new experimental Timeline
Flame Chart, enabling users to explore and analyze debug logs efficiently without losing
their place in deep call stacks.

Frame Selection & Navigation

  • Click to Select: Click any frame to highlight it without navigating away from the timeline
  • Keyboard Navigation: Arrow keys traverse the call stack when a frame is selected
    • ↑ Navigate to child (deeper in stack)
    • ↓ Navigate to parent (shallower in stack)
    • ←/→ Navigate between siblings, or across parent boundaries at the same depth
  • Focus/Zoom: Double-click or press Enter/Z to zoom and fit the selected frame with smooth
    animation
  • Clear Selection: Press Escape or click empty space to deselect

Jump to Call Tree

  • J key: Jump to the selected frame in the Call Tree panel
  • Cmd/Ctrl+Click: Direct navigation without needing to select first
  • Separates selection (exploring timeline) from navigation (viewing in Call Tree)

Context Menu

Right-click on any frame for quick actions:

  • Show in Call Tree (J)
  • Go to Source (when symbols available)
  • Zoom to Frame (Z)
  • Copy Name (Cmd/Ctrl+C)
  • Copy Details
  • Copy Call Stack

Right-click on empty space shows Reset Zoom (0).

Marker Navigation

  • Click log issue markers (truncation, errors, etc.) to select them
  • ←/→ arrow keys navigate between markers when one is selected
  • J or Cmd/Ctrl+Click jumps to the marker in the Call Tree

Enhanced Viewport Controls

  • Zoom: W/S or +/- keys, scroll wheel (mouse-anchored)
  • Horizontal Pan: A/D keys, Alt/Option+Scroll, trackpad swipe, or drag
  • Vertical Pan: Shift+W/Shift+S or Shift+Scroll to move through stack depth
  • Reset Zoom: Home or 0 to fit all content
  • Override: Hold Shift with arrow keys to always pan (even when frame selected)

Search Navigation

  • Shift+Enter navigates to previous search result
  • Hold Enter or Shift+Enter to continuously navigate through matches

Technical Highlights

  • SelectionManager: Centralized selection state with tree navigation via pre-computed maps
    for O(1) lookups
  • TreeNavigator: Parent/child/sibling traversal with cross-parent navigation at same depth
  • Shared HighlightRenderer: Selection and search highlights use identical visual styling
    (DRY)
  • ViewportAnimator: Smooth animated panning to selected frames
  • 461 unit tests covering navigation, selection, and keyboard handling

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

Show off your UI changes.

🔗 Related Issues

resolves #573
resolves #366
resolves #296
resolves #295
resolves #535

fixes #
closes #
related #

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🙅 not needed

Anything else we need to know? [optional]

- Horizontal Pan - `Option/Alt` + Scroll OR Drag  `A` / `D`
- Vertical Pan - `Shift` + Scroll OR Drag  Arrow Up / Down
- Zoom In/Out - Scroll Wheel  `W` / `S`
- Reset Zoom  -  `Home` / `0`
- Frame timeline navigation using arrow keys (up, down, left, right) when frame selected.
- Timeline keyboard navigation using (up, down, left, right, a, d) when no frame selected (shift + arrow keys will override selected frame and do timeline navigation) .
- Shift + scroll wheel will pan up and down, option / alt + scroll will pan left and right.
- Visual highlight rectangle around the current selected frame.
- Zoom with (w, s or +, -), home or 0 to reset.
- Jump to the call / show in call tree with the 'J' key.
- Selection / search highlight rectangle border now slight thicker for better visability.
…tures

- show in call tree
- copy name
- copy details
- copy call stack
- Introduced support for marker selection in the FlameChart, allowing users to select and navigate between timeline markers.
- Added new callbacks for marker selection and context menu interactions.
- Updated the SelectionManager to handle both frame and marker selections, ensuring mutual exclusivity.
- Enhanced the SelectionHighlightRenderer to visually differentiate between selected frames and markers.
- Implemented keyboard navigation for markers, enabling left/right arrow key navigation.
- Updated the Marker type to include a unique identifier for selection tracking.
- Refactored relevant methods across the FlameChart, KeyboardHandler, and utility functions to accommodate marker functionality.
- shift + enter to go back in search
- Enable enter to be held for quick search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants