Skip to content

feat(fields): the line-item grid's select and date cells open their panel under the cell (#36023 S5) - #36039

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-95eop8
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-95eop8

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

repo:objectstack#1 · os-sales · session_01L6bhgXrmZgxib5C1kX7vnD

Part of #36023 (slice S5: the form's line-item grid. S3 and S4 change the list grid in their own pull requests; Fixes #36023 goes on whichever of S4/S5 lands last.)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 表单里的明细表照旧「点格子就打字」,回车仍是下移、最后一行回车加一行(Sales 09:40Z 裁定写明明细表不跟主列表的回车改动)。
  • 单选格:格子里显示选项文字;点一下、回车、空格或直接打一个字,就在格子下面弹出可搜索的选项列表(打的那个字直接当搜索词),选一项即填好并收起。Esc 收起不改。
  • 日期、日期时间格:格子里仍是原来的输入框,可以直接键入数字,录单速度不变;进入格子就在下面弹出日历,底部有「今天、明天、下周、清空」,点一天即填好,焦点留在格子里。日期时间改日子时保留原来的时刻。
  • 文字格:内容比列宽时,聚焦期间输入框向右浮在旁边格子上面,不挤列宽。
  • Esc:只撤回这一格这次的改动(整行回到进格子时的样子),不会把表单所在的对话框关掉、丢掉整张表。弹出面板开着时,Esc 只收面板。
  • 「不存在的日子」的红字说明不再画在格子下面撑高行,改在日历顶部和格子的悬停提示里(读屏仍读得到)。
  • 行高在所有情况下不变。关联记录格这次没动,等 S3 的关联可搜索列表合入后再接。

What changes

