feat(metadata-admin): curated forms graft server-only fields (skew root-cure, last piece)#1580
Merged
Merged
Conversation
…ot-cure, last piece) The curated "home" inspectors (report/dashboard/view) derive their authoring form from the BUNDLED @objectstack/spec. When the running server adds fields to a type (e.g. a report's dataset/rows/values) before objectui bumps its bundled spec, those fields exist in the live server schema (/meta/types → entry.schema) but not the bundled one — so they were only editable via the raw "source" tab. clientValidation already stopped the bundled spec from being STRICTER than the server (no false "required" banners). This is the symmetric other half: let the bundled-derived FORM be a SUPERSET by grafting in any server-only top-level properties, so new fields become directly editable in the right-hand curated form. - new mergeServerFields(): additive, lag-tolerant merge of server-only props into BOTH schema.properties AND the form (trailing "More fields" section, since SchemaForm renders only form-declared fields). No-op when offline, when nothing is new, or once the bundle catches up — no per-field shim to remove. - thread serverSchema (entry.schema) through MetadataDefaultInspectorProps from ResourceEditPage into the report/dashboard/view default inspectors. - report surfaces dataset/rows/values/runtimeFilter directly; dashboard + view use the same generic path (no-op until their bundled spec lags). - i18n: engine.inspector.moreFields (en + zh-CN). - tests: mergeServerFields.test.ts (7) — graft, exclude curated, no-op paths, bundle-catch-up, flat-render, already-declared. Existing inspector/schema suites green (69). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Completes the cross-repo spec-skew root-cure. The curated home inspectors (report/dashboard/view) derive their form from the bundled
@objectstack/spec; when the server adds fields (e.g. a report'sdataset/rows/values) before objectui bumps the bundled spec, those fields existed in the live server schema but were only editable via the raw source tab.clientValidationalready stopped the bundled spec from being stricter than the server (no false 'required' banners). This is the symmetric other half: let the bundled-derived form be a superset by grafting server-only top-level properties in.What
mergeServerFields()— additive, lag-tolerant: grafts server-only props into bothschema.propertiesand the form (trailing More fields section, since SchemaForm renders only form-declared fields). No-op offline / when nothing's new / once the bundle catches up — no per-field shim to remove.serverSchema(entry.schema) throughMetadataDefaultInspectorPropsfromResourceEditPageinto the report/dashboard/view default inspectors.dataset/rows/values/runtimeFilterdirectly; dashboard + view use the same generic path.engine.inspector.moreFields(en + zh-CN).Tests
mergeServerFields.test.ts(7): graft, exclude-curated, no-op paths, bundle-catch-up, flat-render, already-declared.🤖 Generated with Claude Code