Uh oh!
There was an error while loading. Please reload this page.
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
|
os-zhuang
marked this pull request as ready for review
August 2, 2026 16:10
Uh oh!
There was an error while loading. Please reload this page.
akarma-synetal pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 10, 2026
…eryDataset (objectstack-ai#3813) (objectstack-ai#3824) The runtime half of the hand-picked-envelope family objectstack-ai#3613/objectstack-ai#3752 fixed on the type face. queryDataset rebuilds its result by picking keys off the REST payload one by one, and drillRanges was never in the list — so the analytics service's objectstack-ai#1752 date-range drill sidecar was dropped by the only real adapter in this repo, while five consumer sites were already reading it (DatasetWidget.tsx:471/:593, DatasetReportRenderer.tsx:316/:431/:855). The effect was a MISSING drill, not a degraded one. A dateGranularity dimension groups a span of records into one bucket, which equality filters cannot express, so service-analytics excludes date dims from dimensionFields/drillRawRows and sends a half-open [gte, lt) range per row instead (analytics-service.ts:807+). For a chart or report grouped only by time, drillRanges is therefore the only thing that can make canDrill = !!object && (drillDims.length > 0 || !!drillRanges?.length) true — dropped, the whole drill entry point disappeared. A mixed date + non-date grouping kept its drill but lost the time bound, so clicking June's bar opened every month (a superset). Neither side's tests could see it: the dashboard/report suites mock their own data source and feed drillRanges in directly, and the adapter's suite never asserted the key. The new tests mock the envelope the SERVER actually sends — bare (res.json, no success/data wrapper), carrying sql, and for a date-only grouping carrying object + drillRanges and NO dimensionFields/drillRawRows — then assert the key arrives verbatim and row-aligned, that the consumers' own canDrill predicate is true, and that the shared buildDatasetDrillFilter scopes the list to the clicked bucket (both halves for a mixed grouping). The entry type is @object-ui/core's DatasetDrillRange BY REFERENCE, not a local { field, gte, lt } copy: it is the single in-repo declaration of the shape (what buildDatasetDrillFilter accepts and what both renderers type their state with) and @objectstack/spec does not own it yet, so a restatement would be a third dialect. drillRawTotals (objectstack-ai#3214) is deliberately NOT added: zero consumers in this repo, so passing it through would add a declared-but-unexercised key with no user-facing effect. Filed separately as a finding. Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt Co-authored-by: Claude <noreply@anthropic.com>
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 freeto 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