feat(types,core,app-shell)!: follow the managedBy: 'system' → 'system-data' retirement (objectstack#3355) - #3214
Merged
Conversation
…tem-data'` retirement (objectstack#3355) The UI half of the framework's protocol-17 retirement, landing with it so the closed `ManagedByBucket` union stays a mirror rather than a fork. What this deletes is a derivation. v16's `system` doubled as both the engine-owned default and the writable set, so three surfaces had to RECOVER the distinction from `userActions` at render time — `isSystemWritable`, the badge's synthetic `'system-writable'` variant key, and the empty-state resolver's `create`-affordance probe. The bucket now states it, so all three read the value instead of inferring it, and the badge's variant map is 1:1 with the union again (a new bucket becomes a compile error, not a fallthrough). i18n keys are deliberately unchanged (`system`, `systemWritable`), so no locale bundle moves. BREAKING: `ManagedByBadge`'s `userActions` prop and the `ManagedByUserActions` export are removed — the bucket selects the variant now, and keeping an accepted -but-ignored prop would reproduce, one layer up, the dead-metadata defect this change exists to remove. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
|
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.
UI 侧配套 PR,对应 framework 的 objectstack-ai/objectstack#3355 / objectstack-ai/objectstack#4660。两边需要一起合:
ManagedByBucket是 framework 枚举的镜像,单独合任何一边都会让联合类型与 spec 失配。背景
ADR-0103 在 v16 加法式拆分了被重载的
managedBy: 'system':引擎自有对象迁到显式的engine-owned,admin/user 可写的 8 个留在system。于是幸存的那个值恰好在描述已经搬走的那一半。protocol 17 把残留改名system-data(schema 归平台,data 归 admin/用户),退役裸system。这个 PR 真正删掉的是一层"推导"
因为 v16 的
system同时兼任引擎自有默认值和可写集合,UI 有三处必须在渲染时从userActions反推语义。桶名现在自己说清楚了,三处都改为直接读值:isSystemWritable()userActions里是否有任一 opted-in 写入managedBy === 'system-data'ManagedByBadge'system-writable'variant keyresolveManagedByEmptyState()createaffordance 判断该显示"自动产生条目"还是 New 按钮system-data按定义落到通用空状态;engine-owned保留自动产生的文案badge 那一条附带一个结构性收益:variant map 重新与联合类型一一对应,新增桶变成编译错误而不是静默 fallthrough——这正是 objectui#2712 当初关闭联合类型想要的性质,v16 的合成 key 把它撕开了一个口子。
i18n 键刻意不动(
system、systemWritable),所以没有任何语言包需要改。engine-owned继续复用system这个键(不是退役的桶值),文案一字未改。Breaking(UI API)
ManagedByBadge的userActionsprop 与导出的ManagedByUserActions接口移除。桶名现在独自决定 variant,这个 prop 已经变成没有任何读者的元数据——正是 framework 那边这次改动要消灭的缺陷。把它保留成"接受但忽略"的 prop,等于在上一层原样复制一遍同一个缺陷,所以直接删。仓内 3 个调用点已同步(
RecordDetailView、ObjectView、RecordFormPage),下游只需删掉这个 prop,无其他改动。MANAGED_BY_BUCKETS/ManagedByBucket不再包含'system'。关于跨仓时序
objectui 依赖已发布的
@objectstack/spec ^17.0.0-rc.1,其中还没有system-data。这不影响运行时正确性:resolveCrudAffordances委派给 spec,未知桶回落到platform默认行{create,import,edit,delete,exportCsv: true},与新的system-data行逐位相同。等 framework 发版后回落路径消失,结果不变。验证
🤖 Generated with Claude Code
https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
Generated by Claude Code