feat(heatmap): add sorted bar chart view to sector HeatmapPanel (#2326)

* feat(heatmap): add sorted bar chart view to HeatmapPanel (#2246)

- Add FearGreedSectorPerformance message to proto + regenerate
- Expose sectorPerformance array in GetFearGreedIndexResponse RPC handler
- HeatmapPanel.renderHeatmap accepts optional sectorBars; renders
  sorted horizontal bar chart below existing tile grid
- Sectors ranked by day change (gainers first, losers last)
- Green/red bars proportional to |change| (max ~3% = 100% width)
- Reuses fearGreedIndex bootstrap data — zero extra network calls
- Add .heatmap-bar-chart CSS: 18px rows, 10px font, compact layout

* fix(heatmap): address code review P1 findings on PR #2326

- Server: guard change1d with Number.isFinite fallback so non-numeric
  Redis values (NaN) coerce to 0 instead of propagating through
- Client: filter out any NaN change1d entries before computing maxAbs;
  Math.max propagates NaN so a single bad entry makes all bars invisible
  (width:NaN%); also bail early if filtered list is empty

* fix(heatmap): address Greptile review comments on PR #2326

Use var(--green)/var(--red) for bar fill colour to match text label
CSS variables and avoid visual mismatch across themes.
This commit is contained in:
Elie Habib
2026-03-27 09:13:51 +04:00
committed by GitHub
parent 4d1d342d03
commit d80736d1ba
9 changed files with 140 additions and 6 deletions

File diff suppressed because one or more lines are too long