refactor: unify runtime report editor onto studio's spec-driven inspector#1504
Merged
Conversation
Add a curated report-level home inspector for the studio metadata editor, mirroring ViewVariantInspector but for the flat Report document: - report-schema.ts: derive the Report JSONSchema + authoring form from @objectstack/spec (ReportSchema / reportForm), pruning curated fields - ReportDefaultInspector: label / object / type pickers + columns list (add / reorder / drill into the scoped ReportColumnInspector) + the spec-driven SchemaForm for the rest; network-free via objectFieldsOverride - register as the default inspector for the 'report' type - i18n keys (en + zh) for the report inspector labels Studio-only; the runtime ReportView is migrated separately.
… inspector ReportView's right-rail report editor now hosts the studio's spec-driven ReportDefaultInspector instead of plugin-report's legacy buildReportSchema/ConfigPanelRenderer panel, so runtime and studio share one report-editing surface. - new app-shell ReportConfigPanel (drop-in props) hosts ReportDefaultInspector; lives in app-shell to avoid a circular dep on plugin-report - the flat Report document is the inspector draft directly (no shape adapter); availableFields are mapped to a network-free objectFieldsOverride - ReportView no longer imports plugin-report's ReportConfigPanel; the sys_report persistence path is unchanged plugin-report's panel is retained (still used internally by JoinedBlocksEditor).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
背景
延续 #1496(视图编辑统一到 studio):把运行时报表编辑也从 plugin-report 的旧
buildReportSchema+ConfigPanelRenderer引擎,统一到 studio 的 spec 驱动 inspector。报表的难点(与视图不同):
ReportConfigPanel在plugin-report包,而 studio inspector 在app-shell——app-shell 依赖 plugin-report,反向 import 会循环依赖。所以把编辑宿主搬进 app-shell。改动(两阶段)
Stage 1 — studio 侧补齐报表 inspector
report-schema.ts:从@objectstack/spec的ReportSchema/reportForm派生 JSONSchema + 授权表单(对标view-schema.ts)。ReportDefaultInspector.tsx:报表级 home inspector(label/object/type 选择 + 列管理 + spec 驱动SchemaForm),对标ViewVariantInspector;objectFieldsOverride零网络。report类型的 default inspector;EN/ZH i18n 各 16 键。Stage 2 — 运行时迁移
ReportConfigPanel(drop-in 同签名),内部挂ReportDefaultInspector;置于 app-shell 以避开循环依赖。ReportView改用本地面板,不再 import plugin-report 的ReportConfigPanel;availableFields映射成objectFieldsOverride。报表是扁平ReportSchema,直接作为 draft,无需形状适配器。sys_report持久化路径不变。plugin-report 的旧面板保留(其JoinedBlocksEditor仍内部引用)。功能精简点(以 spec 表单为准)
ReportColumnInspector,运行时未挂宿主,故运行时仅支持列的增/删/排序/选字段;旧面板的校验横幅也暂未呈现。已存数据原样保留。验证
pnpm turbo run build --filter=@object-ui/app-shell:27/27 通过。app-shell/src/views测试 167 全过(含新增 report-schema 8 例 + ReportDefaultInspector 4 例)。https://claude.ai/code/session_01SZW3fVCCbijEibXtEH3ZGL
Generated by Claude Code