Skip to content

fix(console): name permission sets, master objects, audited records and condition subjects by label - #34088

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-nz6xcb
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-nz6xcb

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #33864 — items 1, 2, 3 and 5 land here. Item 4 (Setup palette record hits) stays open on the card: its title is the server search's, not the Console's (see Acceptance notes).

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

维护者速读

  • 改了什么:控制台四处界面改为显示标签:Studio 访问权限页的建议授权横幅、其提示与状态行用权限集标签;记录共享「由父级控制」显示父对象标签;设置 → 审计日志的「记录」列显示记录名称;流程入口条件的字段下拉显示字段标签,路径作为次要文字。
  • 为什么改:这些界面违反「给人看的地方用标签,机器名至多作次要文字」的约定(QA 扫描发现)。
  • 风险与回滚:只改显示层,不改写入或契约。审计日志每页按对象多发一次批量读取(每个对象一次 find,与列表网格的指针列同一读取器)。回滚即还原本 PR。
  • 先看:AuditLogPage.tsx(记录列改用 RecordPointerCell)、StudioDesignSurface.tsx(suggestedSetLabel)、PackageOwdOverviewPanel.tsx(masterLabelOf)。
  • 两分钟验证:在 showcase 以管理员打开 设置 → 审计日志,「记录」列应显示记录名称,鼠标悬停显示记录 id;记录已删除的行显示「对象 · record unavailable」。
  • 需要你做的:无,席位落地。

What changes

