Skip to content

feat(plugin-sharing): Setup share rows name their object (Object column, object-ref face) - #39725

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-39439-setup-admin-polish-4
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-39439-setup-admin-polish-4

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Part of #39439 (PR 4 of the card: item 9a only, the Object column on the share rows. Item 9b, naming the rule, is split to its own Feature card; item 13 goes to the cloud route; neither is in this PR.)

repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员在「系统设置 → 共享明细」的「全部」视图里,「记录」列后面多出一列「对象」,显示对象的图标和中文名(例如「联系人」),「按对象」视图也以这一列开头;其余视图不变。
  • 为什么做:新公司演练(后台打磨卡)发现共享明细的一行只写着人名,看不出是哪个对象的记录;这推翻了此前一次席位决定里「列表不显示对象列」的那条测试钉子,改成「显示就必须用对象名称的样式」,按席位决定的惯例落地,你有否决窗口。
  • 出错会怎样:最坏情况是这一列显示成对象的英文接口名而不是中文名,只影响显示,不改任何存储或权限,可直接撤回本改动。
  • 要你做什么:无(如不同意推翻那条钉子,在否决窗口内说一声即可)。

What changes

Item 9a, by a declared face (decision-thread reading 7413481800, claim amendment 6 = 7413531619; seat ruling 6282390889 on #24701 for the same object and question).

  • sys_record_share.object_name declares widget: 'object-ref', the key sys_assignment_rule, sys_webhook and sys_notification already carry on their object-name text fields. A display hint only: the column stays a required text column, the data API stays read-only (get, list), no form draws the picker as an editor.
  • all_shares (what Setup's nav_record_shares opens) shows object_name right after record_id; by_object shows it first, the shape sys_sharing_rule.by_object ships. The other four views, every sort, nameField and highlightFields are unchanged. No view groups on the column.
  • The two comments that explained the column's absence are rewritten to say why it is now shown and why grouping stays out.
  • No ui/**, spec, stored column or locale-key edit: the column label 对象 is already in plugin-sharing's generated zh-CN object translations.

Reversed pin, under the veto window. sharing-pointer-pairs.test.ts "no list view shows a referenceVia sibling beside its id half" (set by the #24611 seat call) went red by design and is rewritten to the rule it stood for: a type half shown as a column declares the object-label face (widget: 'object-ref'). A companion case pins the set it judges as non-empty (exactly all_shares and by_object), so the rule cannot pass on nothing. Kept as controls, untouched and green: no sys_share_link view shows its type half (now its own case); "no list view groups on a type half"; sys-sharing-rule.by-object.test.ts "no list view groups on a field that stores an object API name".

Live measurement (before the tests were written)

Showcase on a fresh boot (objectstack dev --fresh), console from the current ui/ source through its Vite dev server proxied to that backend, zh-CN, signed in as the seeded admin. Served metadata (GET /api/v1/meta/object/sys_record_share) carried widget: 'object-ref' on object_name and the new column lists.

What the screens showed
  • Setup → 共享明细 → 全部: header row 记录 · 对象 · 接收方类型 · 接收方 · 访问级别 · 来源 · 创建时间. The one seeded row: Record cell Nora West with the contact icon (the target still resolves), Object cell the object icon and 联系人; the stored value is showcase_contact, never drawn.
  • 按对象: 对象 first, 联系人, then Nora West.
  • The record page's Details tab draws no separate Object row: the Record row is the pointer card headed 联系人 over Nora West, as before this change.

Tests

  • New src/objects/sys-record-share.object-column-39439.test.ts: the widget and the column's stored shape; all_shares and by_object column orders; only those two views show it; CONTROL: sorts, nameField, highlightFields unchanged and no view groups.
  • src/sharing-pointer-pairs.test.ts: the rewritten rule, its non-empty companion, the sys_share_link control.
Red before / green after, ablation, package runs
Leg A: BASE 64188fb414 object file, new tests            -> 5 failed | 18 passed (red, as intended)
  x object_name declares the object-ref widget and stays a required text column
  x all_shares shows object_name right after record_id
  x by_object shows object_name first, as sys_sharing_rule.by_object does
  x only those two views show the column
  x the rule above judges a non-empty set: the share list views that show the Object column
Leg B: new object file, BASE sharing-pointer-pairs.test.ts -> 1 failed | 15 passed
  x no list view shows a referenceVia sibling beside its id half   (the reversed pin)
Restore: git diff HEAD empty.

Ablation (scripts/ablation-replace.mjs, anchor "widget: 'object-ref'," x1 -> x0, restored blob == HEAD):
  x object_name declares the object-ref widget and stays a required text column
  x every type half a list view shows as a column declares the object-ref face
  Tests 2 failed | 21 passed (23)

pnpm --filter @objectstack/plugin-sharing typecheck                                        exit 0
pnpm --filter @objectstack/plugin-sharing exec vitest run --maxWorkers=2
  Test Files 86 passed (86) · Tests 1842 passed | 11 skipped (1853)                          head 85fdc6d475

Acceptance notes

  • The record page's activity feed names a share row by its stored recipient id (创建了 记录共享 "TZeOq…"), not by the face the H1 and the Recipient cell use. Not touched here; reported to the seat.

Verification

Read first: sys-record-share.object.ts (the widget and the two column lists; the only behaviour hunk), then sharing-pointer-pairs.test.ts (the reversed pin).

Two-minute check: boot showcase, open Setup → 共享明细 → 全部; the second column 对象 shows the object's icon and name (联系人), not showcase_contact.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/plugin-sharing, touching 7 documentable anchor(s).

28 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 09a1d7b94d8cd2234098a5eca13e04a48a783b84.

⛔ 5 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: created_at (literal, 49 pages)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 09a1d7b94d8cd2234098a5eca13e04a48a783b84 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b5e5b5cef25724a861a8a2925962ef680260f228 — the merge of head 85fdc6d475f43f77b694d645e9ffac360cfbec8e into base 09a1d7b94d8cd2234098a5eca13e04a48a783b84, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b5e5b5cef25724a861a8a2925962ef680260f228 && git checkout b5e5b5cef25724a861a8a2925962ef680260f228
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 09a1d7b94d8cd2234098a5eca13e04a48a783b84 85fdc6d475f43f77b694d645e9ffac360cfbec8e && git checkout -B drift-repro 09a1d7b94d8cd2234098a5eca13e04a48a783b84 && git merge --no-ff 85fdc6d475f43f77b694d645e9ffac360cfbec8e

node scripts/docs-audit/affected-docs.mjs --json 09a1d7b94d8cd2234098a5eca13e04a48a783b84

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 09a1d7b94d8cd2234098a5eca13e04a48a783b84 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i

Final head for review · 2026-12-04T15:14Z · zone ot-ai · Head-sha: 85fdc6d475f43f77b694d645e9ffac360cfbec8e

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39725 · Head-sha: 85fdc6d475f43f77b694d645e9ffac360cfbec8e · 2026-12-04T15:16Z

Verdict: ACCEPT. The zone lands it. It is Part of #39439, so pm:dispatched stays on the card at merge.

Face.

  • Checks. 39 success, 17 expected skips, 0 failed or pending. The one flagged skip is Dogfood Regression Gate (${{ matrix.shard }}/4), the unexpanded matrix name of a path-skipped gate. Its four shards do not apply to a plugin-sharing object diff.
  • Changeset. @objectstack/plugin-sharing at patch, with Clause-②: no and Metadata-protocol: none. That is right, because a widget: display hint on a platform object's text field moves nothing an author writes.
  • Scope. Amendment 6 (7413531619) covers all 4 files. Item 9b (naming the rule) is split to its own Feature card, and item 13 goes to the cloud route.

Item 9a.

  • Columns. all_shares gains object_name right after Record, and by_object opens with it.
  • Display hint. object_name declares widget: 'object-ref', the same declaration sys_assignment_rule, sys_webhook and sys_notification carry. The cell therefore draws the object's icon and label, not the stored API name; the dev's live check (7415030597) shows exactly that.
  • No grouping. No view groups on the column, because a group header would still show the raw name. Sorting keeps each object's grants together, in the shape sys_sharing_rule.by_object ships.
  • Unchanged. The stored column, the read-only data API and every other view are untouched.

The reversed pin, under the veto window. sharing-pointer-pairs.test.ts:119 used to say that no type half is ever a column. It now says that a type half shown as a column must declare the object-ref face. A control keeps the set non-empty, at exactly the two share views, and sys_share_link stays with no type-half column.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i

Landing · 2026-12-04T15:17Z · zone ot-ai · head 85fdc6d475f43f77b694d645e9ffac360cfbec8e

  • L1 ACCEPT 7415613940 (L1-c) on this head; no contract review owed (Clause-②: no, no spec or governed path).
  • check-governed-merges.mjs --pr 39725: NOT governed, 146 changed lines (≤ 3000).
  • K: landing-k.mjs K = 6 < 15.
  • CI on this head: 39 success, 18 skipped, 0 red; mergeable clean.
  • Lands under the veto window (reversed pin sharing-pointer-pairs.test.ts:119, reading 7413481800).
  • Action: pr_ready + automerge_enable (merge queue). Part of #39439: the card stays pm:dispatched until its close-out.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 15:18
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit c0c6154 Dec 4, 2026
58 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39439-setup-admin-polish-4 branch December 4, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants