This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(app-shell): readable option labels for unlabeled datasource enum selects (objectui#13353) - #13499
Merged
Merged
Conversation
…selects (objectui#13353) The datasource editor's driver-config form rendered each JSON Schema enum member as its own option text, so the SQL drivers' autoMigrate select offered the bare words "off" and "safe". The driver-config schema declares no per-option label, so each option's text is now built from the raw value with Studio's humanizeKey, the helper SchemaForm's enum selects already use. The value the form saves stays the raw enum member. Adds DatasourceResourcePage.enumOptionLabels-13353.test.tsx (red on the unmodified page) and moves the #11252 control's expected trigger text from "remote" to "Remote". Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XWGTsmqrtrt1Zqh1ioWqsT
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对 — ACCEPT · PR #13499 @
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XWGTsmqrtrt1Zqh1ioWqsT
Fixes #13353
What changed
DatasourceResourcePage.tsx(Setup → Datasources editor): a driver-config JSON Schemaenumselect rendered each raw value (off,safe) as its option text. The driver-config schema declares no per-option label (triage comment 6359343643: no carrier, no protocol change), so each option's text is now built from its raw value with Studio's existinghumanizeKey(metadata-admin/inspectors/json-schema-to-fields.ts), the same helperSchemaForm's enum selects already use.off→ "Off",safe→ "Safe",read_only→ "Read Only",read-write→ "Read Write",fullSync→ "Full Sync". TheSelectItemvalue, and therefore what the form saves, stays the raw enum member. No new helper written.DatasourceResourcePage.enumOptionLabels-13353.test.tsx: anautoMigrateenum (off | safe, no labels) shows "Off" / "Safe"; snake, kebab and camel members read as words; choosing "Safe" and "Full Sync" then creating postsconfig.autoMigrate: 'safe'andconfig.syncMode: 'fullSync'.DatasourceResourcePage.selectPlaceholderLocale-11252.test.tsx: its CONTROL case expected the closed trigger to readremote; it now readsRemote..changeset/13353-datasource-enum-option-labels.md: patch for@object-ui/app-shell. Clause-②: no. Metadata-protocol: none.What I ran
expected [ 'off', 'safe' ] to deeply equal [ 'Off', 'Safe' ], likewise for the mixed-case enum).pnpm exec vitest run packages/app-shell/src/views/metadata-admin/datasource/ packages/app-shell/src/views/metadata-admin/inspectors/json-schema-to-fields.test.ts→ 8 files, 71 tests passed (all sevenDatasourceResourcePage.*.test.tsxfiles plus thehumanizeKeytests).spec-symbol-parity.test.ts,ResourceHistoryPage.rollbackConfirm-13333.test.tsx,scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts, plusproduct-neutral-renderer.ratchet.test.ts→ 4 files, 99 tests passed.pnpm turbo run type-check --filter=@object-ui/app-shell --continue→ 30 of 30 tasks successful.eslinton the three touched source/test files → 0 errors, 2 warnings, both on lines this PR does not touch (no-explicit-anyin theapihelper,set-state-in-effecton the load effect).node scripts/check-changeset-presence.mjs→ pass;node scripts/check-changeset-no-major.mjs→ pass;pnpm check:new-line-citations→ 0 new citations.NOT MEASURED
The whole
@object-ui/app-shellsuite and the fullpnpm test: left to CI's sharded run. Locally only the test files that name the page or the helper were run, so a test elsewhere that asserts a datasource enum option's raw text would not have been seen locally.No browser check against a live backend; the option text is read from the rendered Radix select in jsdom.
A declared option label (a future
oneOf/const/titleor similar carrier) is not read; that is a maintainer ruling, not this card.Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)