Hardening
In src/detail.jsx:84-95 the "Refresh metadata from Commons" button is gated on onRefresh && item.status === "published". Today the wiring is correct — src/app.jsx:953 passes onRefresh={refreshOneItem} and src/app.jsx:253-266 defines refreshOneItem.
Concern: a future refactor that drops the prop pass-through would silently turn the button into a no-op — the conditional just hides the button instead of erroring. The feature "works", but the failure mode is invisible.
Expected
Either:
- Make the prop required (drop the && onRefresh guard, treat missing prop as a programming error so it fails loudly during dev), or
- Add a console.warn when onRefresh is unexpectedly missing for a published item.
- Verify end-to-end on prod that opening a published item → clicking the cog → really updates the row with fresh extmetadata / SDC.
Where
- src/detail.jsx:84-95 — conditional render
- src/app.jsx:253-266 — refreshOneItem implementation
- src/app.jsx:953 — current pass-through
Reported by
Daanvr, 2026-05-08, during dead-UI review.