This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(app-shell): show a position's label in a permission set's Assigned users (objectui#13477) - #13493
Merged
Merged
Conversation
…d users (objectui#13477)
The "via position" chip drew the holder's sys_user_position.position, the
position's machine name, although the section already lists the registry's
position definitions (ensureType('position')) to find the positions that
distribute the set, and /meta/position serves their labels in the caller's
language. The chip now reads the label from that list and keeps the name on
its title, as CitedItemChip in AccessExplainPanel does; a definition with no
label reads by its name.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWGTsmqrtrt1Zqh1ioWqsT
…bjectui#13477) Nothing outside the section reads it, and a module-level export beside the component costs a react-refresh warning. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XWGTsmqrtrt1Zqh1ioWqsT
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contributor
Author
席位核对 — ACCEPT · PR #13493 @
|
This was referenced Oct 25, 2026
This was referenced Oct 25, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Fixes #13477
Clause-②: no
Metadata-protocol: none
What changed
AssignedUsersSection(a permission set's Assigned users list) drew each "via position" chip from the holder'ssys_user_position.position, the position's machine name, throughc.viaPosition(v.position). The sameloadalready lists the registry's position definitions throughensureType('position')to find the positions that distribute the set, and that list carries each definition'slabelas/meta/positionserves it in the caller's language (objectstack#25701).positionLabels(positions)readsnametolabelfrom that one list (a blank or non-string label is skipped).vianow carrieslabelbesideposition.c.viaPosition(label ?? name), and the chip'stitleis the machine name whenever the text is not the name, the same ruleCitedItemChipinAccessExplainPanelapplies. With no label the chip reads by its name and has notitle, as before..changeset/13477-assigned-users-position-label.md:@object-ui/app-shellpatch.Files:
packages/app-shell/src/views/metadata-admin/AssignedUsersSection.tsx, its existing testAssignedUsersSection.test.tsx(the fixture'scontributordefinition has the labelContributor, so the chip assertion now readsvia position Contributor), the new pinAssignedUsersSection.positionLabel-13477.test.tsx, and the changeset.Tests
The new pin mounts the real
AssignedUsersSectioninside the realMetadataProvider, over a realObjectStackAdapterwhosefetchis the only stub, so the label reaches the chip through the store's ownGET /api/v1/meta/position:shows the label from /meta/position, with the machine name on title: chipvia position Sales Manager,title="sales_manager", and novia position sales_manager.a definition with no label reads by its name, with no title: chipvia position field_repwith notitle, beside the labelled one.Readings, taken locally on the branch head:
pnpm exec vitest run packages/app-shell/src/views/metadata-admin/AssignedUsersSection: Test Files 5 passed (5), Tests 29 passed (29).PositionHoldersSectionandAccessExplainPanelprefixes: Test Files 14 passed (14), Tests 84 passed (84).AssignedUsersSection.tsxput back to the base commit): both new tests and the updated chip assertion inAssignedUsersSection.test.tsxfail (3 failed, 11 passed across the two files); with the fix restored they pass.pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsc -p tsconfig.test.json): exit 0.pnpm exec eslinton the three touched source/test files: 0 errors, 15 warnings. Each warning is a rule on a line this branch did not write (no-explicit-any,react-hooks/refs,react-hooks/set-state-in-effect, andonly-export-componentson the existingpositionsDistributingexport). The new helper stays unexported so it adds none.node scripts/check-changeset-presence.mjs: pass, 1 changeset declared for the 1 released package.pnpm check:new-line-citations: 0 new citations.Acceptance notes
The sweep looked for any other site that draws a raw position or permission-set machine name from a payload other than the
/meta/positionor/meta/permissionlist. The brief allowed a fix in the same diff only where the fix is the same one-line label lookup from a list that component already loads. None of the sites below qualified, so this diff touches none of them.Already labelled, nothing to do:
PositionHoldersSection(a position's holders) lists people only. It draws no position or permission-set name.type: 'position'(thedecision_output_defsentry inapps/console/src/services/approvalsApi.ts): the decide dialog's picker is built byregistryOptionsindecisionOutputParams.tsfromensureType('position'), usinglabeland falling back to the name. Approver display goes throughuseApproverDirectory, whose registry leg labelsposition:references from the same store read.AccessExplainPanelPrincipal card and "Contributed by" chips already label throughCitedItemChip.Raw names that remain, each needing more than a one-line lookup (none of these components loads the list):
sharedWith: the catalog's "Shared with" list column (therenderon thesharedWithcolumn inanchors.ts) and the summary row inSharingRuleCloneDialogboth printTYPE: VALUE, e.g.position: sales_manager. Neither loads/meta/position, and the recipient type itself is a raw token.PositionGrantCells(the position list's "Permission sets" column) draws_grantedPermissionSets[].namefrom the list's servedlistIncludecolumn. The component loads no/meta/permissionlist.PositionPreviewlists the draft definition'spermissionSetsas code-formatted machine names. It loads no permission list.SuggestedBindingsPanel, its Studio copy inStudioDesignSurface, andMarketplacePackagePagetoasts) interpolate the suggestion payload'spermission_set_nameinto their sentences. None of them loads/meta/permission.Locale of the metadata store's reads:
MetadataProvider.ensureTypereads throughadapter.getClient().meta.getItems(type). The console's adapter is built inAdapterProviderwithcreateAuthenticatedFetch(), which setsAccept-Languagefromdocument.documentElement.langon every API call that does not already carry one.ConnectedShellInnerkeysMetadataProvideron the UI language (key={language}) and clears the adapter cache on a switch, so/meta/positionand/meta/permissionare read again in the new language. Nothing on this branch re-checks that wiring; it was read from the source and the new pin does not assert the header.🤖 Generated with Claude Code
https://claude.ai/code/session_01XWGTsmqrtrt1Zqh1ioWqsT