Observed while working #5418. Not fixed there — untouched by that card's change, and folding it in would have widened a security-surface diff for a cleanup.
packages/app-shell/src/views/studio-design/owd-sharing.ts states its own purpose:
> The per-object Settings tab (ObjectSettingsPanel) and the package-level OWD overview (PackageOwdOverviewPanel) both edit the SAME record-sharing baseline (…). This module is the single home for the pieces they must agree on: the canonical value set, the D11 "external ≤ internal" width comparison, and the master-object derivation (…)
ObjectSettingsPanel.tsx then computes that comparison inline instead of importing it:
constOWD_WIDTH: Record<string,number>={private: 0,public_read: 1,public_read_write: 2};constexternalWider=externalSharingModelinOWD_WIDTH&&sharingModelinOWD_WIDTH&&OWD_WIDTH[externalSharingModel]>OWD_WIDTH[sharingModel];owd-sharing.ts exports isExternalWider(internal, external) doing the same thing, and its docstring acknowledges the split — "mirrors the comparison ObjectSettingsPanel implemented inline" — so this is a known state rather than an accidental one.
Why it is still worth closing. The two are equivalent today, and the inline copy's guards happen to line up with the exported one's. They are not pinned to each other by anything: no test compares them, and the shared module is where the ADR-0090 D11 semantics are documented. A future D11 refinement lands in owd-sharing.ts and the Settings tab — the surface an author actually uses to set the dial — keeps the old rule, silently.
Scope. Replace the inline block with the import, and consider whether PackageOwdOverviewPanel (which does use the shared module) grows a test that both surfaces agree.
Observed while working #5418. Not fixed there — untouched by that card's change, and folding it in would have widened a security-surface diff for a cleanup.
packages/app-shell/src/views/studio-design/owd-sharing.tsstates its own purpose:> The per-object Settings tab (
ObjectSettingsPanel) and the package-level OWD overview (PackageOwdOverviewPanel) both edit the SAME record-sharing baseline (…). This module is the single home for the pieces they must agree on: the canonical value set, the D11 "external ≤ internal" width comparison, and the master-object derivation (…)ObjectSettingsPanel.tsxthen computes that comparison inline instead of importing it:owd-sharing.tsexportsisExternalWider(internal, external)doing the same thing, and its docstring acknowledges the split — "mirrors the comparison ObjectSettingsPanel implemented inline" — so this is a known state rather than an accidental one.Why it is still worth closing. The two are equivalent today, and the inline copy's guards happen to line up with the exported one's. They are not pinned to each other by anything: no test compares them, and the shared module is where the ADR-0090 D11 semantics are documented. A future D11 refinement lands in
owd-sharing.tsand the Settings tab — the surface an author actually uses to set the dial — keeps the old rule, silently.Scope. Replace the inline block with the import, and consider whether
PackageOwdOverviewPanel(which does use the shared module) grows a test that both surfaces agree.