Skip to content

fix(xugu): route type expansion through member metadata - #6281

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
mapan0424:codex/xugu-type-member-expansion-fix
Aug 20, 2026
Merged

fix(xugu): route type expansion through member metadata#6281
t8y2 merged 2 commits into
t8y2:mainfrom
mapan0424:codex/xugu-type-member-expansion-fix

Conversation

@mapan0424

Copy link
Copy Markdown
Contributor

Summary

Fixes Xugu object type expansion when the sidebar restores or loads a tree node through the generic metadata path.

User-visible problem

Expanding a Xugu object type could issue a table-column lookup against the type name and return a vendor error indicating that the table or view did not exist. The type itself was valid; only the metadata route was incorrect.

Root cause

The direct sidebar click path already recognized Xugu object types and loaded their attributes and methods through the scoped completion endpoint. However, the shared loadTreeNodeChildren path used by tree restoration and refresh handled every type node with the generic custom-type loader. That path treats the object name as a relation and can eventually request table columns, which is invalid for Xugu object types.

Changes

  • Route Xugu expandable type nodes through loadXuguTypeMembers from the shared tree loader.
  • Keep the existing generic custom-type path unchanged for PostgreSQL-family and other supported databases.
  • Add a regression test proving that generic tree restoration calls the Xugu member endpoint and never calls the generic custom-type details loader.

Compatibility and scope

This is a narrow frontend metadata-routing fix. It changes behavior only when the connection is Xugu and the node is explicitly marked as an expandable object type. Other database types and existing custom-type handling are unchanged.

Validation

  • Xugu live metadata validation confirmed object type attributes can be read through the member endpoint and the session remains usable.
  • Vitest: 59 tests passed across the connection metadata-loading and Xugu type-member suites.
  • Formatting check passed with oxfmt.
  • git diff --check passed.

@github-actions github-actions Bot added area/desktop Desktop application or Tauri shell bug Something isn't working labels Aug 14, 2026
@mapan0424
mapan0424 force-pushed the codex/xugu-type-member-expansion-fix branch from d8f4e0a to 50a3923 Compare August 20, 2026 02:56
@mapan0424
mapan0424 marked this pull request as ready for review August 20, 2026 02:56

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer patch applied on reviewed head 50a3923, producing f34cfea.

  • Forced tree restoration now reloads expanded Xugu type members instead of entering the user-click toggle/collapse branch.
  • Normal click behavior remains unchanged.
  • Verified: 2 focused Vitest files passed (59/59), pnpm typecheck passed, and git diff --check passed.

The patch was pushed by fast-forward without rewriting contributor history.

@t8y2
t8y2 merged commit 90af026 into t8y2:main Aug 20, 2026
14 checks passed
@t8y2

t8y2 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 90af026, will be released in the next version.

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

Labels

area/desktop Desktop application or Tauri shell bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants