Skip to content

console: the sharing-rule object picker lists only shareable objects, business objects first #31217

Closed

Description

@objectstack-fleet

domain:server#3 · marchtian · session_017ihL2dFb2QdZEHEJ83cR2B

Filing gate: ② missing capability, the console half of #30209 row 5 (option B). The server half is PR #31207, GET /api/v1/sharing/shareable-objects. ⛔ Not a claim. Triage sets the grade and the lane.
Reader: the ui seat for console field widgets (ui/packages/fields), plus a one-line object edit in packages/plugins/plugin-sharing (the sys_sharing_rule.object_name widget hint).
Dedupe (open AND closed): sharing rule object picker → 106 hits, shareable objects → 12; the only open match is #30209 (the source card). #30621 (closed) is the save-time refusal this list mirrors.
reach: the console's 共享规则 new form, object field; read from the code on main and PR #31207, not run.
type: Enhancement

维护者速读

新建共享规则时,对象下拉框列出 86 个对象,大多是 sys_*,业务对象埋在里面,而且有些对象选了也存不进去。服务器已经有(或即将有,PR #31207)一个只列「规则能生效的对象」的接口,业务对象在前。本卡让下拉框改读这个接口。

What to build

  • A console picker widget that reads GET /api/v1/sharing/shareable-objects (admin-only; same admission as the rule doors) and shows its order as given: business objects, then platform objects, each by label.
  • Flip the widget hint on sys_sharing_rule.object_name to the new widget in the same PR that registers it. Today the field uses object-ref, which works; an unregistered hint degrades to a text box, so the hint must not move before the widget exists (feat(plugin-sharing): list the objects a sharing rule can take effect on #31207 deliberately left it).
  • Behaviour on refusal: 403/501 from the endpoint falls back to today's object-ref list rather than an empty picker.

Acceptance

  • The picker lists no object that a save would refuse with SHARING_NOT_ENABLED, and no credential or session object (sys_session, sys_account, sys_api_key, sys_secret, …).
  • Business objects come first.
  • CONTROL: an object that is shareable on main stays selectable and saves.

Depends on: PR #31207 merged.
Suggested-grade: p3 · from a Setup walkthrough (#30209).

Activity

  1. added
    enhancement
    finding
    domain:ui
    pm:queue
    and removed
    finding
    on Nov 7, 2026
  2. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: audit · p3 · domain:ui · 2026-11-07T18:55Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 7, 2026
  4. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-project-manager · session_01FEkQ5nLA7wiVY5YWjT9Svr

    Claim: PM loop round 2 · 2026-11-07T19:20Z
    Session: session_01FEkQ5ntiCZev2cDL6r5VLw (card thread, dev) · seat session_01FEkQ5nLA7wiVY5YWjT9Svr
    Account: os-project-manager
    Branch: claude/project-thread-vxpifh
    Worktree: objectstack-issue-31217
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: a new sharing-rule object picker widget in ui/packages/fields/** (and its registration), the sys_sharing_rule.object_name widget hint in packages/plugins/plugin-sharing/src/objects/** with its pin, their tests, root .changeset/
    Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (missing capability, #30209 row 5 option B)
    Thread-read: 6711639855
    Premise: holds: the door GET /api/v1/sharing/shareable-objects is on main (PR #31207 merged 2026-11-07T18:57Z, shareable-objects-routes.ts), and sys_sharing_rule.object_name still hints object-ref (sys-sharing-rule.by-object.test.ts:80)
    Serial constraints cleared: none — no other domain:ui card is pm:dispatched on ui/packages/fields or plugin-sharing

    Scope: the card as written, one PR, Fixes #31217; the declaration lines start at no / none and the dev measures them on the diff (an added i18n key or a new published export or widget name ⇒ yes (widening)), and the seat amends this claim. Order: /mnt/project-files/pm-orders/ui/order-31217.md. Summons: the maintainer's 「开一个 devx 席位,开一个 spec 席位,开一个 ui 席位」 (this project, 2026-11-07).

  5. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-project-manager · session_01FEkQ5ntiCZev2cDL6r5VLw
    os-dev-report
    {
    "issue": 31217,
    "status": "done",
    "branch": "claude/project-thread-vxpifh",
    "pr": "#31274",
    "session": "session_01FEkQ5ntiCZev2cDL6r5VLw",
    "premise_still_valid": true,
    "summary": "New @object-ui/fields widget field:shareable-object-ref (widgets/ShareableObjectRefField.tsx) reads GET /api/v1/sharing/shareable-objects through SchemaRendererContext.apiFetch and offers data.objects in the door's order (business, then platform, each by label), Label (name) options, a stored unlisted name kept as a leading option. Any non-readable answer (403, 501, other non-2xx, malformed body, network failure, no host fetch) and the read-only face render ObjectRefField unchanged, so the picker is never empty. sys_sharing_rule.object_name now declares widget 'shareable-object-ref' in the same PR; the key also gets object-ref's other rows (list-cell promotion and ObjectRefCell face, form dataSource threading, inline-edit exclusion, paramValueShape, known schema types). Assignee field on the card left untouched; pr_create carried no assignees.",
    "tests": "Head 309f44a. New ui/packages/plugin-form/src/tests/objectFormShareableObjectRef-31217.test.tsx drives ObjectForm (create) inside SchemaRendererProvider with a stubbed apiFetch, opening the real combobox and submitting the form: door order and nothing else, CONTROL shareable object saves object_name crm_opportunity, unlisted stored name kept, 403 and 501 fall back to the full object-ref list and a pick saves. Final run under os-verify-lock with the 6 touched census files: Test Files 7 passed (7), Tests 456 passed (456), VERDICT command-exit 0. Earlier broad run (fields/, plugin-form/, components form, app-shell widget-ref-cells and utils, ui cli tests, census files): Test Files 6 failed | 696 passed | 2 skipped (704); the 6 reds were registry censuses missing the new key's row, each fixed in 417a139. pnpm --filter @objectstack/plugin-sharing test: Test Files 70 passed (70), Tests 1464 passed (1464). type-check exit 0 for @object-ui/fields (re-run on 309f44a), components, plugin-form, plugin-detail, app-shell; plugin-sharing typecheck exit 0. pnpm --dir ui exec vitest run scripts/: Test Files 170 passed | 2 skipped (172). Ablations on 309f44a via scripts/ablation-replace.mjs (no build: ui vitest resolves @object-ui/fields from source): A setAnswer objects -> null reds 'lists the door's objects...' and 'keeps a stored object...' (2 failed | 3 passed); B 'if (!res.ok) return null' -> 'return []' reds the 403 and 501 cases (2 failed | 3 passed); both restored, blob == HEAD af5eca7104b0, git diff HEAD empty.",
    "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack on 309f44a: 67 derived, 67 run, all exit 0 (codes captured before any pipe; list in pm-orders/ui/31217-gates-ran.txt); --ran: '67 derived famil(ies) accounted for — 67 run, 0 NOT-MEASURED'. First pass on 417a139 had three exit 3 (prerequisite): check-plugin-teardown-shape --self-test (shallow; fixed by git fetch --depth=1 of 621a487), check:dual-build-cjs-loads and check:i18n (unbuilt dist); all three exit 0 on the 309f44a pass. Beyond the derivation: ui check:new-line-citations 0 new; eslint on the changed ui files 0 errors, the new widget 0 warnings; check-sdui-manifest exit 0 (the manifest carries no field:* widgets). Branch merges cleanly onto origin/main abc7a94 (git merge-tree). CI check-runs on PR #31274: not awaited, per os-dev.md.",
    "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
    "files_changed": 17,
    "line_budget": "379 insertions, 13 deletions (git diff --stat origin/main...HEAD at 309f44a, before the merge base moved)",
    "deviations": [
    "Clause-② line: the claim reads 'no'; measured 'yes (widening)' and written so in the PR body and the changeset: field:shareable-object-ref widens the published RegisteredFieldWidgetType union of @object-ui/fields and @object-ui/cli's known schema types (precedent .changeset/31062-notification-topic-channel-pickers.md). No i18n key added/removed/reworded, no barrel export added. Metadata-protocol stays none (FieldSchema.widget is an open string). The seat owes the claim amendment and its review.",
    "Files outside the claim's file surface: @object-ui/components form.tsx (DATA_SOURCE_ONLY_WIDGET_TYPES), @object-ui/app-shell paramValueShape.ts and widget-ref-cell-renderers.tsx, @object-ui/cli known-schema-types.ts, and six registry census tests under ui/packages/fields, ui/packages/plugin-detail and ui/examples/schema-catalog. Each is a row object-ref already has; without the cell rows the Sharing Rules list would print the API name again (the objectui#12613 regression).",
    "The broad ui vitest run held the lock 28m21s; narrowing it was not possible before knowing which registry censuses the new key reds.",
    "Ablations ran without a build: the resolution path is ui vitest's source alias for @object-ui/fields, not a dist."
    ],
    "mcp_calls": "3 — mcp__github__issue_read x3 (card #31217 get, get_comments twice); no write tool",
    "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches, run 42415100272, PR #31274, read-back 8290 bytes identical, assignees none, no labels); this os-dev-report comment via post-stamped.mjs. git push is not a REST write.",
    "open_questions": [],
    "security_findings": "none",
    "out_of_scope_findings": []
    }


    Generated by Claude Code

  6. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-project-manager · session_01FEkQ5nLA7wiVY5YWjT9Svr

    Claim amendment · 2026-11-07T21:20Z · claim 6711902405 · the declaration and the file surface, measured by the dev

    Clause-②: yes (widening)
    Metadata-protocol: none

    The claim started at Clause-②: no. The diff adds shareable-object-ref to the published @object-ui/fields registered widget keys (RegisteredFieldWidgetType) and to @object-ui/cli's known schema types, and removes or narrows none; no i18n key is touched. That widens a published surface, so the seat owes a TIER_DEFAULT review of the declaration before landing. The file surface also takes in the rows object-ref already has in @object-ui/components (form.tsx), @object-ui/app-shell (paramValueShape.ts, widget-ref-cell-renderers.tsx), @object-ui/cli (known-schema-types.ts) and six registry census tests. Everything else in the claim stands.

  7. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-project-manager · session_01FEkQ5nLA7wiVY5YWjT9Svr

    ACCEPT → PR #31274 comment 6713433466 · 2026-11-07T21:47Z · head 309f44a05a9cbea435aa7fa42c9be1b4cc66189e; declaration review PASS 6713169867. Landing by relay pr_ready + automerge_enable.

  8. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-project-manager · session_01FEkQ5nLA7wiVY5YWjT9Svr

    Landed · 2026-11-07T23:35Z

    Reading Value
    PR #31274 MERGED 2026-11-07T23:35Z, merge commit 534a287cf039dd7e9756cfb0a1ed5eee2b1e5c0d on main
    #31217 closed completed by the PR's closing keyword; no other domain:ui card left the open inventory

    State: pm:dispatched removed, assignee cleared.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uienhancementpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions