Repository navigation
fix(app-shell): permission matrix keeps a roll-up acknowledgement only while Read is on - #34954
Conversation
…y while Read is on Read off in updateFieldPerm now deletes rollupSourceUnreadableReason beside when, so the editor never authors the shape the spec refuses beside readable: false. withFieldBits keeps the reason while readable stays true and drops it only when readable goes false, so the bulk shortcuts stop dropping it silently. FieldPerm declares the optional key. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB L1 review · 2026-11-17T19:00ZL1: ACCEPT What I read at this head
ChecklistShape. Draft, Scope. Every path is inside the claimed surface:
Changeset. Patches Code. The fix follows the #25866
I checked the other write paths:
So no path now authors the refused shape, and no readable rewrite drops the reason. Tests. The commands are real and exit codes are recorded. The new pins parse every resulting entry with the real Docs. None made false. UI strings. None added. Unrelated files. None. Must-fixNone. Should-fixNone. Notes
CI at review timeThere are 51 check-runs on this sha: 28 success, 13 skipped, 10 in progress, 0 failed.
Landing needs every run on the landing head green. RoutingL1 ACCEPT. No L2 is owed (Clause-② no), and the PR is not governed. The area lands it once CI is fully green. |
|
repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz Landing · area o3-C · head f7de67d
State: ready + auto-merge now; on MERGED, #34786 closes via |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44160924991 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44170218125 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz Re-queue · head f7de67dThe queue removed this PR at 20:50Z after two group builds failed, both on one Test UI shard at "Fetch this commit's history and the base branch" (timed out after 14 minutes, before any test ran): run 44160924991 on shard 10/16, run 44170218125 on shard 3/16. No test failed in either. That step is runner infra, not this diff (a 106-line app-shell change), and the same timeout removed #34914 earlier today before its re-queue merged. Head, review and PR-head CI are unchanged from landing comment 6958514847, so this is the one re-queue. |
Requested by Yibo Wang · project thread
Fixes #34786
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz
维护者速读
rollupSourceUnreadableReason;批量快捷键(只读全部/可写全部)改写字段行时保留这条说明。readable: false旁边的说明,原来关 Read 会留下被拒的形状且无法清除;批量快捷键则会悄悄丢掉管理员写下的说明。@object-ui/app-shell的两个函数,无 spec 或接口变化;回滚即 revert 本 PR。permission-slice.ts(withFieldBits的readable &&条件)、PermissionMatrixEditor.tsx(updateFieldPerm的 Read off 级联)、permission-slice.fieldRule-26597.test.ts。cd ui && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/permission-slice.fieldRule-26597.test.ts,预期全绿,含 3 条withFieldBits新用例。What changes
FieldPerm(permission-slice.ts) declares the optionalrollupSourceUnreadableReasonkey, documented againstFieldPermissionSchema.updateFieldPerm(PermissionMatrixEditor.tsx): Read off now deletes the reason besidewhen(the objectstack#25866 cascade), so the editor never authors the shapeFIELD_PERMISSION_ROLLUP_REASON_ON_HIDDENrefuses.withFieldBitskeeps the reason whilereadablestays true and drops it only whenreadablegoes false. Its one caller,applyFieldBulk, always passesreadable: true, so the bulk shortcuts now keep the reason instead of dropping it silently.@object-ui/app-shellpatch.Tests
permission-slice.fieldRule-26597.test.ts: a new top-leveldescribeforwithFieldBits. It keeps the reason on a readable rewrite and drops it onreadable: false, andapplyFieldBulkRead-only all keeps it. Each resulting entry is parsed with the realFieldPermissionSchemafrom@objectstack/spec/security, and a control parse proves the refused shape really is refused (the issue path isrollupSourceUnreadableReason).PermissionMatrixEditor.fieldWhen-25866.test.tsx: a new top-leveldescribein the existing field-cascade harness. Read off on a stored acknowledged entry saves{ readable: false, editable: false }, Write all saves the entry with the reason kept, and both saved entries parse withFieldPermissionSchema.Acceptance notes
withFieldBits(cur, false, …)still keepswhen. The refusedwhenbesidereadable: falseshape is reachable only if a caller passesreadable: false, and no caller does (applyFieldBulkpassestrue). I left it alone because it is outside this card.Verification
Pinned tests, head 5d561af
os-verify-lockrunningvitest run --maxWorkers=2on the two files:Test Files 2 passed (2),Tests 27 passed (27),VERDICT command-exit 0.Ablations (scripts/ablation-replace.mjs, each restored to blob == HEAD)
delete next.rollupSourceUnreadableReason;inupdateFieldPerm:Read off removes the reason, so the saved entry is one the spec acceptsfails (1 failed). Restored to blob 27768b90fc7b, which equals HEAD.readable &&guard removed inwithFieldBits:drops the reason when the entry goes readable:falsefails (1 failed). Restored to blob 5206a2968c7c, which equals HEAD.withFieldBits(the pre-fix behaviour): 3 failed, namely the slice keep case, bulk Read-only all, and editor Write all. Restored to blob 5206a2968c7c, which equals HEAD.git diff HEADempty.Type check and gates
pnpm --filter @object-ui/app-shell run type-check(bothtscprograms):VERDICT command-exit 0.dispatch-gates --commands: 38 derived commands. 36 exited 0. Two were NOT MEASURED on the first pass:pnpm --dir ui exec vitest run scripts/(the files failed withCannot find package '@objectstack/spec/ui'because the run started before the spec dist existed, an environment fault) andpnpm check:type-check-debt(exit 3, its closure build never got a lock turn). The seat report records the re-run result.dispatch-gates --ran: 38 derived, 38 run.overlap-checkagainst origin/main c81f498 and open PR feat(studio): the permissions page speaks business wording; bulk buttons show on every row #34914:VERDICT clean exit 0.Generated by Claude Code