ui/packages/fields/src/widgets/ only:

  • New gridCellPanels.tsx (not on the package entry):
    • GridSelectCell — a flat role="combobox" button showing the option label; a click, Enter, Space, F2, Alt+ArrowDown or a typed character opens a Radix popover under the cell (align="start", at least the cell's width) holding the existing InCellOptionList. A pick calls the grid's setCell and closes; Esc is the popover's (closes, writes nothing); Tab inside the panel closes it and focuses the next tabbable control in the table (the panel is portaled out of the table, so the browser's own order would leave it). ArrowUp/ArrowDown on the closed cell go to the grid's line navigation, as from an input.
    • GridDateCell — the native date / datetime-local input stays in the cell (the browser's own picker button is hidden) and is the popover's trigger; the calendar opens on focus or click with onOpenAutoFocus prevented, so the caret stays in the cell and typing is unchanged. A day or quick pick (Today, Tomorrow, Next week = today + 7, ruling of record 7057128455, Clear) writes the native-shaped value through the grid's setCell (so datetime still goes through fromDateTimeInputValue), keeps a date-time's HH:mm, closes, and hands the focus back to the cell in onCloseAutoFocus (react-day-picker focuses the clicked day after onSelect, so a refocus inside the pick handler was lost). Leaving the cell closes the calendar unless the focus went into it.
    • GrowingCellInput — a text cell's input: while focused and scrollWidth exceeds the cell, it is drawn absolutely over the neighbours, up to the grid's scroll box (data-line-items-scroll), with a spacer holding the cell's height. Its width is a measured value, the one inline style.
  • GridField.tsx: select → GridSelectCell (replaces the Radix Select); date / datetime → GridDateCell; text → GrowingCellInput; number / currency / time keep their inputs. The cell control class is shared as GRID_CELL_CONTROL_CLASS (same utilities as before). The impossible-day notice keeps its element, id, test id and aria-describedby link, now sr-only in the cell, and is drawn visibly at the top of the calendar and as the cell's title.
  • Esc (GridField.tsx): entering a cell snapshots its line (onFocus on the table, keyed by the new data-grid-cell="row:column" on each td; a move into the cell's own portaled panel is still the same visit). A window capture-phase keydown listener, mounted only on an editable grid, takes an Esc whose target is inside a cell: if the cell holds an open panel (aria-expanded="true") it lets the panel have it; otherwise it stops the event and, if the line changed since the cell was entered, puts the snapshot back (its untouched-new-line mark and any lookup autofill included). The capture phase on window is what runs ahead of a Radix Dialog's own document-level Escape listener, so Esc in a cell never closes the dialog the form is open in. The snapshot is held by line index, so adding, removing, duplicating or moving a line ends the visit (the row's Delete / Duplicate buttons sit inside the table, so focus on them would otherwise keep it), and the line count kept with the snapshot refuses a restore after a host replaced the lines (L1-b M1, 7061619015).
  • InCellOptionList.tsx: one optional prop, initialQuery, the search text the list opens with (the active row starts on the first match). Not on the package entry; the list grid's callers pass nothing and are unchanged.

Docs: ui/packages/fields/README.md (Cell panels in line-item grids) and content/docs/frontend/plugins/plugin-form.mdx (Editing in the line-item grid). Changeset .changeset/36023-line-grid-cell-panels.md (@object-ui/fields patch).

Why

Card #36023 item 8 asks the form's line-item grid to follow the same cell-edit rules as the list. The seat's claim (comment 7060659968, plan A, after a review of the A/B fork) reads that for this grid as the look and the panel types, not select-first editing: the line grid is a typing-first data-entry grid, and Sales' 09:40Z ruling (comment 7060745834) keeps its Enter as move down / add a line. So: panels under the cell for the choice types, the row's height never changes, long text floats right, and Esc takes back only the cell.

Clause-② measured no (the claim expected yes): no export of @object-ui/fields changes (gridCellPanels.tsx is not on the entry, and InCellOptionList's new initialQuery prop is not on the entry either; GridFieldProps is unchanged), no i18n key is added (the panel reuses fields.datePicker.*), and nothing a metadata author writes changes.

Verification

  • New top-level describe('cell faces that open under the cell (objectstack#36023)') in GridField.test.tsx (14 cases): select label shown; click opens the panel, the cell keeps its label, typing filters, a pick writes and closes; a typed letter opens with that search and Enter picks the match; Esc in the list writes nothing; Tab in the list moves to the next cell; ArrowDown on a closed select cell moves lines; the date cell stays type="date", opens its calendar on focus and still takes typed values; a calendar day writes, closes and keeps the focus in the cell; Clear and Today; a date-time day keeps 09:45; Enter in a date cell still moves down; Esc takes back the cell and only that line; Esc keeps a new line's untouched mark; inside a Radix Dialog, Esc in a cell (twice) never calls onOpenChange and an open calendar takes the Esc itself; CONTROL: Esc on a control outside the grid still closes the dialog. After L1-b's M1 (fbbaaa9): no stale line is written after the visited line is removed by its own button, after a line above is removed, or after a line above is duplicated, each followed by a return to the same cell and Esc; a new visit after the change still takes back its own edit; and in a date cell the first Esc closes the calendar and the second takes back the typed day. Without the fix the four structure cases fail (measured).
  • At fbbaaa9: GridField.test.tsx 90 passed; the 160 test files under ui/ naming GridField, LineItemsField, line-items, MasterDetailForm, LineItemsPanel or RecordBodyTableEditor 3,553 passed, 0 failed; tsc --noEmit -p packages/fields clean; no lint warning on a changed line.
  • Local runs on the code of de846e7e (the two later commits are docs and the changeset): GridField.test.tsx 85 passed; every test file under ui/ that names GridField, LineItemsField, line-items, MasterDetailForm, LineItemsPanel or RecordBodyTableEditor (140 files) 3,325 passed, 0 failed; the existing date suites (GridField.*, DateField.impossibleDay-10567, DateTimeField.impossibleDay-10474, complex-widgets, display-grid-host-channels-e2e) 325 passed. tsc --noEmit -p packages/fields clean. ESLint: no errors on the four touched files; no warning on an added line.
  • Browser, 2026-11-21 10:15–10:35Z, showcase on this branch, Chromium at 1280 and 375 (full record in the seat's build-seat1/36023/S5/evidence.md, screenshots beside it):
    • Record page edit state (Expense Report → Expense Lines): a select cell's panel opens at the cell's bottom edge (top 437 / cell bottom 438 at 1280; at 375 it shifts left to stay on screen); Esc with the panel open closes only the panel and the page stays in edit; typing ap then Enter on Line Status picks Approved; the date-time calendar opens under the cell (above it at 375, no room below), Tomorrow moves 11-19T08:05 to 11-22T08:05 and the focus stays in the cell; a long Merchant floats to 509px over a 180px cell, shown from its first letter (at 375 capped at the grid's box); Esc in that cell puts back "Hilton Garden Inn" and keeps the other line's change; Enter on the last line still adds a line (2 → 3).
    • Form (Create Expense Report dialog): Esc in a typed cell empties it and the dialog stays open; Tab from Merchant reaches the Category cell, Enter opens it, ArrowDown + Enter picks; Esc after the pick puts back the default (Other) only; the date-time cell takes 11202026 / 0930A from the keyboard with the calendar open (2026-11-20T09:30). Same at 375.
    • Studio draws no line-item grid: Data → Records, Form (Layout and Preview) and Add record hold no [data-line-items-scroll], and outside fields/ the grid is reached only from the record page (RecordDetailView / recordEditState) and MasterDetailForm. Studio's metadata repeater with widget: 'grid' is SchemaForm's own table and is not touched here.
    • The first read, on the packaged build of f46f745, found two faults, fixed in 99536b0: the floated text kept the narrow cell's scroll (first letters clipped), and the calendar sat left in a panel the shortcut row widened. GrowingCellInput now measures the text at zero width, adds the far padding and borders, tops up once what still overflows, and resets the scroll when it all fits.

Acceptance notes

  • Lookup cells are unchanged in this pull request: their searchable-list face is S3's LookupField work; this grid picks it up after S3 lands.
  • Time cells keep the browser's own control (already flat and typed into); the card's acceptance list names no time-cell panel.
  • Column types: the spec's InlineGridColumnSchema.type has nine values, so the card's checkbox, rating, multi-select, tags, people, colour, long text, address and rich text faces do not exist in this grid. Adding them is a contract change and a separate card (seat).
  • Esc on an unchanged cell is also kept from the dialog: leaving a form dialog by keyboard is Esc from outside the grid or the dialog's close button.

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.
  • 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 维护者速读 block is the maintainer's summary, in the maintainer's language).
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD

@objectstack-fleet
objectstack-fleet Bot requested a review from os-sales November 21, 2026 09:58
@github-actions github-actions Bot added size/l 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 Nov 21, 2026
…the day panel (#36023 S5)

Measured in the running Console: the floated text input kept the scroll the
narrow cell needed, so the first characters stayed clipped, and the calendar
sat left in a panel the shortcut row widened.

Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD
Co-authored-by: Claude <noreply@anthropic.com>
The Radix Select trigger this cell replaces drew focus:ring-ring/60, a themed
utility the published fields stylesheet pins as one it produces.

Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — REWORK (L1-b)

Head-sha: 56c5e51 · read 2026-11-21T11:01Z · 7 files +833/−66 · checks at this head: 53 success · 12 expected skip · 0 failed · 0 pending · l1-face CLEAN (13 items)

维护者速读: 这一刀把表单里明细表格的下拉格、日期格改成"在格子下面弹面板",长文本格输入时向右浮出,Esc 撤回本格这次的修改且不再关掉外层对话框——方向和 Sales 09:40Z 的裁决一致(Esc 一律撤回,明细表 Enter 仍是下移/新增行)。但有一处会丢数据:Esc 撤回时按"第几行"记住旧行,删掉或拖动行之后再回到同一位置的格子按 Esc,会把已删掉的那行写回来、顶掉现在那一行。用户看到的是:本想"取消",结果一行明细被另一行(甚至已删除的行)覆盖。需要修一下再合并,改动很小(行结构变化时丢掉记住的快照,加一个测试)。

Must-fix

M1 — Esc restores a stale line after a line is removed, moved or duplicated above it. GridField.tsx:1187-1227: the visit snapshot is { key: "rowIdx:col", rowIdx, row }, taken on the first focus of that key; onGridBlur keeps it while focus moves to anything inside the table (the row's own Duplicate / Delete buttons included) and onGridFocus keeps it when focus returns to the same key. Rows are keyed by index (<tr key={rowIdx}>, line 1717), and removeRow / moveRow / duplicateRow (lines 1229-1265) never touch cellVisit. Read from the code (not run here), lines A, B, C:

  1. Focus B's last cell (1:amount), visit = {1:amount, B}.
  2. Tab to B's Delete button (inside the table → visit kept), Enter → rows [A, C]. The row-1 <tr> and its button are reused, so focus stays on it.
  3. Shift-Tab back to 1:amount, which now draws C: same key → visit kept, still holding B.
  4. Esc: current[1] (C) !== B → emit([A, B]). C is gone and the deleted B is back, written as a normal change.

The mouse path is the same in Chrome (a clicked button takes focus): edit 1:x, click A's Delete, click 1:x again (now the old C… or B shifted up), Esc → the line at index 1 is overwritten by the snapshot of a different line. Drag-reorder (moveRow) and Duplicate on an earlier line shift indices the same way. Esc is the key a user presses to not change anything, so this is silent data loss.

Fix, either is enough: drop the visit in every structure change (cellVisit.current = null in removeRow, moveRow, duplicateRow, addRow), and/or guard the restore on the snapshot still being where it was (store rows.length with the visit and refuse when it differs). Please add a test: two or three lines, focus line 1's cell, remove line 0 (or line 1 by its button), return to the same key, Esc → no onChange carrying the stale line.

Should-fix

S1 — the user-facing sentence says "that cell"; the code puts the whole line back. The changeset title says "Esc in a cell takes back only that cell" and plugin-form.mdx says "Esc in a cell takes back what you changed in that cell". The code (and README.md, and the code comment) restores the whole line as it was on entry, other cells included (a lookup pick's autofill). Align the changeset title and the mdx sentence with the README ("puts the line back as it was when the cell was entered"); the changeset's own bullet already says it right.

Nits

  • N1 — a date / date-time cell opens its calendar on every arrival, so Esc there always takes two presses (first closes the calendar, second takes back). That follows from "a cell whose panel is open hands Esc to the panel", but no test pins the second press in a date cell; one line in the Esc in a cell block would.

Checked

  • Esc listener: window capture, skips defaultPrevented and IME keys, hands Esc to an open panel by [aria-expanded="true"] inside the cell (the date input is itself the PopoverTrigger, so it matches); the select list's search box is portaled, so cellKeyOf is null there and Radix closes the list. Only mounted when editable (not readonly / list). Matches ruling 7060745834 (Esc always discards; line grid keeps Enter).
  • GridSelectCell: the child onClick preventDefault stops the trigger's own toggle (Slot runs the child handler first, the trigger's composed handler checks defaultPrevented); typed character opens with initialQuery, InCellOptionList starts active at 0 when a query is present; Tab in the panel moves to neighbourTabbable; pick / Esc return focus to the trigger. focus:ring-1 focus:ring-ring/60 matches the SelectTrigger it replaces.
  • GridDateCell: open on focus, onOpenAutoFocus prevented so the caret stays in the native input, onCloseAutoFocus refocuses only after a pick (refocus) with quietFocus so it does not reopen; blur into the panel keeps it open (Radix content is a tabIndex=-1 box, so a click on a day lands focus inside the panel); datetime keeps HH:mm (00:00 when none). Impossible-day text moves to the panel, the title and an sr-only aria-describedby span; the stored value is still not written until a pick.
  • GrowingCellInput: measures only while focused, at zero width, bounded by [data-line-items-scroll]'s right edge; one top-up pass, scrollLeft = 0 once nothing overflows; spacer holds the row height; width cleared on blur.
  • Inlined toLocalDay / fromLocalDay keep ./date-picker/ out of the eager closure (comment says why).
  • Shape: draft, Part of #36023 (S4/S5 last carries Fixes), one changeset @object-ui/fields patch, Clause-②: no · Metadata-protocol: none; no files outside the slice.

Owed

 S5)

L1-b M1 (7061619015): the Esc snapshot is held by line index, and focus on
the row's own Delete / Duplicate buttons kept the visit. After a line was
removed, duplicated or moved, Esc back in the same cell wrote the removed or
shifted line over the one now at that index. Adding, removing, duplicating
or moving a line now ends the visit, and the line count kept with the
snapshot refuses a restore after a host replaced the lines.

Tests: removed by its own button, a line above removed, a line above
duplicated, a new visit after the change still takes back; the second Esc in
a date cell (N1). The four structure cases fail without the fix. The
changeset title and plugin-form.mdx now say the line is put back (S1).

Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — delta ACCEPT (L1-b)

Head-sha: fbbaaa9 (one commit on 56c5e51, 5 files +87/−6) · read 2026-11-21T11:13Z · prior record REWORK 7061619015 · CI at this head still running when read; this ACCEPT holds on green

维护者速读: 上次指出的丢数据问题已修好:现在只要增加、删除、复制或拖动明细行,Esc 记住的旧行就作废,回到格子再按 Esc 不会把删掉的行写回来;另外还核对行数作为第二道保险。文档措辞也改成了"整行回到进格子时的样子",和实际行为一致。无新问题,CI 绿后本审读即为终审。

M1 — resolved

  • cellVisit is set to null in addRow, removeRow, duplicateRow and moveRow (declared above addRow so the callback can reach it); the snapshot now carries count, and the restore refuses when visit.count !== current.length, which covers a host that replaces the lines itself.
  • Walked the reported path again: B's last cell, Tab to Delete, Enter (visit cleared), Shift-Tab back (onGridFocus sees no visit and takes a fresh snapshot of C), Esc does nothing. Clicking the drag handle moves focus out of the input with no related target, so the visit was already cleared on that path.
  • Tests: it.each over removing the visited line by its own button, removing the line above, and duplicating the line above. Each returns to the same key, presses Esc, and expects no new onChange and the same lines. A further test shows a new visit after the change still takes back its own edit. The thread reports these four fail with the fix removed (its reading, not repeated here).

S1 — resolved

The changeset title and plugin-form.mdx now say the line goes back to how it was when the cell was entered, lookup fill-ins included. The mdx and the README add that a line change ends the visit.

N1 — resolved

A date cell test now shows that the first Esc closes the calendar and keeps the typed day, and the second Esc takes the day back to the stored 2026-06-17.

Checked

  • The delta touches only the five files above. No change to the panels, the Esc listener's routing, the changeset frontmatter or the declarations (Clause-②: no · Metadata-protocol: none). The relation is still Part of #36023.

Owed

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T11:33Z · Slice S5 of #36023 (claim 7060659968): the form's line-item table (GridField) keeps direct typing and gains the cell-edit pop-ups of the main list. Select, date, datetime and time open the in-cell panels under the cell and commit on pick; the date cell keeps keyboard entry; long text floats right while focused; Esc discards only that cell's change and never closes the dialog or leaves edit mode; the "date does not exist" line is a popover under the cell, so the row no longer grows. Enter keeps moving down and adds a row at the last row (the maintainer's Enter ruling 7060745834 is for the main list only). Lookup follows S3. Clause-②: no, measured (the claim expected yes): no @object-ui/fields entry export changes; no L2 owed. L1-b REWORK 7061619015 (Esc wrote back a stale line after a line was removed, moved or copied), fixed on fbbaaa99, delta ACCEPT 7061752192, final on this green head. check-governed-merges --pr 36039 reads NOT governed (+914/−66). landing-k was not needed: the seat read K by hand, 9 since the merge base, under 15, and main since then touches neither translations/ nor skills/. On this head, 53 check-runs are success, 12 are skipped and none failed; mergeable clean. Browser evidence covers the record page edit state and the create dialog at 1280 and 375; Studio draws no line-item table, so it has nothing to measure. People and multi-select columns that fold to text boxes cannot store bad values (the server refuses them); their usability is card #36043. The seat readies this PR and arms auto-merge in the same step. The PR carries Part of #36023; Fixes #36023 goes on S4 (#36054), which lands after it.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 11:33
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44899740254 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Build & E2E UI — 失败步骤: check:eager-closure — weigh the Console's eager closure against its budget(日志不可读,点进 job 看)

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • ⚠️ 本次没有可用的聚合签名(日志里没有能解析出测试文件名的 FAIL 行)—— 这不是「没有同签名的其他 PR」,是这一轮没测到。跨 PR 聚合本次不可用,请手工比对其他 PR 的同类评论。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 2 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — merge-only ACCEPT (L1-b)

Head-sha b6d0929 · read 2026-11-21T15:09Z · follows delta ACCEPT 7061752192 @fbbaaa99 · merge of fbbaaa99 (this branch, unchanged) and main 1586ddec (with S3 #36045, S4 #36054 and the budget #36100) · CI still running at read time. This L1 is final on this head once CI is green.

维护者速读

这次只是把最新 main 合进 S5(表单明细行在格子里直接编辑)。没有冲突,PR 自己的改动逐行不变。main 这边和 S5 唯一碰到同一个文件的是选项列表组件:S4 只改了一句注释,S5 加了“打字直接开始搜索”的参数,两者在不同位置,自动合并后都在。首屏包预算 #36100 已经在 main 里,所以 S5 合进来不会再被预算线挡住。

Must-fix / Should-fix

None.

Nits

  • N1 (comment only, optional): the shared doc comment on InCellOptionList now reads "Enter goes on to the grid, which commits and stays on the cell" (S4's wording). With S5, the line-item grid is a second consumer, and its own cell Enter moves down (GridField.tsx onCellKeyDown). If the two grids differ there, "the list grid stays on the cell" would keep the sentence true for both. This is not a merge defect.

Checked

  • Merge. git merge-tree --write-tree fbbaaa99 1586ddec gives dafdca6a, which is the head's tree. It is a clean, unedited merge with no conflicts.
  • Net diff. git diff --stat from the old base c00be39b to fbbaaa99 is identical to 1586ddec..b6d09292: 7 files, +914/−66, and the +/- lines match line for line. The PR's own content is unchanged.
  • Overlap with main. Only ui/packages/fields/src/widgets/InCellOptionList.tsx is touched on both sides.
    • S4 changes one doc-comment sentence (lines 27-28).
    • S5 adds initialQuery: a doc bullet, the prop, useState(initialQuery ?? '') and the active-row initialiser.
    • The hunks are disjoint and both are present at the head.
    • Also, fields/src/index.tsx changed on main (S3), and S5 doesn't touch it.
  • Budget. main now carries chore(ui): raise the eager ui-components ceiling by 8,000 bytes on maintainer ruling #36100's 355,000 ceiling. The thread's local check:eager-closure reads ui-components 342.0 KB / 346.7 KB, exit 0. CI's own build on the merge ref is the figure in force.

Owed

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T15:33Z · Slice S5 of #36023 (claim 7060659968): the form's line-item table (GridField) keeps direct typing and gains the cell-edit pop-ups of the main list. Select, date, datetime and time open the in-cell panels under the cell and commit on pick; the date cell keeps keyboard entry; long text floats right while focused; Esc discards only that cell's change and never closes the dialog or leaves edit mode; the "date does not exist" line is a popover under the cell, so the row no longer grows. Enter keeps moving down and adds a row at the last row (the maintainer's Enter ruling 7060745834 is for the main list only). Lookup follows S3. Clause-②: no, measured (the claim expected yes): no @object-ui/fields entry export changes; no L2 owed. L1-b REWORK 7061619015 (Esc wrote back a stale line after a line was removed, moved or copied), fixed on fbbaaa99, delta ACCEPT 7061752192; after the merge of main to b6d09292 the L1-b merge-only reading 7064665909 is final on this green head. check-governed-merges --pr 36039 reads NOT governed (+914/−66). landing-k was not needed: the seat read K by hand, 6 since the merge base, under 15, and main since then touches neither translations/ nor skills/. On this head, 51 check-runs are success, 10 are skipped and none failed; mergeable clean. Browser evidence covers the record page edit state and the create dialog at 1280 and 375; Studio draws no line-item table, so it has nothing to measure. People and multi-select columns that fold to text boxes cannot store bad values (the server refuses them); their usability is card #36043. The seat readies this PR and arms auto-merge in the same step. The PR carries Part of #36023; Fixes #36023 goes on S4 (#36054), which lands after it.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 15b7f51 Nov 21, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-95eop8 branch November 21, 2026 15:54
os-sales pushed a commit that referenced this pull request Nov 21, 2026
Resolves the GridField import block against #36039 (S5): keeps S5's
gridCellPanels import and the shared isImeKey import; the IME guard stays
the first line of onCellKeyDown.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…save refused on placed lines marks their tab (objectstack-ai#36088)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVwX4pUdM1qvNLSqRZNSvv3)_

Fixes objectstack-ai#36019

Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable key and no behaviour a skill teaches
moves
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv

## 维护者速读

-
用户能看到什么变化:在“表头加明细”的录入表单里,明细表放在某个字段分组处时,展开一行明细编辑不再在开发控制台报“表单嵌套表单”的警告;分页签的表单里,保存被服务器以某一行明细为由拒绝时,明细所在的页签会像表头字段出错时一样标红点。
- 为什么做:这是“明细表放在字段分组处”那项工作(主从表单布局)评审时留下的两条收尾意见,补上明细出错时用户找不到原因的缺口。
- 出错会怎样:最坏情况是明细页签该标红没标、或多标了一个页签,保存本身照旧被拒、数据不会写错;整个改动可直接撤回。
- 要你做什么:无

## What changes

1. **Row editor in a placed slot (N2 of the L2 record on objectstack-ai#36009).**
`FormSlotPlacement` takes `ownsForm`: when its children already are a
form of their own, it portals them into the slot with no wrapper form.
The expanded row editor (an `ObjectForm`, its only other control a
`type="button"`) is placed with `ownsForm`, so its form is no longer a
React child of the slot's wrapper form, and React's DOM-nesting check
stops logging "form cannot be a descendant of form". This is the
measured S2 patch, re-applied on main (`git apply --check` clean,
offsets +24/+78).
2. **Tab marker for a refused line (N3 of the L2 record, L1-c's nit).**
A batch refusal is attributed to the placed collections it was refused
on, using the same evidence the record page's
`attributeRecordEditRefusal` reads: the operation the server names in
`details.failedOperation.index` when it names one (a line's operation,
never operation 0, the parent), else each field in `fields[]` that only
line operations write. A field the parent operation carries stays the
header form's to mark. `FormSlotStore` records those collection ids
(`refuse(ids)`, cleared when the next save gets past validation, as the
renderer clears its own markers). `TabbedForm` subscribes to the store
and rebuilds its slot rows, each carrying `slotRefused` when its
collection was refused. The form renderer's `erroredFieldTabs` marks the
tab of a refused slot row with the treatment a refused header field gets
(`data-error`, destructive text, the dot).

No export, prop or i18n key is added. `FormSlotHost` and `FormSlotRow`
live in `formSlots.ts`, which `@object-ui/plugin-form` does not export.
The renderer reads `slotRefused` off a `form-slot` row the same way it
reads `slotRef`: a key only a host can produce.

## Tests

- `MasterDetailForm.groupPlacement-35889.test.tsx`, existing describe:
an expanded row editor opens in the slot beside its collection, its
inputs are owned by its own form, and no nesting warning is logged.
- Same file, new top-level describe (a refused save marks the tab of the
placed lines it was refused on): a field only a line writes marks the
lines tab and not the header tab; a server-named failed line operation
marks the lines tab; control: a refusal on the header's own field marks
its tab and leaves the lines tab unmarked.
- `formSlots.test.ts`: `refuse` marks the slot row until retired,
de-duplicates, and an equal refusal emits nothing.

All readings at head `9ac514e3`.

<details><summary>Suites and type-check</summary>

- `pnpm exec vitest run --maxWorkers=2 packages/plugin-form/
packages/components/src/renderers/form/` (from `ui/`, under the verify
lock): `Test Files 332 passed (332)`, `Tests 3359 passed | 18 skipped
(3377)`, `VERDICT command-exit 0`.
- `pnpm --filter @object-ui/plugin-form --filter @object-ui/components
run type-check` (both run `tsc --noEmit && tsc -p tsconfig.test.json`):
`VERDICT command-exit 0`.
- `eslint` over the six changed source and test files: 0 errors (106
warnings, all on lines this diff does not touch).

</details>

<details><summary>Ablations (one per fix, through
`scripts/ablation-replace.mjs`, restore proven)</summary>

- Fix 1: `ownsForm` removed from the row editor's placement (anchor 1 to
0, blob `632b58a14b7d` to `f73ce79e3a8b`). The nesting pin goes red with
React's own message, "In HTML, a FORM cannot be a descendant of a FORM"
(its DOM-nesting check); `Tests 1 failed | 10 passed (11)`. Restored:
blob equals HEAD (`632b58a14b7d`), `git diff HEAD` empty. This mutation
is the code on `main`, so the pin fails on `main` and passes with the
fix.
- Fix 2: the `slotStore.refuse(...)` call in `sendBatch`'s catch deleted
(anchor 1 to 0, blob to `2e2969a6db0b`). Both tab pins go red, and the
control (a header-field refusal) stays green; `Tests 2 failed | 9 passed
(11)`. Restored: blob equals HEAD, `git diff HEAD` empty.

</details>

<details><summary>Derived gate families</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 38 commands. Every one exited 0. `--ran`
reconciliation: "38 derived famil(ies) accounted for — 38 run, 0
NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code and none of
them is 3)". The type-check lanes, artifact rosters and wide-population
families are CI's.

</details>

<details><summary>Overlap</summary>

`node scripts/pm/overlap-check.mjs --branch=HEAD --pr=36039,36054`:
origin/main, objectstack-ai#36039 and objectstack-ai#36054 each merge cleanly, `VERDICT clean exit
0`.

</details>

## Acceptance notes

- The marker is the whole of the header-field treatment that applies
here. A refused header field also activates its tab and focuses the
field; a refused line does not switch tabs, because the renderer's catch
runs before the host's refusal reaches the tab rows, and the lines show
no per-row reason today (the master-detail form shows the refusal as the
form's banner, as before). The acceptance names the marker only.
- A refusal that names neither a failed operation nor a field (a lock, a
permission denial) is on no collection, and marks nothing, as before.
- File surface beyond the claim's wording: the tab marker is drawn by
the form renderer
(`ui/packages/components/src/renderers/form/form.tsx`), not by
`TabbedForm`, and the refusal travels through `formSlots.ts`. Both are
named here.
- The editor's form still sits inside the header's form in the DOM (the
slot element is inside it), as the lines' wrapper form already did;
ownership is answered by the innermost form, which the pin asserts.

## Verification

Two-minute check: `pnpm --dir ui exec vitest run --maxWorkers=2
packages/plugin-form/src/MasterDetailForm.groupPlacement-35889.test.tsx`:
expect 11 tests passed.

Read first: (1) `MasterDetailForm.tsx` `refusedChildObjects` and its
call in `sendBatch` (which refusals count as a line's); (2) `form.tsx`
`erroredFieldTabs` (the renderer's new read); (3) `TabbedForm.tsx` the
`useSyncExternalStore` on the slot host.

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…intainer ruling (objectstack-ai#36100)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuWrubarDyy1TAMVqK1ZWbAY)_

repo:objectstack#1 · os-sales · session_01L6bhgWSAwkSz6F3eit2Y9u

Refs objectstack-ai#36023

Area: b1-L · budget-only, no card of its own. **Authorisation:
maintainer ruling 7063116595 on objectstack-ai#36023** (option B on the seat's
decision card, chosen 2026-11-21T13:12Z: raise the eager `ui-components`
budget by about 8 KB, with headroom, in its own budget-only PR).

## What changes

One file, `ui/scripts/check-eager-closure-budget.mjs`, constants and
their comments only:

| constant | before | after |
|---|---:|---:|
| `PER_CHUNK_GZIP_CEILINGS['ui-components']` | 347,000 | 355,000 |
| `PER_CHUNK_BASELINE['ui-components']` | 265,937 | 273,937 |

The ceiling and its baseline move together by the same +8,000, which
keeps the ceiling-minus-baseline gap (81,063) the way objectstack#28124
did for `i18n-locale-en`. A dated "⚠️ RAISED ... ON EXPLICIT MAINTAINER
RULING" entry on the key carries the rows below and what the bytes buy.
No code change, objectstack-ai#36039 is not touched, no exemption added, no import
made lazy. Not moved: `MAX_EAGER_CLOSURE_GZIP_BYTES`, `BASELINE`,
`REGRESSION_THIS_GATE_MUST_CATCH_BYTES`, the other three per-chunk rows.

## Why

`main` sits 104 bytes under the old line, so S5 objectstack-ai#36039 (the form's
line-item grid cells) is ejected from the merge queue on it, and so
would the next form-field PR be.

### The rows (one container, one instrument)

`CI=true pnpm exec turbo run build --filter=@object-ui/console...`,
reading `apps/console/dist/eager-closure.json`, twice on one tree:
`main` at `78f7160e` alone, then that `main` with objectstack-ai#36039's head
`fbbaaa99` merged in (`a31a993e`, local, not pushed). Gzipped bytes:

| chunk | `78f7160e` | `a31a993e` | delta |
|---|---:|---:|---:|
| `vendor-objectstack` | 671,638 | 671,638 | 0 |
| `i18n-locale-en` | 65,749 | 65,749 | 0 |
| `framework` | 88,339 | 88,339 | 0 |
| `ui-components` | 346,896 | 349,448 | **+2,552** |
| aggregate | 2,028,610 | 2,031,144 | +2,534 |

The same 104 eager chunks by name in both builds; besides
`ui-components` only `src` moved by more than 4 bytes (+19). Raw
minified `ui-components`: 1,292,123 -> 1,299,070 (+6,947). (The S5
thread measured +2,679 on an older main, `7ba22bb6`; `main` has since
drifted +5.4 KB in this chunk, which is why it now sits 104 bytes under
the line on its own.)

### What the bytes buy

- +2,552: the line-item grid's in-cell option and date panels
(`GridSelectCell`, `GridDateCell`) and its pop-out text input
(`GrowingCellInput`), so a form's line items edit in the cell as a list
grid does.
- About 5.4 KB of shared headroom once S5 lands (355,000 − 349,448 =
5,552), so the next form-field PR does not bounce at once. Not a budget
for a new component group. Per the ruling, a follow-up card takes
GridField out of the eager chunk (it is `import()`ed but also statically
exported from `packages/fields/src/index.tsx`), after which both numbers
come back down together.

## Verification

Clause-②: no
Metadata-protocol: none

- `pnpm --dir ui run check:eager-closure` on the merged tree (`a31a993e`
build, this branch's constants): exit 0; `ui-components` 341.3 KB /
346.7 KB ceiling, headroom 5.4 KB; aggregate, membership and sensitivity
halves all ✅.
- `pnpm --dir ui exec vitest run
scripts/__tests__/check-eager-closure-budget.test.ts`: 174/174 passed
(ceiling > baseline, gap < 695 KiB).
- `node scripts/pm/check-governed-merges.mjs --branch HEAD`: NOT
governed, ordinary queue landing.
- `dispatch-gates.mjs --commands` (16 commands for this file list), each
`:: exit 0`: check-closing-keyword-parity (+ `--self-test`),
check-comment-mask-corpus, `pnpm --dir ui exec vitest run scripts/`,
check:adr-anchors, check:driver-memory-census, check:gitlink-declared,
check:nul-bytes, check:pm-expected-skips, check:published-files,
check:refd-timer-probe, check:registry-log-declared,
check:rest-log-spy-declared, check:tier-file-adoption,
check:undeclared-dep-imports, check:watch-hint-literal.
- `skip-changeset`: the only file is under `ui/scripts/`, owned by the
private root package `object-ui-monorepo`, so the diff publishes nothing
from any released package (AGENTS.md Post-Task Checklist step 3).

Branch is the harness-assigned `claude/project-thread-usk9vf`, not
`claude/issue-<n>-…` (no card of its own).

## Human Minimum

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgWSAwkSz6F3eit2Y9u

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…maintainer ruling (objectstack-ai#36109)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuWrubarDyy1TAMVqK1ZWbAY)_

repo:objectstack#1 · os-sales · session_01L6bhgWSAwkSz6F3eit2Y9u

Refs objectstack-ai#36023

Area: b1-L · budget-only, follow-up to objectstack-ai#36100. **Authorisation:
maintainer ruling 7063869131 on objectstack-ai#36023** (amends point 2 of 7063116595).
At 2026-11-21T14:01Z the maintainer widened the raise on objectstack-ai#36100's
thread, verbatim: 「这个可以大幅放宽」 (this can be raised by a lot), then picked
"raise 30%, to 451,100" on the decision card that followed. objectstack-ai#36100 was
already in the merge queue at +8,000 and landed as it was so S5 objectstack-ai#36039
was not held up; this PR carries the rest.

## What changes

One file, `ui/scripts/check-eager-closure-budget.mjs`, constants and
their comments only:

| constant | before (objectstack-ai#36100) | after |
|---|---:|---:|
| `PER_CHUNK_GZIP_CEILINGS['ui-components']` | 355,000 | 451,100 |
| `PER_CHUNK_BASELINE['ui-components']` | 273,937 | 265,937 |

- Ceiling: 347,000 (the value ruling 7063116595 started from) × 1.30 =
451,100 exactly, rounded nowhere.
- Baseline: back to its measurement (`bbf6b02d9`'s 265,937). objectstack-ai#36100's
+8,000 only kept the ceiling-minus-baseline gap; a ruled raise widens
the gap instead, as the 2026-11-17 30% ruling on `i18n-locale-en` and
the 20% ruling (objectui#12653) left their baseline rows alone. Both
checked constraints hold: 451,100 > 265,937, and the gap 185,163 <
`REGRESSION_THIS_GATE_MUST_CATCH_BYTES` (711,680).
- A dated "⚠️ RAISED ×1.30 ... ON EXPLICIT MAINTAINER RULING" entry on
the key, with the rows below and a "⭐ PAYBACK: objectstack#36102" line
(L1-b's N1 on objectstack-ai#36100). objectstack-ai#36100's entry stays as the history it is.
- Not moved: `MAX_EAGER_CLOSURE_GZIP_BYTES`, `BASELINE`,
`REGRESSION_THIS_GATE_MUST_CATCH_BYTES`, the other three per-chunk rows.
No code change, no exemption, no import made lazy.

## Why

The maintainer wants this line to stop ejecting form and field PRs one
at a time. With +8,000 the chunk keeps about 4.8 KB once S5 lands; with
×1.30 about 98.6 KB.

### The rows (one container, one instrument)

`CI=true pnpm exec turbo run build --filter=@object-ui/console...`,
reading `apps/console/dist/eager-closure.json`, twice on one tree:
`main` at `1586ddec` (objectstack-ai#36100 landed) alone, then that `main` with
objectstack-ai#36039's head `fbbaaa99` merged in (`034f0628`, local, not pushed). This
file is not a console build input, so the branch builds the same bytes
as `main`. Gzipped bytes:

| chunk | `1586ddec` | `034f0628` | delta |
|---|---:|---:|---:|
| `vendor-objectstack` | 671,638 | 671,638 | 0 |
| `i18n-locale-en` | 65,900 | 65,900 | 0 |
| `framework` | 88,341 | 88,341 | 0 |
| `ui-components` | 347,621 | 350,177 | +2,556 |
| aggregate | 2,030,013 | 2,032,544 | +2,531 |

Same 104 eager chunks by name in both builds; besides `ui-components`
none moved by more than 21 bytes. Headroom of `ui-components`:

| ceiling | on `1586ddec` | with S5 |
|---|---:|---:|
| 355,000 (now) | 7,379 | 4,823 |
| 451,100 (this PR) | 103,479 | 100,923 (0.14x the 695 KiB regression) |

### What the bytes buy

Shared headroom only, so form and field PRs are not ejected on this line
one at a time. Not a budget for a new component group; a whole group
still belongs behind a lazy boundary. Payback: objectstack-ai#36102 takes GridField
out of the eager chunk; re-measure when it lands.

## Verification

Clause-②: no
Metadata-protocol: none

- `pnpm --dir ui run check:eager-closure` on the `034f0628` build (S5
merged) with this branch's constants: exit 0; `ui-components` 342.0 KB /
440.5 KB, headroom 98.6 KB; aggregate, membership and sensitivity halves
all ✅.
- `pnpm --dir ui exec vitest run scripts/`: 172 files passed, 2 skipped
(5,121 tests passed), including `check-eager-closure-budget.test.ts`.
- `eslint ui/scripts/check-eager-closure-budget.mjs`: exit 0.
- `node scripts/pm/check-governed-merges.mjs --branch HEAD`: NOT
governed.
- Same one-file list as objectstack-ai#36100, whose 16 `dispatch-gates.mjs --commands`
all exited 0 on that head; of those, only the `vitest run scripts/`
family reads this file's values, and it was re-run above.
- `skip-changeset`: `ui/scripts/` belongs to the private root package
`object-ui-monorepo`, so nothing publishes.

Branch is the harness-assigned `claude/project-thread-usk9vf`, restarted
from `main` after objectstack-ai#36100 merged.

## Human Minimum

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgWSAwkSz6F3eit2Y9u

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…moves the grid field, commits a date or jumps the picker page; one isImeKey (objectstack-ai#36126)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVwX4pUdM1qvNLSqRZNSvv3)_

Fixes objectstack-ai#35996

Clause-②: yes (widening): the `@object-ui/components` entry gains one
value export, `isImeKey(e: { nativeEvent: KeyboardEvent; keyCode?:
number }): boolean`. Measured on the built declarations: the components
`dist/index.d.ts` gains exactly `export { isImeKey } from
'./lib/ime-key.js';` plus the new `lib/ime-key.d.ts`. The
`@object-ui/fields` entry declarations are byte-identical to main
(`index.d.ts` unchanged; 120 of 121 emitted `.d.ts` identical, and the
one that differs is the internal `widgets/imeKey.d.ts`, which no export
path and no other `.d.ts` reaches). Nothing is removed or narrowed.
Metadata-protocol: none
Skills-docs: none — no skill teaches the input-method key guard (zero
hits for `isImeKey` or `isComposing` under `skills/`), and field
behaviour outside a composition is unchanged

repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv

## 维护者速读

-
用中文、日文、韩文输入法打字时,按回车选词不再误触发:表单里的明细表格不再跳到下一行或多加一行,日期框不再把打了一半的日期当成输入提交,选择记录弹窗的页码框不再跳页、清空。
-
这是输入法回车问题的收尾,前一张卡修了标签、查找、人员三个控件,这次补上剩下三个,并把判断「这个键归输入法」的规则合成一份,以后改一处就全生效。
- 出错的话最多是这三处在输入法下按回车没反应;不碰数据和保存逻辑,可以直接撤回。
- 要你做什么:无。

## What changes

**Three guards** (`@object-ui/fields`), each the first line of the
handler:

- `GridField` cell `onKeyDown` (`onCellKeyDown`): a key the input method
owns no longer moves to the next line or appends one on the last line.
The same guard covers this handler's ArrowUp and ArrowDown, which an
input method uses to move through its candidates. The guard sits on line
1 of `onCellKeyDown`, which open PR objectstack-ai#36039 (S5) leaves unchanged, so it
applies the same way to S5's extra callers of the handler.
- `DatePickerField` / `DateTimePickerField`: the candidate-picking Enter
no longer commits the half-typed text. Since objectstack-ai#36054 (S4) both the field
face and the in-cell panel draw the text box through one `textBox`
helper, so the guard is on that single Enter handler and covers both.
- `RecordPickerDialog` page-jump box (`handlePageJump`): the
candidate-picking Enter no longer jumps or clears the box.

**One predicate.** `isImeKey` is defined once, in
`ui/packages/components/src/lib/ime-key.ts`, and exported from the
`@object-ui/components` entry. The grid's `dataTableCellSelection.ts`
and `fields/src/widgets/imeKey.ts` now only re-export it. The fields
module stays a one-line re-export rather than being deleted because
objectstack-ai#36039 imports `./imeKey.js`. Each of the two modules keeps its local
import path, and the repository has one function body. A test asserts
that the function fields uses is the same object the components entry
exports.

Phase-1 reproduction in real Chromium (CDP `Input.imeSetComposition`,
then Enter with keyCode 229, then `Input.insertText`), all three on main
615d995: the grid moved 0-0 to 1-0 and the committed text landed in row
1, and on the last row it appended a line. The date box committed
"2026-0" and showed "Not saved". The picker jumped from page 1 to 2 and
cleared the box. A plain Enter worked as designed in each.

**Files to read first (by risk):**

1. `ui/packages/components/src/index.ts`: the one new entry export (the
Clause-② surface).
2. `ui/packages/fields/src/widgets/GridField.tsx`, the `onCellKeyDown`
hunk: the guard also stops the arrows during a composition.
3. `ui/packages/fields/src/widgets/imeKey.ts`: now a re-export, not a
second definition.

**Two-minute check:** `pnpm --filter @object-ui/fields exec vitest run
--root ../.. --maxWorkers=2
packages/fields/src/widgets/imeComposition-35996.test.tsx` should report
9 passed.

## Tests

`ui/packages/fields/src/widgets/imeComposition-35996.test.tsx` (9
tests). Each widget is driven through both real browser sequences:
Chromium/Firefox (compositionstart, keydown Enter with `isComposing:
true` and keyCode 229, compositionend) and Safari (compositionstart,
compositionend, then the 229 Enter). Each case ends with a plain Enter
as the control check, so a guard that swallowed every Enter would fail.
There is also one identity test for the single predicate. The existing
`imeComposition-35797.test.tsx` predicate cases now run against the
shared definition through the re-export.

## Acceptance notes

- Overlap with objectstack-ai#36039 (S5), rechecked at the new head: still one trivial
textual conflict in `GridField.tsx`'s import block. Both sides add
`import { isImeKey } from './imeKey.js';` after the `fieldHelpText`
import, and git merges that line as common. The conflict is only S5's
extra `gridCellPanels.js` import line; keep it. Nothing in
`onCellKeyDown` conflicts.
- objectstack-ai#36054 (S4) has landed and is merged in. The one conflict, in
`date-picker/DatePickerField.tsx`, was resolved by taking S4's `textBox`
and putting the guard on its Enter handler. `data-table.tsx` needed
nothing: it still imports `isImeKey` from `dataTableCellSelection`, and
after the merge the repository has exactly one `keyCode === 229` body
(`git grep` over non-test `ui/packages/*/src`).
- `RecordPickerDialog`'s `handleTableKeyDown` gets no guard: it listens
on table rows, which are not editable, so no composition reaches it.

## Verification

Every reading below was taken at head `e19af2a8`, which is `b0724f52`
merged with main `7dd1a2f6` (including objectstack-ai#36054).

<details><summary>Package tests and typecheck</summary>

- `pnpm --filter @object-ui/fields exec vitest run --root ../..
--maxWorkers=2 packages/fields/` exited 0: Test Files 318 passed, 1
skipped (319); Tests 4794 passed, 7 skipped (4801).
- `pnpm --filter @object-ui/components exec vitest run --root ../..
--maxWorkers=2 packages/components/` exited 0: Test Files 502 passed, 1
skipped (503); Tests 4822 passed, 24 skipped (4846).
- The 35996 and 35797 pins together: 19/19 passed.
- `pnpm --filter @object-ui/components type-check` exited 0. `pnpm
--filter @object-ui/fields type-check` exited 0; it runs `tsc --noEmit
&& tsc -p tsconfig.test.json`, so the new test is type-checked too.

</details>

<details><summary>Ablation: one run per guard, each failing, each
restored</summary>

Each ablation went through `scripts/ablation-replace.mjs`, which wraps
the run under the verify lock. The test subjects resolve to fields
`src/` through relative imports, so no `dist/` rebuild was needed.

- GridField `if (isImeKey(e)) return;` replaced with a comment: 4
failed, 5 passed (all four GridField cases). The first attempt queued
behind another session's run and timed out (exit 99, NOT MEASURED). The
rerun is the reading above.
- DatePickerField guard, taken again at `e19af2a8` on S4's `textBox`
handler: 2 failed, 7 passed. Restore proven by the tool's own check
(blob equals HEAD 90074f0, `git diff HEAD` empty) and by a separate
hash comparison.
- RecordPickerDialog `|| isImeKey(e)`: 2 failed, 7 passed. The first
attempt was refused by the tool before any test ran (its replacement
text already occurred in the file), so it was a no-op. The rerun used a
unique replacement.
- The GridField and RecordPickerDialog readings were taken at
`b0724f52`. The merge does not touch either file: its diff against
`b0724f52` is empty for both. Restore proven after each run: `git diff
HEAD -- FILE` is empty, and the HEAD blob hash equals the on-disk hash
(GridField ef12bb6, RecordPickerDialog bd58ecd).

</details>

<details><summary>Declarations: main vs this head</summary>

Both builds used `pnpm --filter @object-ui/components --filter
@object-ui/fields build`. The main build came from main `7dd1a2f6`'s
sources for both packages, with the new file moved aside; HEAD was then
restored, proven by an empty `git diff HEAD` and by blob hashes, and
rebuilt.

- components: `index.d.ts` gains `export { isImeKey } from
'./lib/ime-key.js';`, `lib/ime-key.d.ts` is new, and
`renderers/complex/dataTableCellSelection.d.ts` now re-exports instead
of declaring. Nothing else differs.
- fields: `index.d.ts` is byte-identical (`cmp`). Of the 121 emitted
`.d.ts`, exactly one differs: `widgets/imeKey.d.ts`, which now reads
`export { isImeKey } from '@object-ui/components';` in place of its own
`declare function`. It is not reachable from `exports` (`.` only) or
from any other `.d.ts`, so the published entry surface is unchanged, but
the `dist/` tree is not byte-identical.

</details>

<details><summary>Derived gate families</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 38 commands, and all 38 exited 0.
Reconciliation: `--ran` reports "38 derived famil(ies) accounted for —
38 run, 0 NOT-MEASURED (a DERIVED zero — all 38 recorded an exit code
and none of them is 3)". `test:repo` was not run locally; it belongs to
CI.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv

---------

Co-authored-by: Claude <noreply@anthropic.com>
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/l 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.

2 participants