andreahlert commented on issue #275: URL: https://github.com/apache/burr/issues/275#issuecomment-4612775582
Hi @cleanjesus, welcome, and thanks for picking this up! Great fit since the telemetry UI is React + TypeScript + Tailwind, which lines up with your recent work. Quick orientation so you don't burn time reproducing from scratch. The "telemetry list → graph" highlight already works; this issue is about the reverse direction (hover a graph node → highlight the matching rows in the list). The one subtlety to know up front: the graph is made of **actions**, but the list highlights by **sequence ID**, and a single action can run many times (1:n action → sequence_id mapping). So you can't just reuse the existing single-sequence-ID hover state. Where things live today (`telemetry/ui/src/components/routes/app/`): 1. **The shared hover state** is the `HighlightState` context in [`AppView.tsx`](https://github.com/apache/burr/blob/main/telemetry/ui/src/components/routes/app/AppView.tsx#L111) (currently `currentHoverIndex` / `setCurrentHoverIndex`, typed as a single `SequenceLocation`). 2. **The graph node** is `ActionNode` in [`GraphView.tsx`](https://github.com/apache/burr/blob/main/telemetry/ui/src/components/routes/app/GraphView.tsx#L91); it already knows its action name via `data.action.name`. 3. **The list rows** decide highlight in [`StepList.tsx`](https://github.com/apache/burr/blob/main/telemetry/ui/src/components/routes/app/StepList.tsx#L223) (and the same pattern in [`InsightsView.tsx`](https://github.com/apache/burr/blob/main/telemetry/ui/src/components/routes/app/InsightsView.tsx)) via a `shouldBeHighlighted` check against the hovered sequence ID. Suggested starting point: 1. Add a `currentHoverAction?: string` (the action name) alongside `currentHoverIndex` in the `HighlightState` context. 2. Add `onMouseEnter` / `onMouseLeave` handlers on the `ActionNode` div in `GraphView.tsx` that set / clear `currentHoverAction` to `data.action.name`. 3. Update the `shouldBeHighlighted` logic in `StepList.tsx` (and `InsightsView.tsx`) to highlight a row when the sequence ID matches **or** the row's action name matches `currentHoverAction`. 4. Make the graph self-highlight on its own hover too: in `ActionNode`, factor the action-name match into the existing `opacity` line. To run the UI locally, see [`telemetry/README.md`](https://github.com/apache/burr/blob/main/telemetry/README.md). Start the Burr server, run one of the `examples/` apps so you have a populated app to hover over, then `npm install && npm start` in `telemetry/ui/`. Feel free to open a draft PR early and ask questions as you go. Happy to review! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
