Skip to content

[Decision] 列表格子里编辑标签:输入文字后回车,是新增一个标签,还是先落到已有标签上? #39626

Done

Description

@objectstack-fleet

repo:objectstack@os-tesla · os-tesla · session_01L9qibwHwLPqS2dsjTpyXhw
Filing gate: category ② (a decision only the maintainer can make) · Source: fleet — reported by PR #39615's Acceptance notes (card #39560): the census found the tags "Add" row leading by its own documented choice and left it open as "a product decision this PR does not take".
Grade: area:ux · Task · p3 (a decision card, so no Bug table row; no measured reach) · reach: people editing a tags cell in a list grid, found by a source census, no user report · read (code on origin/main 3d6d4419 and the test pin inCellFaces-35688.test.tsx:162-179)
Business reason: who — anyone editing a tags field in a list cell; scene — they type a word that a held tag contains, or that differs only in case, and press Enter; without a ruling the product keeps working, but the "free-text row last" census keeps one site undecided and each seat that meets it asks again.
Reader: seat repo:objectstack@os-tesla, zone ot-ux — after the ruling it edits the census row in PR #39615 (or its follow-up) and, for B or C only, claims the one domain:ui build card.
Dedupe: repo:objectstack-ai/objectstack is:issue InCellOptionList → 2 hits (#39560 open: the parent family, RegistryRefField, a different widget and a different harm; #36023 closed: the in-cell rework, no tags rule). repo:objectstack-ai/objectstack is:issue TagsField duplicate → 2 hits, neither on this. repo:objectstack-ai/objectstack is:issue tags "Add" row in:title,body InCell → 0.
Why not gate ①: the family's defect is "Enter stores a name that does not exist". Any string is a valid tag (field-value.zod.ts:145, tags: free-form), the store keeps Red and red as two tags (record-validator.ts:1960-1968), the form face adds the same way (TagsField.tsx:36-41), and the rows listed in the cell are the record's own tags, so "pick the match first" would uncheck a tag. Both orders are defensible; the expectation is a product call, not a reproducible wrong result.

维护者速读

  • 问题:在列表格子里编辑「标签」字段时,只要输入了文字,第一行就是「添加"…"」,回车即新增标签;输入的词是已有标签的一部分、或只差大小写(已有 Urgent 再输 urgent)时也一样,会多出一个新标签。只有标签字段如此;这是代码普查发现的,目前没有用户反馈。
  • 选项:保持现状,并把它登记为有意的例外(产品不改,普查表改一行);输入的词与已有标签只差大小写时不再提供「添加」,表单里同样处理(约 1 个 PR);和其他选择器一样把已有标签排前面、「添加」放最后,但这里列出的全是这条记录自己的标签,回车会变成取消勾选,也就是删掉那个标签(约 1 个 PR)。
  • 推荐:保持现状,因为标签是自由输入、任何词都是合法标签,而列表里只有本条记录已有的标签,把它们排前面会让「输入新词回车」变成误删标签。
  • 不定会怎样:功能照常,没有错误数据;只是「自由输入行必须排最后」的普查里这一处一直标着「待定」,后来的席位还会再问一次。

Served-tier: CONTRACT_REVIEW_TIER
Analysed-by: session_01L9qibwHwLPqS2dsjTpyXhw

Background

PR #36018 (card #35688 S2, merged 2026-11-21 by the seat, not governed, no human review) added the list grid's in-cell option list. Only the tags field hands it an "Add" callback. The developer put the Add row first with a comment giving the reason; the PR's speed-read told the maintainer 「输入新词时第一行是「添加"…"」,回车就加上」. Nobody ruled on it: #35688's one ruling (record 7057128455) is on the date quick pick 「下周」.

PR #39615 (card #39560, open) moves the free-text row last in the registry-reference pickers and adds a census of every free-text row. It lists this row open: "a product decision this PR does not take".

Filing-gate verdict: not a ① defect. The family's harm is "Enter stores a name that does not exist" (#39413). A tags field has no such name: every string is a valid tag, and the store keeps Red and red as two tags. The rows listed are the record's OWN tags, so "pick the match" means uncheck it. Each order serves one intent and hurts the other: a product call.

Governing text

Protocol statement

No option changes what an author can write: Metadata-protocol: none, Clause-②: no for A, B and C. Server-side case-insensitive tag uniqueness would narrow an accept-set: a separate Feature card, not offered.

Premises, each with its re-check (origin/main 3d6d441)

  1. Only the tags field offers "Add". git grep -n "onAdd=" origin/main -- ui/packages/fields/src/widgets | grep -v GridField → TagsField.tsx:58 alone.
  2. Every listed row is a tag this record holds, or held this session; a pick toggles it. git show origin/main:ui/packages/fields/src/widgets/TagsField.tsx | sed -n '23,25p;54,58p'.
  3. Filter ignores case; the Add offer does not. git show origin/main:ui/packages/fields/src/widgets/InCellOptionList.tsx | sed -n '60,64p'.
  4. Typing makes row 0 active, so Enter takes the Add row. Same file, sed -n '72p;122p;81,87p'.
  5. The form agrees: Enter adds the typed text unless the exact-case tag is held. git show origin/main:ui/packages/fields/src/widgets/TagsField.tsx | sed -n '36,41p;95,97p'.
  6. The fixed siblings still OFFER their free-text row by exact-case value; only the order moved. git grep -n "o.value === trimmed" origin/main -- ui/packages/app-shell/src/views/metadata-admin/inspectors/InspectorComboField.tsx → :260; git grep -n "offerTyped =" origin/main -- ui/packages/fields/src/widgets/RegistryRefField.tsx → :691.
  7. No vocabulary: a tags field suggests nothing from other records. git grep -c "options" origin/main -- ui/packages/fields/src/widgets/TagsField.tsx → 1 (the record's own tags).

1. The question in one sentence

When someone types in a list cell's tag editor and presses Enter, should the typed word become a new tag even though a tag the record already has contains it or differs only in case?

2. Options × real cost × effort

What is built What the customer sees Effort
A Keep it; record the exception Nothing in the product. The census row becomes a named exception with its reason. As today: type, Enter, the tag is added. urgent beside Urgent is possible, as in the form. domain:ui · 0 product PRs; one census line (rides PR #39615 or its follow-up)
B A word that differs only in case is not offered Add row hidden when a held tag equals the text ignoring case; the form refuses the same. Partial matches still lead with Add. No Urgent/urgent pairs from the console. Import and API can still write both. Enter on urgent then unchecks the held Urgent unless that too is designed. domain:ui · 1 PR · precedent PR #39615 (+540/−12, 4 files)
C Held tags first, Add last Rank matches first, as the siblings do. Typing vip + Enter on a record tagged vip-customer removes vip-customer. Adding vip needs an arrow key first. domain:ui · 1 PR · precedent PR #39615 (+540/−12, 4 files)

Not offered: a shared tag vocabulary (suggest tags used on other records, pick adds, create last). It is the mainstream shape and a new capability: a Feature card.

3. What each option means in business terms

  • A: a sticky-note pad: a written word sticks; the list is for peeling notes off.
  • B: the pad refuses a word already there in other capitals, in the console only.
  • C: looking a word up tears the nearest note off.

4. The four axes, argued from the business

os-decision-facets

Prior rulings read: tags,combobox,free-text → 4 hits; ADR-0080 Decision §2, ADR-0125 D3, ADR-0145 D2, ADR-0158 Decision §8 (they match the words tags or free-text: JSX tags, release tags, deprecation tombstones, units of measure; by title none is about pickers, bodies not read); thread: none (#39560: 0 rulings of 4 comments; #35688: one ruling, 7057128455, on 「下周」); repo: objectstack-ai/objectstack

5. Recommendation

A. Keep the Add row first for tags, and record it in the census as a named exception with its reason.

  • Not B: half of a rule. The console would refuse urgent beside Urgent while import and API still store both, and it needs a second choice (what Enter does on the held row). Do it once, with the server, when tags get a vocabulary.
  • Not C: the sibling rule guards against storing a name that does not exist. Here it would make Enter delete a held tag.

Self-check: 只看①选 A;②③④ 是否翻转:否。

Confidence gaps: mainstream behaviour is from memory. Nothing was run in a browser; behaviour is read from code and the existing test pin. No usage data for the tags cell editor. Adjacent, not measured: a tags field that declares options gets exact-case membership enforced on the server while both tag faces accept any text; no shipped example declares that shape.

Post-ruling execution

  • A: the seat turns the census row in PR fix(fields): notification topic and channel pickers rank a real match first and the free-text row last #39615 (or its follow-up) from open into a named exception quoting this ruling, and the code comment gains "rows are the record's own tags; a pick unchecks". No product change, no card.
  • B: one Feature card in domain:ui (both tag faces, tests for form and cell); server uniqueness stays out unless ruled.
  • C: one domain:ui card; the PR updates inCellFaces-35688.test.tsx:162-179 and names the reversal.
  • Any letter: a vocabulary-backed tag picker becomes a Feature card only when a named user asks.

Related

#39560, PR #39615, PR #39556 (merged), #39413 item 2, #35688 and PR #36018 (built the row), #36023 (no tags rule).

Activity

  1. added
    needs-user-decision
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibwHwLPqS2dsjTpyXhw

    Ruled: 2026-12-04T11:10Z · A: the tags cell keeps the Add row first (Enter adds the typed tag as a new tag); recorded as a named exception to the in-cell pick-first rule, with its reason: rows are the record's own tags and a pick unchecks.

    • Authority: Tesla (os-tesla), decision card in the project decision thread, tapped 2026-12-04T11:09:46Z, option 「保持现状,登记为有意例外」 on 「在列表格子里输入标签后回车,是新增还是先选已有标签?」.
    • Analysis: this issue's body (Served-tier: CONTRACT_REVIEW_TIER). Freshness: no comment after the analysis.
    • Ruled terms (analysis "Post-ruling execution", A): needs-user-decision → pm:queue. The seat turns the census row in PR fix(fields): notification topic and channel pickers rank a real match first and the free-text row last #39615 (or its follow-up) from open into a named exception quoting this ruling; the code comment gains "rows are the record's own tags; a pick unchecks". No product change, no new card. A vocabulary-backed tag picker becomes a Feature card only when a named user asks.
    • Known residue (analysis gap): a tags field declaring options gets exact-case membership on the server while both tag faces accept any text; not addressed by this ruling.
  3. added
    pm:queue
    and removed
    needs-user-decision
    on Dec 4, 2026
  4. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

    Claim: PM loop round 1
    Session: session_01L9qibzVCaQPuEu6rGmqH8J
    Account: os-tesla
    Branch: claude/issue-39626-tags-add-row-exception
    Worktree: objectstack-issue-39626
    Domain: domain:ui
    Seat: repo:objectstack@os-tesla
    Area: ot-ux
    File surface: ui/packages/fields/src/__tests__/free-text-combobox-census-39560.test.ts, ui/packages/fields/src/widgets/InCellOptionList.tsx (comment only)
    Container & model: XS, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (ruled exception record)
    Thread-read: 7409740998
    Premise: holds (PR #39615 merged at 2026-12-04T12:04Z with the census entry open; the ruling's own terms name "PR #39615 (or its follow-up)")
    Serial constraints cleared: check-handover --inflight on the surface: no overlap read. Only the p2 card #39560's merged census file is touched.
    Pre-claim lane: domain:ui — both files under ui/**.
    Pre-claim deps: PR #39615 merged.
    Prior rulings read: ruling 7409740998 (A), ruled terms verbatim: "The seat turns the census row in PR #39615 (or its follow-up) from open into a named exception quoting this ruling; the code comment gains "rows are the record's own tags; a pick unchecks". No product change, no new card."
    p3 note: this p3 is taken only as the ruled follow-up of p2 #39560's PR (same census file), which the ruling assigns to the seat.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 4, 2026
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J
    os-dev-report

    {
     "issue": 39626,
     "status": "done",
     "branch": "claude/issue-39626-tags-add-row-exception",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/39673",
     "session": "session_01L9qibzVCaQPuEu6rGmqH8J",
     "premise_still_valid": true,
     "summary": "Ruled follow-up of PR #39615 (record 7409740998, option A). Branch cut from origin/main a92f1ed9, after PR #39615 merged as c0724ea8. Commit f90ea8aa cherry-picked cleanly as f9507ac1. In the census test, the InCellOptionList entry changes from 'open' to a named exception: its ruling field quotes the ruling verbatim, and its reason is \"rows are the record's own tags; a pick unchecks\". The 'open' kind is removed. A new case requires an exception site to still lead with its free-text row and its source to carry the ruled reason word for word. InCellOptionList.tsx gets a comment only, with no code change. No changeset: a comment is in the skip-changeset fast lane and the test file is not published; skip-changeset was set on the PR in the same create.",
     "tests": "Census at f9507ac1: 'Tests 11 passed (11)'. Ablations on the identical diff (f90ea8aa), each in the worktree only, restored, status clean afterwards: (1) removing the reason from the comment gives 1 failed | 10 passed, failing the exception case; (2) changing the entry to 'last' gives 1 failed | 10 passed, failing the order case; (3) deleting the entry gives 1 failed | 9 passed, failing the set-equality case. @object-ui/fields type-check (tsc --noEmit && tsc -p tsconfig.test.json) exits 0 at f9507ac1, VERDICT command-exit 0. ESLint on both files: exit 0.",
     "gates": "dispatch-gates --commands at f9507ac1 derived 27 commands; 26 ran and all exited 0. They include pnpm --dir ui exec vitest run scripts/ (172 passed, 2 skipped files) and check-comment-mask-corpus (25087 files, 0 disagree). check-comment-mask-corpus timed out at 120 s and 170 s and passed at 420 s. NOT-MEASURED: pnpm check:query-options-erasure, timed out at 270 s; CI runs it. --ran: '27 derived, 26 run, 1 NOT-MEASURED, 0 UNRUN'. overlap-check: 'VERDICT clean exit 0' (origin/main f7c60e5b, 0 PR heads).",
     "mcp_calls": "0",
     "api_writes": "2 relay strokes: (1) pr_create -> POST /repos/objectstack-ai/objectstack/pulls (draft) + POST issues/39673/assignees [os-tesla] + POST issues/39673/labels [skip-changeset]; read-back 3923 bytes identical; (2) this os-dev-report -> POST /repos/objectstack-ai/objectstack/issues/39626/comments. git push not counted.",
     "classifier_refusals": [],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "line_budget": "57 changed lines (+45 / -12), 2 files",
     "files_changed": [
      "ui/packages/fields/src/__tests__/free-text-combobox-census-39560.test.ts",
      "ui/packages/fields/src/widgets/InCellOptionList.tsx"
     ],
     "deviations": "The ablations were measured on f90ea8aa before the cherry-pick; f9507ac1 carries the same diff. The probe push to the new branch carried this commit, because dev-worktree --probe ran before the cherry-pick and the WIP push came after it. The old worktree /home/user/objectstack-issue-39560 was removed after this report."
    }
  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-tesla · os-tesla · session_01L9qibzVCaQPuEu6rGmqH8J

    2026-12-04T13:36Z · Delivered: PR #39673 merged (91d29c3); Fixes #39626 closed this card. Ruling 7409740998 is executed: the tags cell keeps its behaviour and is pinned as a named exception. pm:dispatched removed. Nothing remains on this card.

  8. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions