Hive Hive
Sign in

fix(server, noora): apply runner metrics step-hover via Noora’s chart instance

GitHub issue · Closed

Metadata
Source
tuist/tuist #11584
Updated
Jul 5, 2026
Domains
Compute
Details

What

Fixes the runner-job step-hover correlation — hovering a CI step on the Overview is supposed to shade that step’s time window across the CPU/Memory/Network charts, but the band never appeared in production.

Why it was broken

The RunnerMetricsHighlight hook resolved each chart’s ECharts instance with echarts.getInstanceByDom, imported from the server’s ECharts. But the charts are created by Noora’s own ECharts copy, which is inlined into noora.js (a ~1.4 MB prebuilt bundle the server aliases). getInstanceByDom only resolves instances registered in the calling module’s ECharts registry, so a lookup from a different copy returns nothing — the markArea band was never applied.

It appeared to work in some local builds only because the bundle there happened to share a single ECharts; the production asset pipeline does not.

How

  • Noora (Chart.js): expose the live instance on the chart element as __nooraChart (set in render, cleared in destroyed).
  • Server (RunnerMetricsHighlight.js): read that object directly and call setOption on it, and drop the server-side echarts import entirely. The hover/epoch-parsing logic is unchanged — only the instance resolution.

This makes the correlation independent of how many ECharts copies a consumer bundles, and removes a redundant ECharts dependency from the app bundle.

Validation

  • Rebuilt noora.js (__nooraChart present) and confirmed the server app bundle (priv/static/app/assets/bundle.js, rebuilt by the esbuild watcher) now reads __nooraChart and no longer calls getInstanceByDom from the hook.
  • A full live repro on the runner Overview was blocked locally by a disk-full dev environment (the Elixir compile/migrate/seed couldn’t complete), so the build-level verification above stands in for the runtime check. The change is JS-only and directly addresses the confirmed two-ECharts-copies root cause; it’s straightforward to confirm on staging/prod once deployed (hover a step → the band shades the matching window).

🤖 Generated with Claude Code

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.