Repository navigation
fix(app-shell): the delegated-admin scope facet shows the spec default for an unset key - #26990
Merged
objectstack-fleet[bot] merged 3 commits intoOct 28, 2026
Conversation
…t for an unset key Each switch in the delegated-admin scope facet draws the draft's own boolean, or the spec default for a key the draft leaves unset; a flip writes an explicit boolean, and drawing a default writes nothing. Claude-Session: https://claude.ai/code/session_01J8VVAkZns5rNnK2rtszzbQ Co-authored-by: Claude <noreply@anthropic.com>
…ult for an unset key Claude-Session: https://claude.ai/code/session_01J8VVAkZns5rNnK2rtszzbQ Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAkZns5rNnK2rtszzbQ Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Oct 28, 2026
Contributor
Author
|
ACCEPT — PM review on head
Landing: ready + auto-merge. Generated by Claude Code |
objectstack-fleet
Bot
deleted the
claude/issue-26706-delegated-admin-scope-display
branch
October 28, 2026 01:56
This was referenced Oct 28, 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.
Fixes #26706
Clause-②: no
Metadata-protocol: none
维护者速读
AdminScopeSchema)的默认值;管理员切换开关时才写入显式的布尔值。PermissionAdvancedFacets.tsx的ADMIN_SCOPE_SWITCH_DEFAULTS与scopeSwitchOn(风险 hunk:两个 Switch 的checked);新测试PermissionAdvancedFacets.adminScopeDefault-26706.test.tsx;PermissionAdvancedFacets.adminScopeAnchor.test.tsx里两处期望值的更新。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PermissionAdvancedFacets.adminScopeDefault-26706.test.tsx(先 build@objectstack/spec),预期Tests 6 passed (6)。What changes
The delegated-admin scope facet shows the spec default for an unset key.
scopeSwitchOn(scope, key): the scope's own boolean when it sets one, and otherwise the spec default for that key fromADMIN_SCOPE_SWITCH_DEFAULTS. That is the valueAdminScopeSchemaparses the key to and the value the server enforces.setScope/setScopeDetail) and the business-unit gate are unchanged.useTenancyPosturegives (the@objectstack/spec/securityvalue entry adds its schema modules to the console bundle). They are typed against the spec'sAdminScope, and the new test reads every expected value from the installed spec, so a default the spec moves fails CI here.ui/packages/app-shell/src/views/metadata-admin/PermissionAdvancedFacets.tsx, the site the card expected. A grep ofui/for the two keys finds no other surface that draws them.Tests
PermissionAdvancedFacets.adminScopeDefault-26706.test.tsx, 6 cases: a CONTROL that the installed spec parses each unset switch key to a boolean default; an unset key draws the spec default (with a business unit, and while the switches wait for one); naming the business unit writes that key alone; a flip writes an explicit boolean and draws it, and flipping back keeps the key written; an explicit boolean draws as itself.PermissionAdvancedFacets.adminScopeAnchor.test.tsx: two expectations updated. Each asserted the boolean a single flip writes from the drawn state, and that value follows what the switch draws.scripts/ablation-replace.mjs: one switch'scheckedreading was put back to its pre-change expression (anchor 1 to 0, replacement 0 to 1, blobcabc1416e0fdtoc5282ce2ba31). Result:Tests 6 failed | 12 passed (18)across the two facet files, in the direction declared in advance (red). Restored: the blob equals HEAD andgit diff HEADis empty. The test imports the component by relative path, so the run readsrc/and nodist/leg applies. Run on3592965f; the merge ofmainsince then does not touch the facet or its tests.Acceptance notes
Verification
All readings below were taken on head
394213f2(a merge oforigin/mainatf1cd529d).Facet suites: 8 files, 113 tests, exit 0
Type check: @object-ui/app-shell type-check, exit 0
tsc --noEmit && tsc -p tsconfig.test.json.tsc -p tsconfig.test.json --listFilesOnlylists both changed test files, so the test-layer program compiles them.Derived gate families: 34 of 34 run; 33 exit 0, one test run timed out under load and passed on re-run
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths; change set from the merge base) derived 34 commands. Each ran with its exit code captured before any pipe.pnpm --dir ui exec vitest run scripts/: exit 1,Tests 9 failed | 5056 passed | 2 skipped (5067). All 9 failures areTest timed out in 15000msin whole-tree scans, on a shared box with the other gates running. The 6 files that timed out, re-run alone under the verify lock:Test Files 6 passed (6),Tests 522 passed (522), exit 0. The same command on3592965f, before the merge ofmain, exited 0. This diff does not touchui/scripts/.--ranreconciliation:34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED (a DERIVED zero — all 34 recorded an exit code and none of them is 3).Declared narrowing:
origin/mainmoved again after the merge. The derivation names 6 gate-input files that changed upstream since394213f2. CI runs those families on the merge ref of this PR.Not run locally, and owned by CI:
pnpm lint, thetest:repoproject, and the workspace type-check lanes.Generated by Claude Code