Repository navigation
feat(fields): the line-item grid's select and date cells open their panel under the cell (#36023 S5) - #36039
Conversation
…anel under the cell (#36023 S5) Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD Co-authored-by: Claude <noreply@anthropic.com>
…36023 S5) Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD Co-authored-by: Claude <noreply@anthropic.com>
…cker chunk (#36023 S5) Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD Co-authored-by: Claude <noreply@anthropic.com>
…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>
|
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-fixM1 — Esc restores a stale line after a line is removed, moved or duplicated above it.
The mouse path is the same in Chrome (a clicked button takes focus): edit Fix, either is enough: drop the visit in every structure change ( Should-fixS1 — 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 Nits
Checked
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>
|
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
S1 — resolvedThe changeset title and N1 — resolvedA 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 Checked
Owed
|
|
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 ( |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44899740254 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
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 维护者速读这次只是把最新 main 合进 S5(表单明细行在格子里直接编辑)。没有冲突,PR 自己的改动逐行不变。main 这边和 S5 唯一碰到同一个文件的是选项列表组件:S4 只改了一句注释,S5 加了“打字直接开始搜索”的参数,两者在不同位置,自动合并后都在。首屏包预算 #36100 已经在 main 里,所以 S5 合进来不会再被预算线挡住。 Must-fix / Should-fixNone. Nits
Checked
Owed
|
|
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 ( |
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
…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>
…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>
…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>
…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>
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 #36023goes on whichever of S4/S5 lands last.)Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/fields/src/widgets/only:gridCellPanels.tsx(not on the package entry):GridSelectCell— a flatrole="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 existingInCellOptionList. A pick calls the grid'ssetCelland 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 nativedate/datetime-localinput 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 withonOpenAutoFocusprevented, 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'ssetCell(sodatetimestill goes throughfromDateTimeInputValue), keeps a date-time'sHH:mm, closes, and hands the focus back to the cell inonCloseAutoFocus(react-day-picker focuses the clicked day afteronSelect, 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 andscrollWidthexceeds 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 RadixSelect);date/datetime→GridDateCell;text→GrowingCellInput;number/currency/timekeep their inputs. The cell control class is shared asGRID_CELL_CONTROL_CLASS(same utilities as before). The impossible-day notice keeps its element, id, test id andaria-describedbylink, nowsr-onlyin the cell, and is drawn visibly at the top of the calendar and as the cell'stitle.GridField.tsx): entering a cell snapshots its line (onFocuson the table, keyed by the newdata-grid-cell="row:column"on eachtd; a move into the cell's own portaled panel is still the same visit). A window capture-phasekeydownlistener, 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 onwindowis what runs ahead of a RadixDialog'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) andcontent/docs/frontend/plugins/plugin-form.mdx(Editing in the line-item grid). Changeset.changeset/36023-line-grid-cell-panels.md(@object-ui/fieldspatch).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 expectedyes): no export of@object-ui/fieldschanges (gridCellPanels.tsxis not on the entry, andInCellOptionList's newinitialQueryprop is not on the entry either;GridFieldPropsis unchanged), no i18n key is added (the panel reusesfields.datePicker.*), and nothing a metadata author writes changes.Verification
describe('cell faces that open under the cell (objectstack#36023)')inGridField.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 staystype="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 RadixDialog, Esc in a cell (twice) never callsonOpenChangeand 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).GridField.test.tsx90 passed; the 160 test files underui/namingGridField,LineItemsField,line-items,MasterDetailForm,LineItemsPanelorRecordBodyTableEditor3,553 passed, 0 failed;tsc --noEmit -p packages/fieldsclean; no lint warning on a changed line.de846e7e(the two later commits are docs and the changeset):GridField.test.tsx85 passed; every test file underui/that namesGridField,LineItemsField,line-items,MasterDetailForm,LineItemsPanelorRecordBodyTableEditor(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/fieldsclean. ESLint: no errors on the four touched files; no warning on an added line.build-seat1/36023/S5/evidence.md, screenshots beside it):apthen 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).11202026/0930Afrom the keyboard with the calendar open (2026-11-20T09:30). Same at 375.[data-line-items-scroll], and outsidefields/the grid is reached only from the record page (RecordDetailView/recordEditState) andMasterDetailForm. Studio's metadata repeater withwidget: 'grid'is SchemaForm's own table and is not touched here.GrowingCellInputnow 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
LookupFieldwork; this grid picks it up after S3 lands.InlineGridColumnSchema.typehas 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).Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgXrmZgxib5C1kX7vnD