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
{{ message }}
Repository navigation
console(metadata-admin): the External Datasource panel reads the raw {success,data} envelope — remote tables list empty, no catalog timestamp, and Validation crashes with "Cannot read properties of undefined (reading 'length')" #11628
A clause of integration-system.external-schema-browser-ui fails in the ObjectStack 17.7 pre-release checklist run objectstack-ai/objectstack#21784 (framework subject 316be321e, console pin 2e818d0b51ec). An independent verifier (VF3, RUNNER rule 7) confirmed it: P2. It predates the 17.6.0 console pin 31971ff1e; no open duplicate was found. Owner: objectui.
Reproduction
Stock showcase boot (it ships datasource showcase_external), admin form sign-in.
Open /_console/apps/setup/metadata/datasource/showcase_external (also under /apps/studio/metadata/datasource/…).
Network: GET …/external/tables → {"success":true,"data":{"tables":[{"name":"customers","columnCount":7},{"name":"orders","columnCount":7}]}}. Panel: "No remote tables found (check the datasource's allowedSchemas)." Expected two rows.
"Refresh catalog" → 200 with data.catalog.snapshotAt. Expected a timestamp; none renders.
Validation tab → "Run validation" → 200 {success,data:{ok:true,results:[2 rows]}}. Panel replaced by "Preview failed to render — Cannot read properties of undefined (reading 'length')". Expected verdict rows.
The import dialog (A3) reads data.draft through the same code and is unreachable while the list is empty. Seen twice by the runner and twice by the verifier.
Mechanism
packages/app-shell/src/views/metadata-admin/external/api.ts:133jsonOrThrow returns the raw body; callers read data.tables (:146-147), data.draft (:164-165), data.catalog (:174-175), and validate returns the body as {ok,results} (:186).
Every framework route answers through sendOk{success:true,data:{…}} (packages/rest/src/external-datasource-routes.ts:420 etc.).
Consumers: SchemaBrowser.tsx:53, ExternalDatasourcePanel.tsx:72/119, ValidationPanel.tsx:135-159 (results.length on undefined).
objectui's api.test.ts mocks the bare {tables} shape, so the unit test hides it. api.ts last changed at 31971ff1e; the server envelope is present at 617f25f8a. No duplicate found.
Done when
The client unwraps the envelope for tables / draft / catalog / validate, the test fixture uses the real wire shape, and the panel lists, refreshes and validates.
Related: the server-side import twin defect is objectstack-ai/objectstack#21788 (separate card).
Activity
5 remaining items
fix(app-shell): the External Datasource panel unwraps the `{ success,…