Repository navigation
fix(fields): an Enter that picks an input-method candidate no longer moves the grid field, commits a date or jumps the picker page; one isImeKey - #36126
Conversation
… or jumps the record picker; one isImeKey (#35996) GridField's cell keys, the date picker's Enter and the record picker's page-jump Enter now leave a key the input method owns alone, as the list grid and the three #35797 widgets already do. The predicate is defined once, on the @object-ui/components entry; the fields module passes it through. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
Takes #36054 (S4): the date picker's text box moved into `textBox`, so the #35996 input-method guard now sits on that one Enter handler, which both the field face and the in-cell panel draw. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
…col: none (objectstack#35996) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
|
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv Final green head · 2026-11-21T15:43Z · area b1-DB
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T15:45Z. The brief handed to the isolated declaration-face reviewer for PR #36126 (owed by the changeset's Contract review brief — PR #36126 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 席位核对 — ACCEPT (L1-a)维护者速读用中文、日文等输入法打字时,按回车是在选候选词,不是确认输入。以前在三个地方,这个回车会被当成真的回车:
现在这三处都会先判断「这是不是输入法在选词」,是的话就不处理。不用输入法时,回车照旧。判断规则平台只写了一份,原来表格单元格和字段各自那份改成直接用它,所以以后各处判断不会不一致。 没有需要修的问题,不属于受管面。对外新增了一个导出函数,座位还要在同一版本上跑一次 L2,本记录不替代它。 Head reviewed: What holds
Observation (no change asked)
Landing terms
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Inputs read: card #35996 (body, the triage comment and the claim comment; it carries no ruling and no earlier record), the bodies of #35797 and merged PR #35993, the PR #36126 body and its 9-file list, the net diff from merge-base ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T15:50Z · #35996 (b1-DB, the class of #35797 under #35683). The line-item grid, DatePicker (both the field face and the in-cell panel) and the RecordPicker page-jump box no longer act on an Enter pressed while an input method is composing. One predicate now serves grid and fields: Reviews:
Gates on this head:
Overlap: #36039 (S5) is ahead in the queue and touches the GridField import block. If the queue drops this PR on that conflict, the thread merges main and the seat reads the merge-only delta. The seat readies this PR and arms auto-merge in the same step. The PR carries |
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
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Regen-provenance: declaration-face record 7065174978 (PASS) · The merge queue dropped this PR with MERGE_CONFLICT against #36039 (S5), and
The net diff against main is still the same 9 files (+262/−31). No export, prop or changeset line changes, so the declaration record carries over. The thread re-ran |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 席位核对 — delta ACCEPT (L1-a, main merge)维护者速读这次把主干合进来时,和刚合并的「明细表格单元格改版」(#36039)在同一个文件开头的引用处碰了一下。解决方式是两边都保留,结果没问题:
上一轮的通过结论照旧有效。CI 绿了、座位的 L2 跟上之后,按普通队列落地。 Head reviewed: The resolution
What holds after the merge
Landing terms
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat re-landing · 2026-11-21T16:28Z · #35996, on Readings:
On this head:
The seat re-enqueues the PR. The PR carries |
Requested by Sales · project thread
Fixes #35996
Clause-②: yes (widening): the
@object-ui/componentsentry gains one value export,isImeKey(e: { nativeEvent: KeyboardEvent; keyCode?: number }): boolean. Measured on the built declarations: the componentsdist/index.d.tsgains exactlyexport { isImeKey } from './lib/ime-key.js';plus the newlib/ime-key.d.ts. The@object-ui/fieldsentry declarations are byte-identical to main (index.d.tsunchanged; 120 of 121 emitted.d.tsidentical, and the one that differs is the internalwidgets/imeKey.d.ts, which no export path and no other.d.tsreaches). Nothing is removed or narrowed.Metadata-protocol: none
Skills-docs: none — no skill teaches the input-method key guard (zero hits for
isImeKeyorisComposingunderskills/), and field behaviour outside a composition is unchangedrepo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv
维护者速读
What changes
Three guards (
@object-ui/fields), each the first line of the handler:GridFieldcellonKeyDown(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 ofonCellKeyDown, which open PR feat(fields): the line-item grid's select and date cells open their panel under the cell (#36023 S5) #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 feat(ui): in a list cell, a picker opens under the cell, Backspace clears, a refused value stays, and Enter stays on the cell (#36023 S4) #36054 (S4) both the field face and the in-cell panel draw the text box through onetextBoxhelper, so the guard is on that single Enter handler and covers both.RecordPickerDialogpage-jump box (handlePageJump): the candidate-picking Enter no longer jumps or clears the box.One predicate.
isImeKeyis defined once, inui/packages/components/src/lib/ime-key.ts, and exported from the@object-ui/componentsentry. The grid'sdataTableCellSelection.tsandfields/src/widgets/imeKey.tsnow only re-export it. The fields module stays a one-line re-export rather than being deleted because #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, thenInput.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):
ui/packages/components/src/index.ts: the one new entry export (the Clause-② surface).ui/packages/fields/src/widgets/GridField.tsx, theonCellKeyDownhunk: the guard also stops the arrows during a composition.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.tsxshould 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 withisComposing: trueand 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 existingimeComposition-35797.test.tsxpredicate cases now run against the shared definition through the re-export.Acceptance notes
GridField.tsx's import block. Both sides addimport { isImeKey } from './imeKey.js';after thefieldHelpTextimport, and git merges that line as common. The conflict is only S5's extragridCellPanels.jsimport line; keep it. Nothing inonCellKeyDownconflicts.date-picker/DatePickerField.tsx, was resolved by taking S4'stextBoxand putting the guard on its Enter handler.data-table.tsxneeded nothing: it still importsisImeKeyfromdataTableCellSelection, and after the merge the repository has exactly onekeyCode === 229body (git grepover non-testui/packages/*/src).RecordPickerDialog'shandleTableKeyDowngets 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 isb0724f52merged with main7dd1a2f6(including #36054).Package tests and typecheck
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).pnpm --filter @object-ui/components type-checkexited 0.pnpm --filter @object-ui/fields type-checkexited 0; it runstsc --noEmit && tsc -p tsconfig.test.json, so the new test is type-checked too.Ablation: one run per guard, each failing, each restored
Each ablation went through
scripts/ablation-replace.mjs, which wraps the run under the verify lock. The test subjects resolve to fieldssrc/through relative imports, so nodist/rebuild was needed.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.e19af2a8on S4'stextBoxhandler: 2 failed, 7 passed. Restore proven by the tool's own check (blob equals HEAD 90074f05,git diff HEADempty) and by a separate hash comparison.|| 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.b0724f52. The merge does not touch either file: its diff againstb0724f52is empty for both. Restore proven after each run:git diff HEAD -- FILEis empty, and the HEAD blob hash equals the on-disk hash (GridField ef12bb6b, RecordPickerDialog bd58ecdc).Declarations: main vs this head
Both builds used
pnpm --filter @object-ui/components --filter @object-ui/fields build. The main build came from main7dd1a2f6's sources for both packages, with the new file moved aside; HEAD was then restored, proven by an emptygit diff HEADand by blob hashes, and rebuilt.index.d.tsgainsexport { isImeKey } from './lib/ime-key.js';,lib/ime-key.d.tsis new, andrenderers/complex/dataTableCellSelection.d.tsnow re-exports instead of declaring. Nothing else differs.index.d.tsis byte-identical (cmp). Of the 121 emitted.d.ts, exactly one differs:widgets/imeKey.d.ts, which now readsexport { isImeKey } from '@object-ui/components';in place of its owndeclare function. It is not reachable fromexports(.only) or from any other.d.ts, so the published entry surface is unchanged, but thedist/tree is not byte-identical.Derived gate families
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 38 commands, and all 38 exited 0. Reconciliation:--ranreports "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:repowas not run locally; it belongs to CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv