Repository navigation
fix(console): name permission sets, master objects, audited records and condition subjects by label - #34088
Conversation
…n subjects by label Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
…rfaces Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
…ir labels Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
…condition suites Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
…ce widening Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmSBi2p2cTsYqd7ScSZ
…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
|
domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf Contract reviewServed-tier: Face: declaration ( ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf 席位核对Verdict: ACCEPT · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43765282829 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf Re-queue · head
|
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
维护者速读
find,与列表网格的指针列同一读取器)。回滚即还原本 PR。AuditLogPage.tsx(记录列改用RecordPointerCell)、StudioDesignSurface.tsx(suggestedSetLabel)、PackageOwdOverviewPanel.tsx(masterLabelOf)。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).StudioDesignSurface.tsx,AccessPillar). A suggestion row carries onlypermission_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.suggestedSetLabelnames 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.PackageOwdOverviewPanel.tsx).masterLabelOfnames 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 asbyName.ui/apps/console/src/pages/system/AuditLogPage.tsx).sys_audit_log.record_idis the id half of areferenceViapair typed byobject_name. The column now draws it throughRecordPointerCell, the batched resolver a list grid'sreferenceViacolumn already uses (onefindper 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-gridexportsRecordPointerCell(and its two types) for this; the README's export list names them. No second resolver is written.FlowNodeConfigField.tsx). The mount passeslabelSubjects, the existingConditionBuilderoption the Validations panel already uses: a field subject reads by its label with its CEL spelling beside it, andprevious.FIELDreads as "FIELD LABEL (before the change)". The whole-recordprevioushas 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: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 readscrm_user.PackageOwdOverviewPanel.test.tsx: a served master outside the package reads "Customer Account"; CONTROL: an unlabelled master reads its name.AuditLogPage.objectLabels-28968.test.tsx: a readable record reads "Acme Corp" withacc_1as the tooltip; CONTROL: an unread record readsnightly_widget · record unavailable, a row with no record the dash.FlowNodeConfigField.entryCondition.test.tsx:Status/status,Contract term (months)/contract_term_months, theprevious.statuslabel; CONTROL:previouskeeps 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:subjectOptionsreads 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 answerscrm_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 exacttoContain, soprevious.*cannot satisfy them. It also gains the module-topimport '@objectstack/lint'thatcheck:test-source-aliasasks 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/*tosrc/, so no build leg)suggestedSetLabelbody →s.permission_set_nameStudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx{ master: masterLabelOf(row.master) }→{ master: row.master }PackageOwdOverviewPanel.test.tsx(false as boolean) &&(the raw id cell)AuditLogPage.objectLabels-28968.test.tsxlabelSubjects→labelSubjects={false}FlowNodeConfigField.entryCondition.test.tsxEach leg: anchor hit x1 → x0, blob changed, then restored with blob == HEAD and an empty
git diff HEAD.Acceptance notes
searchAllhit title when there is one (useRecordSearch), and the server titles a hit with the row'snameFieldvalue as stored (renderTitleinpackages/metadata-protocol/src/protocol-record-reads.ts).sys_record_sharedeclaresnameField: 'recipient_id', so a Record Share hit is titled with the raw principal id. Naming it needs a server or object-metadata change underpackages/**(resolve a reference name field to the referenced record's name, or declare a different title), notCommandPalette.tsxand not this card's file surface. The Notification Event (sys_notification,nameField: 'topic') hit was NOT MEASURED here: the declared title istopic, so why the QA run saw the id needs a live repro. Both go back to the seat to split.MarketplacePackagePage.tsx) mounts the sameSuggestedBindingsPaneland 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.RecordPointerCell.ConditionBuilderkeepslabelSubjectsoff by default, so the hook, action visible/disabled, page-block and widget mounts still list spellings. They are not on the card.Verification
The details below are on
c0343878, in this card's container.319ae3fconly changes the changeset'sClause-②:line toyes (widening)(@object-ui/plugin-gridis published, and its entry now exportsRecordPointerCelland two types);pnpm check:changeset-fixedre-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-aliasexit 0;tsc --noEmiton app-shell exit 0;eslinton 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 everyStudioDesignSurface.access*,PackageOwdOverviewPanel*,FlowNode*,ConditionBuilder*,FlowCanvas*,flowSingleBrace-12329,flow-node-producers.label,SuggestedBindingsPanel,AuditLogPage*test file and plugin-grid's pointer andreferenceViasuites: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 afterturbo run build --filter='@object-ui/console^...'(74/74 tasks):VERDICT command-exit 0three 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, includingpnpm --dir ui exec vitest run scripts/(171 files passed, 2 skipped) andpnpm check:test-source-alias(its first round flagged the two edited flow entry-condition suites; both now load@objectstack/lintat module top).--ranreconciliation: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-citations0 new;eslinton 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