Page MenuHomePhabricator

Detail panel 'Refresh metadata' button — make wiring fail-loud (!17)
Closed, ResolvedPublic

Description

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-266refreshOneItem implementation
  • src/app.jsx:953 — current pass-through

Reported by

Daanvr, 2026-05-08, during dead-UI review.

Event Timeline

Daanvr triaged this task as Low priority.
Daanvr renamed this task from Detail panel 'Refresh metadata' button — make wiring fail-loud to Detail panel 'Refresh metadata' button — make wiring fail-loud (!17).May 11 2026, 2:13 PM

Released as v0.6.2 (MR !17 merged into main).