Skip to content

Views: a list view cannot be assigned to positions / roles; and a view created in the console 403s when customized in Studio #34908

Description

@os-bob

What (18.5.0, measured in a browser)

  1. No per-position views. A platform administrator can create list views in the console (title ▾ → 新建视图) and configure columns, sort and filters. Every published view is then visible to everyone who can read the object. A view cannot be targeted to a position, role or permission set (for example 「业务员看的客户视图」 and 「经理看的客户视图」). Business users can only 「另存为我的视图」 (personal views).
    The app's requirement says the views different positions see are configured by the administrator, with no vendor involved. The platform has no way to do that today.

  2. 403 when customizing a console-created view in Studio. In Studio, using 「定制」 on a view that was created through the console's 新建视图, and then adding a column, fails on save:

    403 'view/crm_account.yanzheng_yong_guonei_kehu_shitu' declares an override of 'com.steedos.blackcat.crm', which ships no view named …

    A view the deployment created itself cannot be edited in Studio.

Expected

  1. A view has an optional audience (positions, roles or permission sets), set by the administrator, and users see the views their audience includes.
  2. Studio edits a deployment-created view in place, or the console marks such a view as editable only in the console, instead of failing with an override error.

Activity

  1. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    First touch (R1198, 16:0xZ): p2 · domain:ui → pm:queue.

    Theme: zh-CN customers. This card holds two items. (1) Per-position or per-role view audiences are a feature request with no break, so p2. (2) A console-created view answering 403 when customized in Studio is a bug. If its cause is separate, the claiming dev splits (2) out on its own card at p1.

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 17, 2026
  3. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgUgZpbKcVYFC7iXgMu

    Split · 2026-11-19T17:05Z: item 2 (a console-created view answering 403 "declares an override of …, which ships no view named …" when customized in Studio) now lives on #35600 (p1, as the first touch 6953426292 directed). The 403 is the server's shipsNoSuchItemMessage (packages/metadata-protocol/src/protocol-packaged-base-refusal.ts:1142-1172) answering a Customize body that declares overrides of a base which does not ship that view; nothing on that path touches item 1.

    This card keeps item 1 only: a view gets an optional audience (positions, roles or permission sets) set by the administrator. That is a Feature that reaches the spec's view shape and a visibility boundary, so it owes a scope review before any dispatch. It stays pm:queue; area b1-U does not claim it.

  4. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH

    维护者速读

    • 问题:管理员在控制台新建的列表视图,发布后凡是能读这个对象的人都看得见;管理员没法在界面上指定「只给业务员看」「只给经理看」。今天有一家中文客户部署卡在这里,此前一个合同管理应用也提过同样的需求(一个对象上十一个视图、四类人)。
    • 选项:A 在视图上直接勾选岗位或角色,等于平台另造第二套「谁能看」规则,约三到四个 PR,还要改一份已定的架构决定;B 平台早已有、而且由服务器强制执行的「所需权限」受众门,只是控制台和设计器里没有填写入口,把入口补上,挑选时顺带显示哪些岗位会看到,约两个 PR;C 暂不做,只写一份操作说明。
    • 推荐 B:谁能看视图的规则已经定过、也已在服务器生效,缺的只是管理员能点的入口,不必再造第二套规则。
    • 不定会怎样:管理员要按岗位分视图,只能找开发商改源码,客户「管理员自己配、不找厂商」的目标落空。

    English analysis (for reviewers and agents)

    Card body and both comments (triage 6953426292, split by os-sales) re-read at 2026-11-23T10:28Z; corpus measured at origin/main 3cf6a44.

    Background

    The card now holds item 1 only: an administrator wants to give a published list view an audience (positions, roles or permission sets) so that only that audience sees it. Item 2, the Studio 403, moved to #35600 and is not discussed here. The triage and split comments call item 1 "a Feature that reaches the spec's view shape and a visibility boundary". The first half of that premise does not hold. The view shape already carries an audience key, and the server enforces it:

    What is actually missing is an authoring surface. An administrator has no control anywhere in the console or Studio for a list view's audience:

    • The view metadata form's "Navigation & sharing" section is described as "Where this view appears and who can see it." It offers only navigation and sharing.lockedBy (packages/spec/src/ui/view.form.ts:279-317). requiredPermissions has 0 occurrences in view.form.ts and in dashboard.form.ts. By contrast, app.form.ts:102 offers requiredPermissions as a string-tags row.
    • The console's 新建视图 dialog offers only personal | shared (ui/packages/app-shell/src/views/CreateViewDialog.tsx:1082, :1160). Its shared hint says "Shared views are seen by everyone who can see this list" (:1338), and the file has 0 occurrences of requiredPermissions.
    • The Studio list-view inspector (ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx) and the console view-config utilities (ui/packages/plugin-view/src/config/view-config-utils.ts) also have 0 occurrences.

    So today only source code (an *.view.ts file) can set the gate. That is exactly the 「不找厂商」 requirement the card reports as unmet.

    Governing text: ADR-0066 "The three-way separation (principle)", docs/adr/0066-unified-authorization-model.md:14-21: "a resource declares the capability it requires (a stable contract); the capability and its assignment are dynamic, admin-maintained records. A resource never bakes 'who' — only 'what is required'." Ruling of record 6095014058 on #22611 (letter A): "ListViewSchema and DashboardSchema each gain requiredPermissions with the same shape and semantics as the app, navigation-item, action … and record-block keys", "A creates no second audience mechanism". Spec docblock: packages/spec/src/ui/audience-required-permissions.ts:3-38 (all-of, no any-of form, enforced by the server). rg -n "never bakes" docs/adr/0066-unified-authorization-model.md → 1 hit (line 21).

    Protocol declaration

    • B changes no protocol. It adds no key, value or export. It adds a form row in packages/spec/src/ui/view.form.ts / dashboard.form.ts (authoring-form metadata, not schema) and console controls.
    • A changes protocol: a new authorable key on ListViewSchema plus a new read-gate arm. Because it bakes "who" into a resource, it also needs an amendment to ADR-0066, which is Tier H.
    • C changes nothing.

    Premises (each with its re-check)

    1. P1: the list view carries the audience key. Re-check: rg -n "requiredPermissions: z.array" packages/spec/src/ui/view.zod.ts → :3708.
    2. P2: the server enforces it. Re-check: rg -n -A2 '"requiredPermissions"' packages/spec/liveness/view.json → "status": "live".
    3. P3: no authoring form offers it for a view or a dashboard. Re-check: rg -c requiredPermissions packages/spec/src/ui/view.form.ts packages/spec/src/ui/dashboard.form.ts → no output (0 each). The app form does offer it: rg -n requiredPermissions packages/spec/src/ui/app.form.ts → :102.
    4. P4: no console or Studio control sets it. Re-check: rg -c requiredPermissions ui/packages/app-shell/src/views/CreateViewDialog.tsx ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx ui/packages/plugin-view/src → no output.
    5. P5: a position reaches a capability only through its permission sets. Re-check: rg -n "capability reaches a position" packages/spec/src/identity/position.zod.ts → :64.
    6. P6: no example app gates a list view. Re-check: rg -n requiredPermissions examples/*/src --include=*.view.ts. Expected: only the bulk-action defs at examples/app-showcase/src/ui/views/project.view.ts:144,152 and a comment at field-zoo.view.ts:71, and no list-level key.

    The concrete question

    The rule for who sees a list view is already ruled and enforced: a capability on the view, and positions holding it through permission sets. Should the platform add a second, direct "positions / roles on the view" mechanism, give administrators a control for the existing one, or leave it source-only for now?

    Options

    Option What is done What the customer sees Effort (lane · PRs · measured precedent)
    A Per-view principal audience New audience: { positions?, permissionSets? } key (or similar) on ListViewSchema and DashboardSchema. A new read-gate arm resolves the caller's positions and sets. Console picker. ADR-0066 amended. Admin ticks 「业务员」「经理」 directly on the view. spec + rest + ui + ADR (Tier H) · 3–4 PRs · about the size of the existing key: #22665 (+349/−5) + #22731 (+1267/−165) + an inspector control like #26977 (+804/−126), so roughly 2,400+ lines plus the ADR edit
    B Author the existing gate from the console The navigation_sharing section of view.form.ts (and dashboard.form.ts) gains a requiredPermissions row, same widget as app.form.ts:102. 新建视图 (shared scope) and the Studio list-view inspector gain a "Who sees this view" picker over known capabilities that shows, read-only, which positions hold each one. The shared hint is corrected. capabilities.mdx gains the administrator recipe. Admin picks 「客户视图·业务员」 (a capability granted to the 业务员 position's set) and sees "业务员 will see this view". Others no longer see it in the switcher, and opening it by URL is refused. spec + ui · 2 PRs · form rows: #20405 (+182/−6, 9 files, five rows including object requiredPermissions). Inspector control: #26977 (+804/−126, 13 files). Roughly 600–1,000 lines.
    C Defer, document only capabilities.mdx gains a recipe saying "set requiredPermissions on the view in source". Nothing changes in the console. The administrator still asks the vendor. docs · 1 PR · no precedent measured, tens of lines

    What each option means for the business

    • A: like giving every filing cabinet its own guest list, beside the badge system the building already runs.
    • B: the building already checks badges at this door. B gives the receptionist the screen to choose which badge opens it.
    • C: the door can be locked, but only the locksmith can set it.

    Four axes, per option (business stance)

    ① Long-term soundness (weight ≥50%). Two-year end state: one audience vocabulary across every entry the platform serves (app, navigation item, action, record block, list view, dashboard). A resource names the capability it needs, administrators decide who holds it in Setup, and every authoring surface, console included, can pick it. This is the Salesforce custom-permission model: a custom permission is assigned through permission sets and permission set groups and required by apps, tabs and Lightning page components. It is also the one the ADR-0066 three-way separation rules.

    • Salesforce list views can also be shared directly with public groups and roles. That is a second, principal-based mechanism, and ADR-0066 (:21) and ruling 6095014058 ("creates no second audience mechanism") explicitly declined it here.
    • B completes the one mechanism and adds no special case. It shrinks contract growth to zero: the key is already paid for (declared, enforced, live).
    • A creates a second audience mechanism on two entry types only. A list view would then answer "who" two ways (capability and principals), while apps, actions and blocks answer it one way. Every reader of view audiences, and every future entry type, then has to choose between the two. It also contradicts governing text, so it cannot be taken without an ADR-0066 amendment.
    • C leaves an enforced capability unreachable from the product's own administration surface. That is a durable gap, not a contract problem.

    ② Actual business need (measured pull).

    ③ AI-error resistance (who sees what when it goes wrong).

    • B's console picker is a closed list of capabilities the environment knows, so an administrator, or an AI driving the console, cannot type a name that matches nothing. Source authoring keeps today's lint warning (packages/lint/src/validate-capability-references.ts:45).
    • When the gate is wrong, the failure is loud and narrow. A non-holder is refused by name with 403 PERMISSION_DENIED (audience-required-permissions.ts:27-31). The one quiet failure is already recorded: a misspelled name hides the view from everyone except object editors (liveness/view.json:178). The closed picker removes that case from the console path.
    • A gives an AI two plausible spellings for the same intent (capability or principal list), so it will pick the wrong one on some entries. A position name that resolves to nothing would hide the view from that audience with no message: a silent loss.
    • C keeps AI-authored source unchanged and moves the error to vendor hand-edits.

    ④ Startup stage, no scope creep.

    • B declares nothing new and adds no gate. It wires an authoring surface to a key the platform already maintains, which finishes a declared capability rather than expanding one.
    • A adds a permanent key on two schemas, a second resolver arm, and an ADR amendment. Each of those is a lasting obligation.
    • C costs nothing now, but leaves a shipped, enforced capability that administrators cannot reach.

    os-decision-facets

    Recommendation: B

    • B completes the one audience mechanism the platform already rules and enforces, and adds no key. It is the only option that meets the measured administrator-set need without a second "who" vocabulary.
    • Not A: it creates a second audience mechanism the governing text forbids, at about 2.4× B's effort. ① already separates A and B, so the ≥3× rule does not apply.
    • Not C: both measured deployments stay blocked on the vendor, for a gap that costs about two PRs to close.

    Self-check: 只看①选 B;②③④ 是否翻转:否。

    Confidence gaps (stated, not grounds for another option):

    • Not measured: whether the console can already read the environment's capability catalog (registry capability items per packages/spec/src/security/capabilities.ts:13-14, plus the free systemPermissions strings in served permission sets) and the position → permission-set map for the read-only "who will see it" preview. If neither read is served to the console, B's UI PR also needs one read, which is the third-tier premise below.
    • Not measured: whether Studio's raw-JSON editor (if any) already lets an administrator type the key. That would lessen C's harm but would not meet 「不找厂商」 for a business administrator.
    • Not measured: the 403 behaviour a gated view shows its own creator when they do not hold the capability. The read gate exempts callers who may edit the object (audience-required-permissions.ts:31-34), so an administrator should keep seeing it.

    After the ruling (execution, so the maintainer rules direction only)

    Third-tier premise the dispatch order carries:

    • (a) P1–P4 still hold.
    • (b) A console write body carrying requiredPermissions on a shared view is kept by the save door (the shape claim at view.zod.ts:3701-3707). The dev proves this with one round-trip test before building UI.
    • ⛔ If (b) fails (the door strips or refuses it), the dev reports a fork. The dev does not widen the save door, and does not fall back to C or to a console-only flag.

    Steps:

    1. spec PR (domain:spec): add a requiredPermissions row to the navigation_sharing section of packages/spec/src/ui/view.form.ts, with help text taken from AUDIENCE_REQUIRED_PERMISSIONS_DESCRIPTION, and the matching row in dashboard.form.ts. Add the i18n catalog keys and the zh-CN label 「所需权限」 in the view section of ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts (the label already exists in five other sections, e.g. :139). The spec release lands before the UI consumes it (the installation-surface ordering of ruling 6095014058).
    2. ui PR (domain:ui):
      • Add an optional "Who sees this view" picker to 新建视图 for the shared scope and to the Studio list-view inspector.
      • The picker offers only capabilities the environment knows (closed list) and shows, read-only, the positions that hold each one.
      • The view surface never writes permission sets or positions. Granting stays in Setup.
      • Correct the shared hint at CreateViewDialog.tsx:1338 so it no longer claims everyone sees a gated view.
    3. docs (same ui PR or the spec PR): add the administrator recipe to content/docs/permissions/capabilities.mdx: create the capability in a permission set, attach the set to the positions, pick it on the view.
    4. No new gate, no new key, no any-of form (ruled out by 6095014058, letter B not taken).

    Card state on ruling: needs-user-decision → pm:queue. The body's item 1 is rewritten to "author the existing list-view / dashboard audience gate from the console and Studio". domain:ui stays and domain:spec is added for the form row. priority:p2 is unchanged.

    Related

  5. added
    needs-user-decision
    and removed
    pm:queue
    on Nov 23, 2026
  6. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#7 · os-alice · session_011y7As7yb6MicBqUUEzgjGB

    Ruling: #34908 · letter B · maintainer 「B 给已有权限门补入口」 2026-11-23T14:15Z

    The maintainer (os-alice) picked B on the project decision card at 2026-11-23T12:03:56Z, answering 「列表视图按岗位可见,选哪种做法?」 against the three options of the analysis in 7098042572. The tapped option reads, verbatim: 「B 给已有权限门补入口 — 控制台和设计器加「谁能看此视图」选择,并显示哪些岗位会看到;不改协议,约2个PR。」

    What is ruled (direction only): a list view's (and a dashboard's) audience stays the existing, server-enforced requiredPermissions gate. The platform adds administrator authoring surfaces for it in the console and Studio. It does not add a second, principal-based audience key (A not taken), and it does not defer to a source-only recipe (C not taken).

    Execution: exactly as the "After the ruling" section of 7098042572 states, including its third-tier premise (a)/(b) and the ⛔ fork rule if the save door strips or refuses requiredPermissions:

    1. spec PR (domain:spec): requiredPermissions row in the navigation_sharing section of view.form.ts, matching row in dashboard.form.ts, i18n keys and the zh-CN label 「所需权限」.
    2. ui PR (domain:ui): optional "Who sees this view" picker in 新建视图 (shared scope) and the Studio list-view inspector, closed list of known capabilities, read-only preview of the positions holding each; the shared hint at CreateViewDialog.tsx corrected. Granting stays in Setup.
    3. docs: the administrator recipe in content/docs/permissions/capabilities.mdx.
    4. No new key, no new gate, no any-of form.

    Card state: needs-user-decision → pm:queue; domain:spec added beside domain:ui; priority:p2 and area:build unchanged. Item 1 of the body reads, from this ruling on: "author the existing list-view / dashboard audience gate from the console and Studio". Contract-review tier carries to dispatch.

  7. added
    domain:spec
    pm:queue
    and removed
    needs-user-decision
    on Nov 23, 2026
  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibxDBbvf7dEeutsepbm
    Account: os-tesla
    Branch: claude/project-thread-16f1ht
    Worktree: objectstack-issue-34908
    Domain: domain:spec, domain:ui
    Seat: repo:objectstack#3
    File surface: packages/spec/src/ui/view.form.ts, packages/spec/src/ui/dashboard.form.ts (form rows), ui/packages/app-shell/** (CreateViewDialog, ObjectListViewInspector), ui/packages/i18n/**, content/docs/permissions/** (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none (form rows only)
    Responsibility: n/a — not a defect card (Feature: the ruled entry point onto the live requiredPermissions gate)
    Thread-read: 7103739693
    Premise: holds (item 1; item 2 was split to #35600)
    Serial constraints cleared: overlap-check.mjs runs on the thread's first push (branch not yet pushed); no in-flight claim on these files named by any seat

    • Area: o3-build (dispatched by the seat as a card thread).
    • Prior rulings read: ruling 7103739693 verbatim 「B 给已有权限门补入口 — 控制台和设计器加「谁能看此视图」选择,并显示哪些岗位会看到;不改协议,约2个PR。」, execution 7098042572.
  9. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  10. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-tesla · session_01L9qibxDBbvf7dEeutsepbm
    os-dev-report

    {
     "issue": 34908,
     "status": "done",
     "branch": "claude/project-thread-16f1ht",
     "prs": [
      {
       "pr": "https://github.com/objectstack-ai/objectstack/pull/37839",
       "head": "7ef98ab887129f0f0a27f06e359fd8a0f3cbb986",
       "state": "merged 2026-11-27T09:12Z"
      },
      {
       "pr": "https://github.com/objectstack-ai/objectstack/pull/37906",
       "head": "a7ed93d6324cf6798967a8b0feffc81cd211d004",
       "state": "open, ready for review"
      }
     ],
     "session": "session_01L9qibxDBbvf7dEeutsepbm",
     "premise_still_valid": true,
     "gates": {
      "pr_37839_head_7ef98ab887": "dispatch-gates --ran: 93 derived, 93 run, 0 NOT-MEASURED, 0 UNRUN; 93/93 exit 0",
      "pr_37906_head_a7ed93d632": "dispatch-gates --ran: 114 derived, 114 run, 0 NOT-MEASURED, 0 UNRUN; 114/114 exit 0",
      "pr_37906_extra": [
       "ui viewAudience-34908.test.tsx 19/19",
       "ui inPlaceViewCreate-35553 + SchemaForm.widgetLabelling + viewAudience 3 files 126/126",
       "app-shell tsc --noEmit exit 0",
       "app-shell tsc -p tsconfig.test.json exit 0"
      ],
      "ci": "not cited here: read the PR check-runs at the head above"
     },
     "line_budget": {
      "ruling_estimate": "600-1000 lines, 2 PRs",
      "pr_37839": "+432/-22, 26 files",
      "pr_37906": "+1123/-40, 49 files (+1105/-22 outside generated bundles)"
     },
     "files_changed": {
      "pr_37906": 49,
      "pr_37906_non_generated": 31
     },
     "deviations": [
      "The view and dashboard hints restate AUDIENCE_REQUIRED_PERMISSIONS_DESCRIPTION in administrator wording, not verbatim (#36816 business wording).",
      "The ruling's Studio inspector file studio-design/ObjectListViewInspector.tsx is gone from main; the picker lands in metadata-admin/inspectors/ViewVariantInspector.tsx through the form row.",
      "PR 1 round 1: check:dual-build-cjs-loads NOT MEASURED (needs a full build); measured in later rounds.",
      "PR 2 body ends with the reminder-supplied footer ('Generated with Claude Code' + session URL line), not os-dev's session-URL footer form; a seat body patch can swap it.",
      "Studio ref-multi:capability keeps the ref-multi family's typed-name box when no catalog is fed or the read fails; the create card has no free-text fallback.",
      "DashboardDefaultInspector now passes a WidgetContext with conditionScopeForMetadataType('dashboard') ('none'); the dashboard form declares no condition row."
     ],
     "mcp_calls": "4 — get_session, issue_read x2, pull_request_read (reads only); subscribe_pr_activity on #37906 (harness subscription, not a GitHub write)",
     "api_writes": "4 relay writes — pr_create #37839, comments 7212725641 and 7213626772 on #37839, pr_create #37906; this report comment is the 5th",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": []
    }
  11. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-tesla · session_01L9qibxDBbvf7dEeutsepbm
    2026-11-27T13:33Z — close-out for #34908 (ruling 7103739693, letter B): both PRs merged, pm:dispatched comes off with this comment.

  12. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddomain:specdomain:uipriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions