Uh oh!
There was an error while loading. Please reload this page.
feat(studio-access): package-level OWD overview — audit & batch-edit sharingModel (#2505) - #2508
Merged
Merged
Conversation
…sharingModel (#2505) Add a package-scoped "Record Sharing Baseline (OWD)" panel to the Studio Access pillar, a sibling surface next to the permission-set rail. It lists every object the package owns (published ∪ pending drafts) with its internal `sharingModel` and external `externalSharingModel`, so an author can audit the package's record baseline at a glance instead of visiting each object's Settings page one at a time. - New `PackageOwdOverviewPanel`: object × internal × external table with inline selects reusing the canonical four OWD values and the option labels/help copy from ObjectSettingsPanel. Save writes one package-scoped metadata draft per changed object (identical to the per-object Settings write, N at once); publish flows through the unchanged security-domain gate. - `controlled_by_parent` rows show the master link (read-only) instead of an external dial; row-level `external ≤ internal` validation (ADR-0090 D11) is surfaced inline and blocks Save. - New shared `owd-sharing.ts`: canonical `OWD_MODELS`, the `OWD_WIDTH` axis, `isExternalWider` (D11 comparison), and `deriveMasterObject`. - Access pillar hosts it via a pinned rail entry + the existing `?surface=` deep-link plumbing (`owd:overview`); the read-only OWD badge in the permission matrix now deep-links here, scrolled to the object. - Read-only packages render the table non-editable (badges only). - EN/ZH i18n; ADR-0054 testability proofs (list render, edit→draft, validation block, controlled_by_parent, read-only, deep-link) + unit tests for the shared helpers. 16 new tests; full studio-design + permission-matrix suites green (86). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014wYveoZSpRweBkvXMY5Gg6
The latest updates on your projects. Learn more about Vercel for GitHub. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014wYveoZSpRweBkvXMY5Gg6
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 15, 2026 08:56
Uh oh!
There was an error while loading. Please reload this page.
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.
Closes#2505.
Problem
A package author can only inspect and edit an object's record-sharing baseline (OWD —
sharingModel/externalSharingModel) one object at a time, via Data → object → Settings. A package with 20 objects requires opening 20 settings pages to audit its baseline posture, so in practice nobody does — and "which of my objects are org-wide writable?" can't be answered at a glance (ADR-0090 D1's silent-widening failure class is invisible object-by-object).What this adds
A package-scoped "Record Sharing Baseline (OWD)" panel in the Studio Access pillar, as a sibling surface next to the permission-set rail (not inside the permission matrix):
sharingModel×externalSharingModelcovering every object the package owns (published ∪ pending drafts — the same merge the pillars do).private | public_read | public_read_write | controlled_by_parent), reusing the option labels / help copy fromObjectSettingsPanel.controlled_by_parentrows show the master link (read-only) instead of an external dial, mirroring the per-object settings behavior.external ≤ internalvalidation (ADR-0090 D11) surfaced inline; it blocks Save.?surface=plumbing (owd:overview); the read-only OWD badge inPermissionMatrixEditornow links here, scrolled to the object.This stays within one ownership boundary (every row's owner is the package author) — it is an aggregation of N per-object editing entry points, not a merge of OWD into the per-principal permission-set matrix.
Changes
views/studio-design/owd-sharing.ts(new) — sharedOWD_MODELS,OWD_WIDTHaxis,isExternalWider(D11),deriveMasterObject.views/studio-design/PackageOwdOverviewPanel.tsx(new) — the overview surface.views/studio-design/StudioDesignSurface.tsx—AccessPillarhosts the panel via a pinned rail entry +?surface=owd:overviewdeep-link; passesonOpenOwdto the matrix.views/metadata-admin/PermissionMatrixEditor.tsx— optionalonOpenOwd; the OWD badge becomes a link when provided (plain chip otherwise, so environment-scope / metadata-admin usage is unchanged).views/metadata-admin/i18n.ts— EN + ZH strings.Non-goals (per the issue)
enable.*capability switches, and no changes to enforcement, lint, or the publish pipeline.Verification
PackageOwdOverviewPanel.test.tsx): list render, edit→per-object draft (withmode: 'draft'+packageId, unset drops the key),external > internalblocks Save inline,controlled_by_parentshows the master and no external dial, read-only badges only, deep-link highlight.owd-sharing.test.ts).tsc --noEmitclean (turbo, 29/29). ESLint 0 errors. 16 new tests; fullstudio-design+PermissionMatrixEditorsuites green (86 passed).References
docs/design/permission-model.md🤖 Generated with Claude Code
https://claude.ai/code/session_014wYveoZSpRweBkvXMY5Gg6
Generated by Claude Code