Repository navigation
fix(app-shell): an approver chip that stands for several slots says so in words - #27699
Conversation
The pending-approver chip drew a bare "×N" when one principal holds several of a step's slots, beside an eligible-approver count that counts that person once. The chip now reads "holds N approver slots" from the new approvalsInbox.approverSlots count family, on the record approvals panel and the approval request page alike; neither count changes. Claude-Session: https://claude.ai/code/session_01Utp6CbDAucNyQ4UtzCJKyh Co-authored-by: Claude <noreply@anthropic.com>
…als panels Claude-Session: https://claude.ai/code/session_01Utp6CbDAucNyQ4UtzCJKyh Co-authored-by: Claude <noreply@anthropic.com>
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh |
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh Contract reviewServed-tier: Face: declaration only. The PR body, the changeset and claim 6504969450 each say ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
…y's words The console's served-page pin still expected the bare count the chip no longer draws; it now expects the approverSlots row, keeping the case's intent: one approver named once, with a count, the id printed nowhere. Claude-Session: https://claude.ai/code/session_01Utp6CbDAucNyQ4UtzCJKyh Co-authored-by: Claude <noreply@anthropic.com>
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh Regen-provenance: 6506420542 · The one commit after the reviewed head is test-only. It moves a console pin from the bare Generated by Claude Code |
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh
Requested by Bill · project thread
Fixes #27615
Clause-②: yes (widening) — a new key: the
approvalsInbox.approverSlotscount family, added to all ten published@object-ui/i18npacks. No existing value is edited.Metadata-protocol: none
维护者速读
×3;现在写成「Dev Admin · holds 3 approver slots」(中文「兼任 3 个审批席位」)。业务记录的审批面板和审批请求页两处一致。ui/packages/app-shell/src/views/RecordApprovalsPanel.tsx的 chip 渲染;approval-decision/ApprovalDecisionPanel.tsx的PendingApprovers;ui/packages/i18n/src/locales/en.ts/zh.ts的approverSlots一族。EXP-DEMO(High-Value Expense — Committee Quorum)的审批请求页;预期「等待以下审批人」显示「Dev Admin · holds 3 approver slots」,旁边仍是「1 eligible approver」。What changes
When one person holds several of a pending step's approver slots, the "Waiting on" chip collapses those slots into one chip. It used to draw the number as a bare
×3, beside the tally line's "1 eligible approver" (objectui#12781 counts distinct principals). Both numbers are right, but side by side they read as a contradiction.×N(N above one), it now draws the pack's words: "Dev Admin · holds 3 approver slots". It is the same copy, read by literal key, on the business record's approvals panel (RecordApprovalsPanel) and on the approval request page (ApprovalDecisionPanel'sPendingApprovers).approverChipsstill collapses the same slots into the same chip with the samecount, andeligibleApproverCountstill counts that person once. No widget, dialog or hook is added.@object-ui/i18n: one new count family,approvalsInbox.approverSlots, in all ten packs. Each pack carries every plural category its language selects, the same set asprogressEligiblebeside it (en/deone and other;fr/es/ptadd many;ruone, few, many and other;arall six;zh/ja/kocount-invariant), plus the count-invariant base row. Real wording in every pack, not English placeholders:en"holds 3 approver slots",zh"兼任 3 个审批席位",ja"承認枠 3 件を兼任",ko"승인 자리 3개 겸임",de"belegt 3 Genehmigerplätze",fr"occupe 3 sièges d'approbateur",es"ocupa 3 puestos de aprobador",pt"ocupa 3 postos de aprovador",ru"занимает 3 места согласующего",ar"يشغل 3 من مقاعد الاعتماد".ApproverChip.countgains a doc comment saying how it is drawn and why.Changeset:
.changeset/27615-approver-slots-chip.md, patch for@object-ui/app-shelland@object-ui/i18n, carrying the sameClause-②:andMetadata-protocol:lines.Tests
describeinRecordApprovalsPanel.eligibleApprovers-12781.test.tsx(same fixtures as the objectui#12781 pins: user-id slots, a name per id, the server's quorum tally):Dev Admin·plus the pack rowapproverSlotsat count 3, no×anywhere in the panel, and the eligible line is the pack rowprogressEligibleat count 1;ApprovalDecisionPanel.eligibleApprovers-12781.test.tsx, plus azhcase: under azhprovider the chip draws thezhpack's row (asserted different fromen's) beside thezheligible line.×2/×3to the family's count-invariant row, which is what a provider-less render draws:RecordApprovalsPanel.test.tsx(the per-group chip test) andApprovalDecisionPanel.test.tsx(the objectui#12077 three-slot chip test).Targeted run on the merged head 0f72297: approvals views + i18n pack tests
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/RecordApprovalsPanel packages/app-shell/src/views/approval-decision/ packages/app-shell/src/views/approval-progress/ packages/i18n/The i18n pack tests in that run include
all-locales-key-parity,count-families-11445,plural-categories-11432anduntranslated-identity-4376.Ablation, one per panel: the old bare count restored, the new pins go red
Each leg is
node scripts/ablation-replace.mjs, which mutates the committed panel back to drawing×{chip.count}, runs the panel's test file, and restores with the restore proven by blob hash and an emptygit diff HEAD. The tests import the panels from source, so no build sits between the mutation and the run.Acceptance notes
approverChipskeys a chip by label, detail and group, so two distinct addresses that resolve to an identical name with no group (two users who share a full name, say) also collapse into one chip with a count, and the eligible count says 2 beside it. That is a property of the chip's key and was there before this change. The chip'stitlealready lists both raw ids. This change gives the number words; it does not change what the chip groups.progressEligibleline does there. With anI18nProviderthe plural slot is selected.DeclaredActionsBar, lists each name once and draws no count, so there is nothing to reconcile there. The×{group.items.length}inInboxPopovercounts notifications in a group and is out of scope.Verification
dispatch-gates --commandslist for this diff, run on the merged head and reconciled with--ran. That includesnode scripts/check-sdui-manifest.mjs(exit 0) andpnpm --dir ui exec vitest run scripts/. The ui i18n checks were also run:check:i18n-keys,check:i18n-drift,check:i18n-dead-keysandcheck:new-line-citations, all exit 0.pnpm turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18n, both packages, bothtscprograms (source and tests).@object-ui/app-shellvitest suite was not run locally. CI's Test UI runs it.Generated by Claude Code