feat(platform-objects): surface sys_user admin actions on the record-detail header#2846
Merged
Conversation
…detail header The account-management actions (Ban/Unban, Unlock Account, Set Password, Set Platform Role, Impersonate) were declared `locations: ['list_item']` only, so an admin had to return to the Users list to run them — they were unavailable from an open user record. Add `record_header` to each so they also appear in the detail header's ⋯ "More" menu. objectui's record-detail page already renders `record_header` actions (overflows extras past the 3rd into the "More" menu), injects `userId` from the viewed record, and drives the param/confirm/result dialogs — so no objectui change is needed. `record_header` is the only detail-surface location objectui consumes (it does not read `record_more`), hence that specific string. Adds a regression assertion in platform-objects.test.ts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
A platform admin viewing an open user record could not run the account-management actions — Ban/Unban, Unlock Account, Set Password, Set Platform Role, Impersonate. They were declared
locations: ['list_item']only, so they appeared only in the Users list row menu. To reset a password or impersonate, the admin had to navigate back to the Users list and find the row. (Surfaced by a Setup-app review.)Change
Add
record_headerto each of those six admin actions insys-user.object.ts, so they also render on the user record-detail header — overflowing into the ⋯ "More" menu.No objectui change is required. The detail page already:
record_headeractions and overflows extras past the 3rd into the "More" menu (action-bar.tsx),userIdfrom the viewed record (RecordDetailViewapiHandler,pageRecord.id),record_headeris deliberately the string used: it is the only detail-surface location objectui consumes (it does not readrecord_more).Test
pnpm --filter @objectstack/platform-objects exec vitest run src/platform-objects.test.ts→ 65/65 pass, incl. the new assertion that each admin action carries bothlist_itemandrecord_header.🤖 Generated with Claude Code