---
title: Repair the dead PercentileChart component
type: task
status: completed
description: >-
  PercentileChart and selected-player-efficiency-stats were removed rather than revived: the
  components never mounted (their tab was commented out in e0290e5a2), and percentile-metric is the
  live connected equivalent. Deployed and browser-verified.
base_uri: user:task/league/repair-dead-percentile-chart.md
created_at: '2026-08-05T22:51:40.944Z'
entity_id: 47ca7d8a-ebb4-4037-b252-f6a5e581cb65
finished_at: '2026-08-05T23:02:30.347Z'
observations:
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
  - ████████████████████████████████████████████████
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-08-05T23:07:48.172Z'
visibility_analyzed_at: '2026-11-05T23:50:04.367Z'
---

# Repair the dead PercentileChart component

**Outcome: removed, not revived. Deployed and browser-verified.**

## What the defect actually was

The briefed premise — that `PercentileChart` threw on every render — was wrong. The component never mounted, so it never threw and produced no `window.onerror` report.

The entire efficiency-stats tab in `selected-player.js` was commented out in `e0290e5a2` ("temp disable team stats and efficiency in selected player view"): the `<Tab>`, the `<TabPanel>`, and the import. There was no UI path to the panel.

What the brief got right, and what re-derivation confirmed:

- `percentile-chart/index.js` was a bare re-export with no `connect`.
- No caller passed a `percentiles` prop.
- `percentile-chart.js:13` read `percentiles[type]`.

Those three are true. They just never executed.

## Why remove

`percentile-metric` is the live equivalent — already connected via `get_percentiles`, with 10 call sites and exactly the wiring `PercentileChart` lacked. `PercentileChart` was its abandoned predecessor.

Adding `connect` alone would not have revived it. `get_percentiles` returns an Immutable `Map`, and `percentile-chart.js` uses bracket access, which yields `undefined` on a Map — the chart would have rendered `NaN` bar widths. That is the Record-style silent-absent-key trap arriving through the selector.

## What shipped

| Change                                                                                  | Commit      |
| --------------------------------------------------------------------------------------- | ----------- |
| Deleted `percentile-chart/` (3 files) and `selected-player-efficiency-stats/` (2 files) | `408fc2cd8` |
| Removed the last commented call-site references in `selected-player.js`                 | `55e3d9085` |

`408fc2cd8` is not single-purpose — the five deletions were swept into an unrelated session's crontab commit by an argument-less `git commit`, reaching `origin/master` before verification finished. Undoing the removal would need a fresh restoring commit, not a revert.

Deployed to production at `54f54f378` via `yarn deploy:all` (run by the sibling session that swept the commit).

## Verification

- **Browser, `yarn dev:live`** — selected-player drawer renders for an RB and a QB; all seven tabs map to the correct `TabPanel`; `window.onerror` captured zero errors.
- **`yarn build`** — compiles; no dangling import.
- **Production bundle** — zero `percentile__chart` references, control-validated against `selected__section`, `player__name`, and `rfa-nomination` so the zero is a real absence rather than a pattern that cannot match.
