Skip to content

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

Closed

Description

@objectstack-fleet

QA-source: objectstack-ai/objectstack#21784 · integration-system.external-schema-browser-ui · acceptance[1]
Also: also acceptance[3], acceptance[4], negative[0], negative[4]

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

  1. Stock showcase boot (it ships datasource showcase_external), admin form sign-in.
  2. Open /_console/apps/setup/metadata/datasource/showcase_external (also under /apps/studio/metadata/datasource/…).
  3. 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.
  4. "Refresh catalog" → 200 with data.catalog.snapshotAt. Expected a timestamp; none renders.
  5. 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.
  6. 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:133 jsonOrThrow 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).


Generated by Claude Code

Activity

  1. ghost added
    area:studioChanging a running app without code — authoring, publish, docs and the portal
    on Oct 5, 2026
  2. ghost added
    bugSomething isn't working
    on Oct 5, 2026
  3. ghost added
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    on Oct 5, 2026
  4. ghost removed on Oct 5, 2026
  5. ghost
    self-assigned this
    on Oct 5, 2026
  6. ghost closed this as completedon Oct 5, 2026
  7. 5 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:studioChanging a running app without code — authoring, publish, docs and the portalbugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions