Skip to content

fix(app-shell): the permission set's Add user picker shows each person's email beside their name - #27808

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-8i0z2y
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-8i0z2y

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

维护者速读

  • 改了什么:设置 › 权限集 › 已分配用户 › 添加用户 的选人框,原来只有姓名一列,现在多一列邮箱。
  • 为什么改:同名的两个人在选人框里分不出来,授予权限集前也没法确认账号;同页已分配的列表本来就显示邮箱。
  • 风险与回滚:只改选人框的列与表头,授予写法、成员过滤、AI 席位上限提示都不变;回滚即 revert 本 PR。
  • 先看:AssignedUsersSection.tsx 里 RecordPickerDialog 新增的 objectSchema 与 columns 两个属性;新测试 AssignedUsersSection.pickerColumns-27433.test.tsx。
  • 两分钟验证:打开任一权限集 › 已分配用户 › 添加用户,预期选人框出现「姓名」「邮箱」两列;无权读 sys_user.email 的角色只看到姓名列。
  • 需要你做的:无,席位落地。

Fixes #27433

Clause-②: no
Metadata-protocol: none

What changes

On a Setup permission-set page, Assigned users › Add user opened RecordPickerDialog on sys_user with no columns, so the picker drew the name alone. It now passes, in the same shape as Position › Add holder (#27427):

  • columns for name and email, headed from the section's own en/zh copy (Name/Email, 姓名/邮箱) — no new @object-ui/i18n key, so Clause-②: no;
  • objectSchema set to sys_user from the useMetadata() objects the section already holds — no new fetch;
  • no permission check of its own: the picker's own readableColumns rule decides what is drawn.

Files: ui/packages/app-shell/src/views/metadata-admin/AssignedUsersSection.tsx, one new test beside it, .changeset/27433-permission-set-user-picker-email.md (@object-ui/app-shell + @object-ui/console patch, as #27427's).

Tests

AssignedUsersSection.pickerColumns-27433.test.tsx, against the real RecordPickerDialog (not a stub) and a real PermissionProvider:

  • the picker draws a Name column and an Email column (cells read by data-lookup-cell);
  • CONTROL: the picker offers the active organization's members only (a sys_user in another organization is not drawn);
  • CONTROL: choosing a person still writes sys_user_permission_set { user_id, permission_set } by name;
  • CONTROL: an AI-seat cap refusal from the grant write still shows inline;
  • CONTROL: under a policy that denies sys_user.email (grant writes allowed), only the name column is drawn and no email text appears in the dialog.

Ablation (one-shot, not kept): scripts/ablation-replace.mjs deleted the columns prop (anchor 1 → 0, blob 6e003bf1 → 495a0d0e) → the column test went red (1 failed / 4 passed), the four CONTROLs stayed green; restored to blob == HEAD, git diff HEAD empty. The later commit 3b0005b0 only changes the schema cast's type.

Acceptance notes

Verification

All on head 3b0005b0 (base 968cacfd), locally:

Tests
  • pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/AssignedUsersSection.pickerColumns-27433.test.tsx — Test Files 1 passed, Tests 5 passed (verify lock VERDICT command-exit 0).
  • Every test file naming AssignedUsersSection (44 files: the section's own six, the PermissionMatrixEditor family, setupHoldersGrant-12082, trailDoorsGate-12475, openPathObjectReaders-12811, affordanceGrantMap-12082 and others) — Test Files 44 passed, Tests 332 passed (VERDICT command-exit 0).
  • pnpm --filter @object-ui/app-shell run type-check — VERDICT command-exit 0.
  • Ablation as above: deleting columns → 1 failed / 4 passed; restored, git diff HEAD empty.
Derived gates (34)

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, each run with its exit code recorded before any pipe; reconciled with --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.

node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0

origin/main moved 13 commits since the base; none touches the three changed files or RecordPickerDialog, so the branch is not merged with it (no overlap). Every CI family (Test UI, Type Check UI, Lint & Repo Gates, …) is the PR's own check-runs.


Generated by Claude Code

…n's email beside their name

Fixes the picker on Setup › Permission set › Assigned users, the same shape
as Position › Add holder: name and email columns, sys_user's schema for the
picker's own column read rule.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CazvDXxebLfghuZZ7t
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling labels Oct 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh

席位核对

ACCEPT · head 3b0005b012e589f9b89f7521a35d39380e32e072 · 2026-10-30T00:13Z

  • Shape: draft → main, Fixes #27433. Clause-②: no and Metadata-protocol: none: the en/zh column headers come from the section's own copy, so no @object-ui/i18n key is added and no export changes. The changeset is a patch on @object-ui/app-shell and @object-ui/console, the same packages as the fix(setup): position holder picker shows email beside the name #27427 precedent.

  • Change, read (AssignedUsersSection.tsx): the Add user RecordPickerDialog now passes columns for name and email, and objectSchema set to sys_user, taken from the useMetadata() objects the section already holds. There is no new fetch and no permission check of its own: the picker's read rule decides which columns are drawn. The member filter, the grant write and the AI-seat refusal path are untouched. This is the same shape as PositionHoldersSection (Setup › Position › Add holder: the user picker lists names only, so two people with the same name can't be told apart #27410).

  • Evidence (report 6511493583): the new AssignedUsersSection.pickerColumns-27433.test.tsx passes 5 cases against the real RecordPickerDialog and a real PermissionProvider:

    • both columns are drawn;
    • the picker offers the active organization's members only;
    • the grant is written by name;
    • the AI-seat cap refusal shows inline;
    • when sys_user.email is denied, only the name column is drawn.

    Removing columns turns the column case red while the four controls stay green, and the file was restored. 44 related files, 332 tests green. App-shell type-check green.

  • Accepted deviation: origin/main moved 13 commits with no overlap, so no merge was needed. CI is green on this head.

  • Gates (check-runs on the head): 44 success, 11 skipped, 0 failure. check-governed-merges --pr 27808: NOT governed, 3 files, 206 changed lines.

  • Landing: non-governed, all green, mergeable_state clean, so the seat lands it with pr_ready and automerge_enable.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 30, 2026 00:14
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 30, 2026 00:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 198da49 Oct 30, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-8i0z2y branch October 30, 2026 00:50
os-bill pushed a commit that referenced this pull request Oct 30, 2026
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/m tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup › Permission set › Add user: the user picker lists names only, so two people of one name cannot be told apart

1 participant