PG1204 opened a new pull request, #6213:
URL: https://github.com/apache/texera/pull/6213
### What changes were proposed in this PR?
Adds a toggleable, canvas-level **performance heat-map overlay** (Layers ->
Performance) that colors operators cold -> hot from the per-operator metrics
captured in #5773. A read-only consumer of existing data and **no backend
changes**.
- **Three views** with bottleneck-oriented scoring:
- **Runtime**: data + control processing time (matches the backend cost
model)
- **Throughput**: seconds per output row (slow producers are hotter)
- **I/O imbalance**: `|out − in| / (out + in)`, bounded to [0, 1] so an
extreme amplifier can't dominate the scale
- **Scoring/color helpers** (pure, unit-tested): `rawMetricForView`,
`normalizeScores` (log1p + min-max), `scoreToColor` (colorblind-safe ramp)
- **Overlay layer** modeled on the existing Grid/Regions/Workers pattern: a
`BehaviorSubject` view stream on `JointGraphWrapper`, applied by the editor to
the shared model (canvas + mini-map)
- Heat-map owns **only the operator body fill**, so it coexists with the
execution-status border
- **Legend** showing the active view and its real min/max value range
- **Hover tooltip** with the operator's metric value + heat score
- Live recolor as stats stream in; restores default fills when toggled off
Note on size: this is one cohesive sub-issue (#5774); roughly 40% of the
diff is unit tests.
### Any related issues, documentation, discussions?
Closes #5774. Part of umbrella #5772. Follows RFC discussion #5216.
### How was this PR tested?
New Vitest specs (scoring, color, recolor methods, and the menu toggle):
cd frontend && ng test --watch=false --include "/heatmap-scoring.spec.ts"
--include "/heatmap-color.spec.ts" --include "/joint-ui.service.spec.ts"
--include "/menu.component.spec.ts"
Also verified: `tsc --noEmit` (strict) clean, `eslint ./src` clean, Prettier
clean, `ng build` succeeds, and the existing `workflow-editor`/`menu` specs
still pass.
Manually tested in the workspace: ran a workflow, toggled Performance on,
switched all three views (recolor + legend range update), verified the hover
tooltip, toggled off (fills restore), and confirmed the mini-map mirrors the
colors.
<!-- before/after screenshots + the three views go here -->
UI screenshots
Before:
<img width="1469" height="837" alt="image"
src="https://github.com/user-attachments/assets/cd612dac-934b-4803-ad2a-6deb311679d6"
/>
After:
<img width="1470" height="836" alt="image"
src="https://github.com/user-attachments/assets/1c184de8-d5bd-4482-a8ae-c7f2e2d53f39"
/>
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Anthropic Claude Opus 4.7)
--
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]