Anything shown to a person names the thing by its label; the machine name appears at most as secondary text (ux-conventions.labels-over-machine-names).

  1. Studio → Access, suggested-binding strip (StudioDesignSurface.tsx, AccessPillar). A suggestion row carries only permission_set_name. The strip lists this package's suggestions, and those are this package's own sets, which the pillar's rail already reads with their labels. suggestedSetLabel names the set by that label in the banner, every toast (Grant, Dismiss, Revoke, Reconsider, the not-in-force warning) and the state line a resolved row keeps. A set the rail holds no label for is named by its machine name. No server change: the suggestion payload is unchanged.
  2. Studio → Access → Record sharing, "By parent →" (PackageOwdOverviewPanel.tsx). masterLabelOf names the master object by this package's own object as the table reads it (pending draft included), else the served object's label, else its machine name. A master outside the package is read by name (readObjectsByName, the hook the inbox's object rows use), so the table asks for the few masters it names, never the whole object registry; the objects-reader census (openPathObjectReaders-12811.test.ts) gains its row as byName.
  3. Setup → Audit Log, Record column (ui/apps/console/src/pages/system/AuditLogPage.tsx). sys_audit_log.record_id is the id half of a referenceVia pair typed by object_name. The column now draws it through RecordPointerCell, the batched resolver a list grid's referenceVia column already uses (one find per object per tick, the ADR-0079 name ladder, the raw id as the tooltip). A row with no object or record keeps the dash. @object-ui/plugin-grid exports RecordPointerCell (and its two types) for this; the README's export list names them. No second resolver is written.
  4. Setup ⌘K palette record hits — not in this PR. See Acceptance notes.
  5. Studio flow editor → Entry condition (FlowNodeConfigField.tsx). The mount passes labelSubjects, the existing ConditionBuilder option the Validations panel already uses: a field subject reads by its label with its CEL spelling beside it, and previous.FIELD reads as "FIELD LABEL (before the change)". The whole-record previous has no label and reads as its spelling.

No new i18n keys: every string here already existed.

Tests

One pin per item, each in the component's existing harness file as a top-level describe:

  • Item 1, StudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx: the banner, the Grant toast and accepted line, the Dismiss toast and dismissed line name "CRM user"; CONTROL: a set with an empty rail label reads crm_user.
  • Item 2, PackageOwdOverviewPanel.test.tsx: a served master outside the package reads "Customer Account"; CONTROL: an unlabelled master reads its name.
  • Item 3, AuditLogPage.objectLabels-28968.test.tsx: a readable record reads "Acme Corp" with acc_1 as the tooltip; CONTROL: an unread record reads nightly_widget · record unavailable, a row with no record the dash.
  • Item 5, FlowNodeConfigField.entryCondition.test.tsx: Status / status, Contract term (months) / contract_term_months, the previous.status label; CONTROL: previous keeps its spelling.

Forced test edits (the option text now carries label + spelling, or the master now reads by label):

  • PackageOwdOverviewPanel.test.tsx › 'shows the master link': asserted /crm_account/, now the label "Account".
  • FlowNodeConfigField.entryCondition.test.tsx: subjectOptions reads each option's spelling (the hint), and two clicks pick an option by spelling instead of by accessible name.
  • FlowNodeInspector.entryCondition.test.tsx › 'its subject dropdown offers the FLATTENED vocabulary…': reads the spelling (the hint) of each option.
  • AuditLogPage.objectLabels-28968.test.tsx: the hoisted adapter double now answers crm_account's definition and record (the other cases in the file are unchanged and green).
  • useObjectFields.draftOverlay-11895.test.tsx (both cases): the wait finds the option by the label-first accessible name the builder now renders (Issue summary issue_summary, Industry industry), and the assertions read each option's spelling (the hint) with exact toContain, so previous.* cannot satisfy them. It also gains the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited suite reaching the flow inspectors.
  • openPathObjectReaders-12811.test.ts: one new census row, PackageOwdOverviewPanel.tsx → byName; no other row changed.
Ablations — one per item, each red, each restored to HEAD (on c034387's tree, via scripts/ablation-replace.mjs; ui vitest resolves @object-ui/* to src/, so no build leg)
Item Mutation (anchor → replacement) Pin file Result
1 suggestedSetLabel body → s.permission_set_name StudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx 3 failed / 5 passed (the CONTROL stays green)
2 { master: masterLabelOf(row.master) } → { master: row.master } PackageOwdOverviewPanel.test.tsx 2 failed / 9 passed
3 Record cell guard → (false as boolean) && (the raw id cell) AuditLogPage.objectLabels-28968.test.tsx 2 failed / 5 passed
5 labelSubjects → labelSubjects={false} FlowNodeConfigField.entryCondition.test.tsx 2 failed / 39 passed (the CONTROL stays green)

Each leg: anchor hit x1 → x0, blob changed, then restored with blob == HEAD and an empty git diff HEAD.

Acceptance notes

  • Item 4 left out, as the dispatch order says for a fix outside this lane's files. The palette titles a record hit with the server's searchAll hit title when there is one (useRecordSearch), and the server titles a hit with the row's nameField value as stored (renderTitle in packages/metadata-protocol/src/protocol-record-reads.ts). sys_record_share declares nameField: 'recipient_id', so a Record Share hit is titled with the raw principal id. Naming it needs a server or object-metadata change under packages/** (resolve a reference name field to the referenced record's name, or declare a different title), not CommandPalette.tsx and not this card's file surface. The Notification Event (sys_notification, nameField: 'topic') hit was NOT MEASURED here: the declared title is topic, so why the QA run saw the id needs a live repro. Both go back to the seat to split.
  • Item 1 has a second host. The marketplace package page (MarketplacePackagePage.tsx) mounts the same SuggestedBindingsPanel and still names the set by machine name in its prompt and toasts. It is not on the card. Its fix needs a label source that page does not read today (the package's permission sets, or a label on the suggestion payload, which is a server change). Same defect class, reported to the seat, not fixed here.
  • Item 3 unreadable rows. The delta asked for the id as the fallback. The shared resolver draws "OBJECT · record unavailable" with the id as the tooltip, its one rendering for deleted and not-visible records. I kept the shared face rather than fork it for one page. The id is still in the tooltip and in the drawer's "Target record" line. If the seat wants the bare id on this page, it is a one-prop change to RecordPointerCell.
  • Item 5, other mounts. ConditionBuilder keeps labelSubjects off by default, so the hook, action visible/disabled, page-block and widget mounts still list spellings. They are not on the card.
  • Revoke's missing toast stays with Two console writes give no feedback: Revoke on a granted binding suggestion (Studio Access) and creating a package in Studio #33865, queued behind this card on the same banner. This PR only renames the set in the toasts that already exist.

Verification

The details below are on c0343878, in this card's container. 319ae3fc only changes the changeset's Clause-②: line to yes (widening) (@object-ui/plugin-grid is published, and its entry now exports RecordPointerCell and two types); pnpm check:changeset-fixed re-ran on it, exit 0.

On the head 5f4c47f5 (the CI round: the census row with the by-name read, and the draft-overlay pin): os-verify-lock.sh -c 'cd ui && pnpm exec vitest run --maxWorkers=3 packages/app-shell/src/views/metadata-admin packages/app-shell/src/console/__tests__ packages/app-shell/src/views/studio-design': Test Files 1153 passed (1153), Tests 11138 passed | 1 skipped (11139), VERDICT command-exit 0. pnpm check:test-source-alias exit 0; tsc --noEmit on app-shell exit 0; eslint on the two touched sources 0 errors.

Tests — 85 files around the four surfaces: 865 passed

os-verify-lock.sh -c 'cd ui && pnpm exec vitest run --maxWorkers=2 FILES' over every StudioDesignSurface.access*, PackageOwdOverviewPanel*, FlowNode*, ConditionBuilder*, FlowCanvas*, flowSingleBrace-12329, flow-node-producers.label, SuggestedBindingsPanel, AuditLogPage* test file and plugin-grid's pointer and referenceVia suites: Test Files 85 passed (85), Tests 865 passed (865), VERDICT command-exit 0. The whole app-shell suite is CI's (Test UI); this narrowing is declared.

Type-check — app-shell, plugin-grid, console: exit 0

pnpm --filter @object-ui/app-shell type-check, @object-ui/plugin-grid, @object-ui/console, each under the lock after turbo run build --filter='@object-ui/console^...' (74/74 tasks): VERDICT command-exit 0 three times. pnpm check:type-check-debt: exit 0, no entry above its number.

Derived gates — 37 derived, 37 run, 0 NOT-MEASURED, 0 UNRUN

node scripts/pm/dispatch-gates.mjs --commands (no paths) derived 37 families; every one exited 0, including pnpm --dir ui exec vitest run scripts/ (171 files passed, 2 skipped) and pnpm check:test-source-alias (its first round flagged the two edited flow entry-condition suites; both now load @objectstack/lint at module top). --ran reconciliation: 37 derived famil(ies) accounted for — 37 run, 0 NOT-MEASURED. Run beyond the derivation, both exit 0: pnpm check:published-readme-exports (the README's export list names the new export), pnpm check:changeset-fixed. Also: pnpm check:new-line-citations 0 new; eslint on the touched files 0 errors. Repo-wide lint and the rest of the farm are CI's.

Dogfood battery: not owed (no ! in the title, no narrowing arm).


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
…tion draft fields by label

The record-sharing table asked useMetadata().objects for a master outside
the package, which loads the whole object registry; it now reads the masters
it names through readObjectsByName and the objects-reader census classifies
it byName. The draft-overlay entry-condition pin finds its options by the
label-first name the builder renders and reads each option's spelling.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
@github-actions github-actions Bot added the tests label Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 62626866b38853cca99f25e7e03fb33462492c3a
Local-runs: none

Face: declaration (Clause-②: yes (widening) on the changeset and the PR body; no published schema, no governed path: check-governed-merges --pr 34088 0 of 14 paths). Inputs read: card #33864, Claim, os-dev-report 6899087689, the two CI-round notes, PR #34088 body, the net diff against main at the merge base (14 files), and the check-runs on this head (2026-11-15T20:05Z: 40 success, 13 skipped, 0 failed).

① Derived judgments

  • Public surface: @object-ui/plugin-grid (published; no private field) gains one value export, RecordPointerCell, and two type exports, RecordPointerCellProps and RecordPointerSource, all from the existing internal module src/RecordPointerCell.tsx; nothing is removed or renamed. The README's import block lists the three names and a paragraph says what the face is for. This is the widening the yes (widening) line declares. Right.
  • RecordPointerCellProps.pointer is typed RecordPointer, which the package does not export; a consumer passes an object literal { objectName, recordId } (as AuditLogPage.tsx does) and the type checks structurally. Nit, no effect on correctness.
  • @object-ui/app-shell and @object-ui/console: no export moves. ConditionBuilder's labelSubjects prop already existed; FlowNodeConfigField turns it on for the flow Entry condition. PackageOwdOverviewPanel reads the masters outside the package by name (readObjectsByName), and the objects-reader census books it byName; no whole-registry read is added. Right.
  • Served metadata, API and i18n packs: unchanged (grid.recordUnavailable is the module's existing safe-translation default). Metadata-protocol: none is right.

② Semver level

patch on @object-ui/app-shell, @object-ui/console, @object-ui/plugin-grid. An added export on a pre-existing package is additive; the lane's changesets carry patch for widening in this release line, and Check Changeset concluded success on this head. Correct.

③ Boundary flags

Implemented-by: claude/project-thread-nz6xcb
Reviewed-by: session_01ADHkmT2NE3iyG1o6TDg3sf

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

席位核对

Verdict: ACCEPT · head 62626866 · 2026-11-15T20:06Z

  1. Shape. Draft → main, first content line Part of #33864 (items 1, 2, 3, 5). 14 files on the claimed surface plus the declared ui/apps/console and plugin-grid export deviation; one changeset (@object-ui/app-shell, @object-ui/console, @object-ui/plugin-grid patch).
  2. Contract. Clause-②: yes (widening) (RecordPointerCell + two types exported from @object-ui/plugin-grid); same-head TIER_DEFAULT record PASS: comment 6900510627. Metadata-protocol: none.
  3. Open question A (item 3): accepted, shared face kept.
  4. Gates on 62626866. 53 check runs: 40 success, 13 skipped, none failed. The CI round's census and draftOverlay reds on 319ae3fc are fixed on 5f4c47f5; this head is 5f4c47f5 merged with main (merge-only relay sync, K was 15).
  5. K. K = 3 first-parent commits on main since the merge base; no sync owed.
  6. Governed. check-governed-merges --pr 34088: NOT governed (0 of 14 paths).
  7. Carried, not in this PR. Item 4 (palette record-share title) → Record activity rows title a record by its raw lookup id when the object's nameField is a lookup ("Created Project Member \"gCX6SR…\"") #34055 (server); Marketplace banner → Marketplace package page: the suggested-binding prompt and toasts name the permission set by its machine name (same class as #33864 item 1) #34094; remaining ConditionBuilder mounts → Studio condition editors: hook, action, page-block and widget conditions list fields by machine name #34122.
  8. Landing. This stroke: pr_ready + automerge_enable, under the maintainer's landing approval in the seat thread (2026-11-15T16:10Z, 「批准席位 本班复核通过的 PR 执行 --land」). The PR says Part of, so MERGED does not close Console shows machine names or raw record ids where a label exists: Access binding-suggestion banner and toasts, OWD "By parent →", Audit Log Record column, Setup palette record hits, flow entry-condition field picker #33864; the seat then records what remains (item 4 on Record activity rows title a record by its raw lookup id when the object's nameField is a lookup ("Created Project Member \"gCX6SR…\"") #34055) and closes the card.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 20:06
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43765282829 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (11/16) — 失败步骤: Run the ui tests (shard 11/16)

    × a page behind the gate mounts once, so its child reads once per load 14ms
    FAIL   dom  packages/app-shell/src/hooks/__tests__/useLauncherApps-26838.test.tsx > the first /me/apps read is pending from the first render (objectstack#28085) > a page behind the gate mounts once, s
      ↳ 失败原因: AssertionError: expected "vi.fn()" to be called 1 times, but got 0 times
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 17 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

Re-queue · head 62626866 · 2026-11-15T22:14Z

Queue build 43765282829 ejected this PR on useLauncherApps-26838.test.tsx › a page behind the gate mounts once, so its child reads once per load. That case is not on main: #34097 adds it, and #34097 was stacked ahead of this group. This diff does not touch useLauncherApps* (reading on #34150). #34097 has left the queue for a rework of that case, so this PR goes back in once, on the unchanged head.

Head checks: 41 success, 13 skipped, none failed. K = 11 (< 15, no sync owed). The seat's ACCEPT on this head stands, under the maintainer's landing approval (2026-11-15T16:10Z). A second ejection on this head is read as real, not re-queued.

Merged via the queue into main with commit e08aad7 Nov 15, 2026
54 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-nz6xcb branch November 15, 2026 22:37
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