Skip to content

picklist metadata kind — spec: picklist collection, Field.select({ picklist }), server-resolved options, translation face (phase 1 of objectstack#18164) #19518

Description

@os-project-manager

Path: 本地跑起来、看到 — records-forms.picklist-shared-across-objects, records-forms.picklist-org-append | P2

Sub-issue of objectstack#18164 (shared picklist / global value set), filed by the director seat, summon #25 (session_012GcsUbuqFGBibkEDMRC1eE) under ruling batch #209 item 1 · letter A · maintainer 「18164 同意」 (2026-09-21, chat). ⛔ Not a claim. Position in the road: step ②「本地跑起来、看到」, records/studio; it is taken after the open product P0/P1 checklist items by the road order — ⛔ not dispatched before them. The design of record is the batch #147 item 2 ruling on the parent (comment 5715762696), reproduced here only where this layer needs it.

Scope (the spec layer — packages/spec, the domain:spec seat)

  1. New metadata kind picklist (name ruled picklist on the parent, ruling 5904864936, batch 🔗 Broken links detected in documentation #251 item 3 · Q2 A): { name, label, description?, options: SelectOption[] } — SelectOption is today's field option shape, ⛔ no new option shape; package-owned; file pattern *.picklist.ts; registered before object in load order; a stack collection like any other metadata (registry row, JSON schema, manifest listing, allowRuntimeCreate per the ADR-0088 rules for authored kinds).
  2. Field reference Field.select({ picklist: 'industry' }), mutually exclusive with options: both on a select type is refused at the schema door with a prescription. (Neither: split to A select / radio field with neither options nor picklist: refuse it at the FieldSchema door (an accept-set narrowing), or keep it at the ADR-0078 completeness gate? (split from #19518) #20827 for the maintainer, seat ruling on this card, because refusing it narrows stored data.)
  3. Server-resolved contract: the field metadata served to clients carries the resolved options (so objectui's renderers, validation and filters are unchanged in phase 1); the spec declares that shape — the resolution itself is the runtime sub-issue.
  4. Translation face: TranslationData.picklists.<name>.{ label?, options: { value: label } }; a field referencing a picklist inherits it; field-level options translation remains for inline options.
  5. Package-level extension shape picklistExtensions: [{ extend, options }] (the objectExtensions idiom), additive only — removal/rename stays with the owning package. The per-organization overlay (ADR-0005, allowOrgOverride) is phase 2 and ⛔ not declared here.
  6. The os CLI compile / validate path accepts the new kind and refuses the two-or-neither case (CLI is domain:cli; if the change lands in packages/cli it is a sibling PR by that seat, filed from this card). Filed as picklist kind: the os CLI compile / validate / lint path accepts *.picklist.ts, picklists and picklistExtensions, and os validate refuses a picklist that names no picklist (Scope 6 of #19518) #20825; the os i18n extract walk rides PR feat(spec): the picklist metadata kind — a shared option list select fields reference by name (#19518) #20823.

Also with this card (Tier H, its own small docs PR, the maintainer merges)

The feature-map line in docs/NORTH-STAR.md 「路上的功能点」 step ② records group — records · 共享选项集:多个对象复用同一份选项,客户按组织追加值而不改应用源码 · records-forms · <the two new item ids> — and the two records-forms checklist items (one picklist, two objects; org A adds a value, A writes it, B is refused; locale switch relabels) authored under docs/qa/platform-checklist/areas/records-forms.json (ADR-0136 D2.4). Until that PR lands the line reads 清单项待写.

Acceptance

Schema tests: the kind parses; picklist + options together refused (neither: #20827); the served field shape carries resolved options; translation keys resolve; check:spec-* families green; changeset minor (new published kind). Not in v1: cascading picklists (per-option visibleWhen / dependsOn exist), unrestricted mode, per-record-type value restriction.

Dedupe words: picklist, global value set, valueSet, shared select options, _picklists.ts, picklistExtensions.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:specpriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions