You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while implementing objectui#5170 (PR objectui#5226), which fixed the three option-picker loaders in ResourceEditPage.tsx and the Audit tab. Filed unassigned for PM triage — deliberately not fixed in that PR, see "Why not folded in" below.
The reading
packages/app-shell/src/views/metadata-admin/widgets.tsx, inside FieldSelectorWidget (locate by text, not by line number):
setLoading(true);fetch(`/api/v1/objects/${objectName}/fields`).then(r=>r.json()).then(data=>{setFields(data.fields||[]);setLoading(false);}).catch(err=>{console.error('Failed to load fields:',err);setFields([]);setLoading(false);});
This is the same defect class objectui#5170 and objectui#5169 were filed for: the catch writes setFields([]) — the exact value a successful response with no fields writes — and clears the loading flag. The picker then renders as a completed, empty field list.
It is a fourth loader, and it shares nothing with the three that card named:
It does not go through MetadataClient. It is a raw fetch to /api/v1/objects/:name/fields, a REST path that no other widget in this file uses, and it does not check r.ok — so a 4xx/5xx whose body happens to parse as JSON lands in the success branch with data.fields undefined, and || [] renders it as "no fields". That is a second, distinct way to reach the same false empty, and it is not reachable in the three loaders [finding] Three option-picker loaders in ResourceEditPage swallow a failed load into an empty option list, with no trace at all #5170 covered.
So it needs its own loader rewrite and its own render wiring, not a line in an existing one. #5170's declared completion scope was the three option-picker loaders and their render sites; this one is outside it and would have widened that PR's verification surface without being covered by either card's acceptance criteria.
Shape, if it is taken
The same one, already landed twice in this directory: the four-arm LoadState union in views/metadata-admin/loadState.ts (added by PR objectui#5226, mirroring the union objectui#5110 landed for the References panel), plus the shared PickerLoadFailure render that PR added for the other pickers. Both exist now, so this is wiring rather than design. Worth also fixing the missing r.ok check while in there, since the current code cannot tell a refusal from an answer at all.
Dedup
Searched open issues for FieldSelectorWidget by name, for the field-fetch loader by path, and for the failure-rendered-as-empty family in widgets.tsx; nothing covering it. Control: the same search family returns objectui#5040 and objectui#4871 (both real metadata-admin widget cards, and #4871 closed), so the zero is a measurement rather than a dead query. No duplicate.
Deliberately filed standalone rather than as a sub-issue of objectui#5170: #5170's completion scope is the three ResourceEditPage loaders, and its PR is up. This loader is not inside that scope — it only shares its class.
Related
objectui#5170 and objectui#5169 (same class, fixed together in PR objectui#5226) · objectui#5110 (the union this shape comes from) · ADR-0110 D3, "a miss and a fault are different facts"
Found while implementing objectui#5170 (PR objectui#5226), which fixed the three option-picker loaders in
ResourceEditPage.tsxand the Audit tab. Filed unassigned for PM triage — deliberately not fixed in that PR, see "Why not folded in" below.The reading
packages/app-shell/src/views/metadata-admin/widgets.tsx, insideFieldSelectorWidget(locate by text, not by line number):This is the same defect class objectui#5170 and objectui#5169 were filed for: the
catchwritessetFields([])— the exact value a successful response with no fields writes — and clears the loading flag. The picker then renders as a completed, empty field list.Why it is a separate card and not part of #5170
It is a fourth loader, and it shares nothing with the three that card named:
MetadataClient. It is a rawfetchto/api/v1/objects/:name/fields, a REST path that no other widget in this file uses, and it does not checkr.ok— so a 4xx/5xx whose body happens to parse as JSON lands in the success branch withdata.fieldsundefined, and|| []renders it as "no fields". That is a second, distinct way to reach the same false empty, and it is not reachable in the three loaders [finding] Three option-picker loaders in ResourceEditPage swallow a failed load into an empty option list, with no trace at all #5170 covered.fields/loadingstate, not the sharedWidgetContextcatalogs. So thecatalogErrorschannel PR fix(app-shell): metadata pickers and the Audit tab tell a failed load from an empty one (#5170, #5169) #5226 added does not reach it, and the sharedPickerLoadFailureit added is not wired to it.console.error, which those three did not.So it needs its own loader rewrite and its own render wiring, not a line in an existing one. #5170's declared completion scope was the three option-picker loaders and their render sites; this one is outside it and would have widened that PR's verification surface without being covered by either card's acceptance criteria.
Shape, if it is taken
The same one, already landed twice in this directory: the four-arm
LoadStateunion inviews/metadata-admin/loadState.ts(added by PR objectui#5226, mirroring the union objectui#5110 landed for the References panel), plus the sharedPickerLoadFailurerender that PR added for the other pickers. Both exist now, so this is wiring rather than design. Worth also fixing the missingr.okcheck while in there, since the current code cannot tell a refusal from an answer at all.Dedup
Searched open issues for
FieldSelectorWidgetby name, for the field-fetch loader by path, and for the failure-rendered-as-empty family inwidgets.tsx; nothing covering it. Control: the same search family returns objectui#5040 and objectui#4871 (both real metadata-admin widget cards, and #4871 closed), so the zero is a measurement rather than a dead query. No duplicate.Deliberately filed standalone rather than as a sub-issue of objectui#5170: #5170's completion scope is the three
ResourceEditPageloaders, and its PR is up. This loader is not inside that scope — it only shares its class.Related
objectui#5170 and objectui#5169 (same class, fixed together in PR objectui#5226) · objectui#5110 (the union this shape comes from) · ADR-0110 D3, "a miss and a fault are different facts"