The GitHub Actions job "Comment commands" on texera.git/main has succeeded.
Run started by GitHub user gupta-sahil01 (triggered by gupta-sahil01).

Head commit for run:
70c21145887920528d7d5540e3fb790b43e8b759 / Prateek Ganigi 
<[email protected]>
feat(frontend): add toggleable performance heat-map overlay (#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)
- **Time / row**: seconds per output row (slow producers / low
throughput read 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 "**/heatmap-legend.component.spec.ts" --include
"**/joint-ui.service.spec.ts" --include "**/menu.component.spec.ts"
--include "**/workflow-editor.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)

Report URL: https://github.com/apache/texera/actions/runs/33355152852

With regards,
GitHub Actions via GitBox

Reply via email to