Skip to content

feat(platform-objects): surface sys_user admin actions on the record-detail header#2846

Merged
os-zhuang merged 2 commits into
mainfrom
worktree-setup-fixes
Jul 11, 2026
Merged

feat(platform-objects): surface sys_user admin actions on the record-detail header#2846
os-zhuang merged 2 commits into
mainfrom
worktree-setup-fixes

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

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_header to each of those six admin actions in sys-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:

  • renders record_header actions and overflows extras past the 3rd into the "More" menu (action-bar.tsx),
  • injects userId from the viewed record (RecordDetailView apiHandler, pageRecord.id),
  • drives the param / confirm / result dialogs (Set Password's temp-password reveal, Impersonate's confirm, etc.).

record_header is deliberately the string used: it is the only detail-surface location objectui consumes (it does not read record_more).

Test

pnpm --filter @objectstack/platform-objects exec vitest run src/platform-objects.test.ts65/65 pass, incl. the new assertion that each admin action carries both list_item and record_header.

🤖 Generated with Claude Code

os-zhuang and others added 2 commits July 11, 2026 23:49
…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>
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 11, 2026 3:54pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/s labels Jul 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects.

2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/plugins/packages.mdx (via @objectstack/platform-objects)
  • content/docs/ui/setup-app.mdx (via @objectstack/platform-objects)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang os-zhuang merged commit b97af7e into main Jul 11, 2026
16 checks passed
@os-zhuang os-zhuang deleted the worktree-setup-fixes branch July 11, 2026 15:59
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/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant