Found while answering a Discord question about goods icons (research spec: docs/superpowers/specs/2026-08-24-discord-cultures-ice-goods-answer.md).
Symptom
Upload a custom SVG (or raster) icon in the good editor, save the map, reload it, reopen the good editor: the custom icon no longer appears in the icon dropdown. Goods already assigned to it still render correctly — persistence itself works (custom defs are serialized in save slot 45, src/services/io/save.ts:132-137, and reinjected on load, src/services/io/load.ts:427-431).
Cause
The icon picker enumerates only <symbol> elements:
src/controllers/good-editor.ts:12 — options built from #good-icons via querySelectorAll("symbol")
src/controllers/good-editor.ts:502-560 — uploadImage appends the uploaded file as an <svg> element (id good-custom-*), not a <symbol>
Within the upload session the option is manually appended (good-editor.ts:481), which masks the mismatch until the next reload.
Fix options
- One-liner: enumerate
symbol, svg at good-editor.ts:12, or
- Wrap uploads as
<symbol> in uploadImage (more consistent with the 72 built-in defs, but check existing maps carrying <svg>-shaped custom defs still resolve — <use> accepts both).
Found while answering a Discord question about goods icons (research spec: docs/superpowers/specs/2026-08-24-discord-cultures-ice-goods-answer.md).
Symptom
Upload a custom SVG (or raster) icon in the good editor, save the map, reload it, reopen the good editor: the custom icon no longer appears in the icon dropdown. Goods already assigned to it still render correctly — persistence itself works (custom defs are serialized in save slot 45,
src/services/io/save.ts:132-137, and reinjected on load,src/services/io/load.ts:427-431).Cause
The icon picker enumerates only
<symbol>elements:src/controllers/good-editor.ts:12— options built from#good-iconsviaquerySelectorAll("symbol")src/controllers/good-editor.ts:502-560—uploadImageappends the uploaded file as an<svg>element (idgood-custom-*), not a<symbol>Within the upload session the option is manually appended (
good-editor.ts:481), which masks the mismatch until the next reload.Fix options
symbol, svgatgood-editor.ts:12, or<symbol>inuploadImage(more consistent with the 72 built-in defs, but check existing maps carrying<svg>-shaped custom defs still resolve —<use>accepts both).