The icon knowledge is split between PHP and JavaScript, and nothing keeps the two sides in line. - Collectors set an icon name in PHP. `debugbar.js` holds the drawings and hard-codes `search`. - `indicatorIcon()` checks only for `clock` and `search`. Every other name gets the gears, so a typo in a collector draws gears with no error. - `indicator.icon` is a plain `string`, so static analysis accepts any value. **Changes:** - Replace the `if` chain in `indicatorIcon()` with one map from name to drawing. - Add an `icon_type` list of the valid names to `DebugBarTypes`, and use it for `indicator.icon`. - Add a test that fails when the PHP names and the JavaScript map do not match. - Show no icon for a name that the map does not have, so that a custom collector with an unknown name does not get the gears. Tabs stay as text, because icons would make each button wider.
Activity
niden commentedon Nov 5, 2026
Resolved in #65