refactor: unify runtime view editor onto studio's spec-driven inspector#1496
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…ven inspector Replace the legacy buildViewConfigSchema/ConfigPanelRenderer engine in the runtime ObjectView right-rail with the studio's spec-driven ViewVariantInspector, so the runtime and metadata studio share one view-editing engine. - add view-config-adapter: bridges the flat runtime view <-> ViewItem draft shape, keeping the sys_view persistence path untouched - rewrite ViewConfigPanel to host ViewVariantInspector (network-free field catalog via objectFieldsOverride sourced from objectDef.fields) - thread optional objectFieldsOverride through ViewVariantInspector, FieldsListEditor and useObjectFields (backward compatible for studio) - retire the legacy buildViewConfigSchema engine and its exports Per-view-type config fields now render straight from @objectstack/spec. ConfigPanelRenderer is retained (still used by dashboard/report).
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…ner-ui-cleanup-G8zR9
A clean app-shell build (cache invalidated by this branch) surfaced two pre-existing type errors that the turbo build cache had been masking: - PageBlockCanvas: drop the unused `baseIdOf` destructured prop (TS6133) - useActionModal: narrow the ModalForm `mode` to its literal union (TS2322) Neither is related to the view-editor migration; both block `tsc`.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Jun 6, 2026
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.
背景
元数据设计器已统一迁移到 studio。最初讨论的方向是"作废/删除运行时右上角的列表/看板编辑按钮",但调研后发现:
sys_view运行时记录,不应删除。buildViewConfigSchema+ConfigPanelRenderer,2075 行),与 studio 的 spec 驱动 inspector 重复,且有 bug、难维护、与 studio 不一致。经维护者确认,方向调整为:把运行时视图编辑统一到 studio 的 spec 驱动引擎,功能对齐以 spec 表单为准、允许精简。
改动
view-config-adapter.ts:在运行时扁平NamedListView↔ studioViewItemdraft 两种形状间双向转换,不改动sys_view持久化路径。ViewConfigPanel.tsx:右栏内容从旧引擎换成复用 studio 的ViewVariantInspector(per-view-type 配置字段直接来自@objectstack/spec)。字段目录走objectDef.fields(objectFieldsOverride),零网络依赖。ViewVariantInspector/FieldsListEditor/useObjectFields增加objectFieldsOverride(studio 不传时行为不变)。plugin-view的buildViewConfigSchema/view-config-schema.tsx及其测试与导出。ConfigPanelRenderer(dashboard/report 仍在用)。功能精简点(以 spec 表单为准)
visibleOn自动展现字段。addRecordViaForm等)暂不提供编辑入口;已存数据在往返中原样保留,不丢失。附带修复(合并最新 main 后的全量 tsc 暴露的潜伏错误)
合并 origin/main(含 #1500)后,缓存失效触发全量
tsc,暴露两处此前被构建缓存掩盖的既有类型错误,已最小修复以解除构建阻塞:PageBlockCanvas:删除未使用的baseIdOf解构(TS6133)useActionModal:收窄 ModalFormmode到字面量联合(TS2322)验证
app-shellbuild 通过;app-shell/views+metadata-admin+plugin-view共 203 测试全过。https://claude.ai/code/session_01SZW3fVCCbijEibXtEH3ZGL