From 4353b8d3ebebf5564b7c9fd05bd9543aaef56cee Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Aug 2026 00:33:56 +0000 Subject: [PATCH] docs(pages): fix the component visibility example to read a key EvalUser has MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `content/docs/build/interface/pages.mdx:81` gated the sample chart component with `os.user.profile == 'sales_manager'`. `os.user` is bound by `buildScope` (`packages/formula/src/stdlib.ts`) to the canonical `EvalUser`, which is exactly `{ id, name?, email?, positions, isPlatformAdmin?, organizationId? }` — there is no `profile` key, so the published example could never evaluate to what it demonstrates. Same defect class as the Tier 1 half of #109. `positions` is the only membership field on `EvalUser` (ADR-0068 D1, renamed from `roles` by ADR-0090 D3), and `sales_manager` is verbatim the first entry under "Good position names" in `packages/spec/src/identity/position.zod.ts`. The corpus already spells this predicate twice — `reference/cel.mdx:124` (`'manager' in os.user.positions`, same `os.user` root) and `build/interface/apps.mdx:110` (`'org_admin' in current_user.positions`) — so the corrected line matches an established spelling rather than inventing one. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Yaqu7kmKZM3tRPd9Y4xivo --- content/docs/build/interface/pages.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/build/interface/pages.mdx b/content/docs/build/interface/pages.mdx index f800f3a..aa0deeb 100644 --- a/content/docs/build/interface/pages.mdx +++ b/content/docs/build/interface/pages.mdx @@ -78,7 +78,7 @@ Components are the building blocks inside regions: properties: { chartType: 'line', dataset: 'sales', dimensions: ['close_month'], values: ['revenue'] }, events: { onClick: "navigate_to('opportunity_detail', { id: $event.id })" }, - visibility: "os.user.profile == 'sales_manager'", + visibility: "'sales_manager' in os.user.positions", } ```