Repository navigation
fix(setup): permission set field rows leave out the platform's bookkeeping columns - #27439
Merged
Merged
Conversation
…eping columns A field the platform marks system AND hidden (__search, organization_id, owning_business_unit_id) is no longer offered in the permission set's field rows, judged by isStudioHiddenSystemField. A stored entry, in the draft or the last loaded/saved set, still draws as written. Claude-Session: https://claude.ai/code/session_01JQwxbWHPvxeSBbvjBYKZ8x Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbWHPvxeSBbvjBYKZ8x Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbWHPvxeSBbvjBYKZ8x Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#2 · os-warren · session_01JQwxbXpF772qWJjojJvRXw 席位核对ACCEPT · 席位意见:Setup 权限集展开对象后的字段行不再列出平台记账列(
|
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.
Requested by Warren · project thread
Fixes #27404
Clause-②: no
Metadata-protocol: none
维护者速读
__search、organization_id、owning_business_unit_id),判据沿用 Studio 数据栏的isStudioHiddenSystemField(system 且 hidden)。__search)” 排在第一,管理员看到的是平台内部列而不是对象自己的字段。PermissionMatrixEditor.tsx一个文件。PermissionMatrixEditor.tsx里FieldsSubTable的offered过滤;同文件ensureFields带上 system/hidden;PermissionMatrixEditor.systemFields-27404.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.systemFields-27404.test.tsx,预期 5 passed。What changes
FieldSummarykeeps the served definition'ssystemandhiddenmarks;ensureFieldsreads them as booleans (=== true, the spec declares bothz.boolean()).FieldsSubTabledraws the offered rows: every field except oneisStudioHiddenSystemFieldholds for, imported fromviews/studio-design/studioHiddenSystemField.ts(untouched). No second predicate, no name list.baselineFieldKeys, set where the dirty baseline is re-anchored). So a Clear on such a row keeps the row on screen until that save lands.fieldNamesstays the full field list, so awhennaming a left-out column is not linted as unknown.loadObjectFields(the RLS CEL editor) is untouched: it feeds lint and autocomplete only and offers no picker.Why
The ruling on the card: the platform's bookkeeping columns are the fields where
systemANDhiddenhold together (isStudioHiddenSystemField, objectui#11780); they are dropped from offered field lists, and a value already stored against one still draws as written (objectui#13152 CONTROL). This editor was the one field list that did not apply it.Tests
New
PermissionMatrixEditor.systemFields-27404.test.tsx(package door, served definition with__searchandorganization_idmarked system + hidden,owner_idsystem only,internal_noteshidden only):__searchandorganization_idare not offered; the count reads4 / 4.owner_idstill draw, rows in name order.__searchentry draws as written (Read off, a rule, not inherited).__searchentry, after which the column is no longer offered.Ablation (fix committed first,
scripts/ablation-replace.mjson the predicate term of theofferedfilter, replaced bytrue ||): anchor 1 → 0, all 5 tests red, restore verified blob == HEAD andgit diff HEADempty. The three CONTROL cases go red too, because each pins the exact row list, which the ablation widens.Acceptance notes
studio-design/, asFlowReferenceFieldin this samemetadata-admin/tree already does.Verification
Local gates on the final head
Head
59c93806(origin/main c5d4634 merged in), derived bynode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack;--ranreconciliation: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.Human Minimum
packages/specholds no runtime logic. (no spec change)pnpm lintpasses. (eslint on both touched files: 0 errors)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
Generated by Claude Code