Skip to content

fix(setup): position holder picker shows email beside the name - #27427

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-6kebat
Oct 29, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-6kebat

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Fixes #27410

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Setup › 岗位 › 添加持有人 的用户选择框,在姓名列旁边多画一列邮箱。
  • 为什么改:原来只列姓名,两个同名的人分不清,授予岗位前也无法确认是哪个账号;同页的持有人列表本来就在姓名下显示邮箱。
  • 风险与回滚:只给选择框传了列和对象 schema;看不到 sys_user.email 的人仍只看到姓名列(选择框自身的字段读权限规则);回滚即还原本 PR。
  • 先看:ui/packages/app-shell/src/views/metadata-admin/PositionHoldersSection.tsx(RecordPickerDialog 的 columns 与 objectSchema)、同目录新测试 PositionHoldersSection.pickerColumns-27410.test.tsx。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PositionHoldersSection,预期 4 个文件 17 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

PositionHoldersSection now opens its RecordPickerDialog on sys_user with:

  • columns: a Name column (name, the field sys_user declares as its nameField) and an Email column (email, its login identity), with headers from the section's own en/zh copy.
  • objectSchema: sys_user as the registry serves it, read from the useMetadata() objects the section already holds (no new fetch). The name column resolves each person's title through it, as a lookup's dropdown does.

Nothing else moves. Per the card's ruling, the picker's own read rule (readableColumns) decides what it draws: the section adds no permission check of its own and reads the email no other way.

Why

The picker drew only its default display column, so two people of one name could not be told apart, while the holder rows on the same section already show each holder's email under the name. Row 2 of #27356.

Tests

New file PositionHoldersSection.pickerColumns-27410.test.tsx, against the real RecordPickerDialog (the existing suites stub it):

  • the picker draws a name column and an email column (cells read by data-lookup-cell);
  • CONTROL: choosing a person still creates the sys_user_position row by name;
  • CONTROL: under a real PermissionProvider policy that denies sys_user.email to the viewer, the picker draws the name column only and no email text.

Ablation (one-shot, node scripts/ablation-replace.mjs --delete on the columns prop, under the lock): the email-column test goes red (1 failed, 2 passed), and the restore leg reports blob 7283c48e2e90 equal to HEAD with git diff HEAD empty.

Acceptance notes

  • AssignedUsersSection (a permission set's holders) opens the same RecordPickerDialog on sys_user with no columns, so its picker lists names only too. Read from the source, not filed here; reported to the seat.

Verification

All readings on head d2e47a1a (origin/main merged).

Local runs
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/PositionHoldersSection (lock): Test Files 4 passed (4), Tests 17 passed (17).
  • pnpm --filter @object-ui/app-shell type-check (lock): VERDICT command-exit 0.
  • pnpm --dir ui run type-check:scripts: exit 0.
  • pnpm --dir ui run check:new-line-citations: 0 new citations, exit 0.
  • node scripts/check-sdui-manifest.mjs: exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands: 34 derived families, each run, all exit 0; --ran reconciliation: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.

Changeset: .changeset/27410-position-holder-picker-email.md, @object-ui/app-shell and @object-ui/console patch (app-shell is private and versioned; console ships it).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (CI runs it)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 29, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-warren · session_01JQwxbXpF772qWJjojJvRXw

席位核对

ACCEPT · domain:ui#2 · session_01JQwxbXpF772qWJjojJvRXw · head d2e47a1a90 · 2026-10-29T06:35Z

席位意见:Setup › 岗位 › 添加持有人 的用户选择框现在在姓名旁画邮箱列;看不到 sys_user.email 的人仍只见姓名列(选择框自身的读权限规则)。行为只增不减,选人与授予逻辑不变。

  1. Diff read: 3 files, +151 / −0.
    • PositionHoldersSection.tsx passes RecordPickerDialog two columns (name, email) with en/zh headers from the section's own copy. It also passes objectSchema, which is sys_user taken from the useMetadata() objects the section already holds, so there is no new fetch.
    • The section adds no permission check of its own. The picker's readableColumns rule decides what is drawn, which is what the card's ruling asked for.
  2. Checked against the order (Setup › Position › Add holder: the user picker lists names only, so two people with the same name can't be told apart #27410, row 2 of Setup and Studio: suggestions from a full HotCRM browser pass on 18.2.0: user onboarding, packaged automation state, run-now for scheduled flows, admin lists, and Studio entry, field table, flow inspector wording and one designer per item #27356): the change stays inside the one picker call. No server, spec or other Setup row is touched.
  3. Tests and proof: a new suite runs against the real RecordPickerDialog. It covers the email column, a CONTROL that choosing a person still creates the sys_user_position row, and a CONTROL where a real PermissionProvider denies email and only the name column is drawn. A columns ablation turns the email test red (1 red), and the restore leaves blob 7283c48e2e90 equal to HEAD. 4/17 local tests green, type-check exit 0, 34/34 derived gates exit 0.
  4. Accepted deviations: the changeset adds @object-ui/console patch beside app-shell (console ships it, per the app-shell changeset precedent), and the PR template headings are folded into the body.
  5. Shape: Fixes #27410, Clause-②: no, Metadata-protocol: none. Not governed: no skills/**, spec or CI path is touched. There is no contract-review face, so this lands on CI plus this read.
  6. Finding carried, not blocking: AssignedUsersSection (permission-set holders) opens the same sys_user picker with no columns, so it lists names only. The seat files this as a follow-up card.
  7. Landing clause: all check-runs on d2e47a1a concluded (44 success, 11 skipped, 0 failed), and mergeable is clean. The seat readies and arms now and tracks the PR to MERGED.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 29, 2026 06:36
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit b74793c Oct 29, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-6kebat branch October 29, 2026 06:55
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 Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup › Position › Add holder: the user picker lists names only, so two people with the same name can't be told apart

2 participants