Repository navigation
fix(ui): rich-text cell docs, the read-only data-table warning and the onBatchSave refusal describe the select-first model - #38097
Merged
Conversation
…edy; test leftovers Claude-Session: https://claude.ai/code/session_01L9qibxEbSk19qJRPHrm3v9 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxEbSk19qJRPHrm3v9 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a: ACCEPT at
|
Contributor
Author
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T02:57Z · zone
|
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Tesla · project thread
Part of #37521
repo:objectstack#3 · os-tesla · session_01L9qibxEbSk19qJRPHrm3v9
Clause-②: no
Metadata-protocol: none
维护者速读
data-table只读警告、onBatchSave的拒收文字,现在都按这一种方式说话。What changes
@object-ui/fieldsREADME, "The grid cell editor's face" and theIN_CELL_PANEL_EDIT_WIDGETSdocblock inFieldEditWidget.tsx: the sentence "a grid withoutcellSelectionopens it over the cell, where Ctrl/Cmd+Enter does nothing and a click outside keeps the text as a pending change for the grid's save buttons" is gone. They now say the grid edits only in its select-first model and opens the rich-text box in the panel under the cell.data-table.tsxis retired.editableiseditableProp && selectFirst && onRowSave, andstartEditreturns at once when the table is noteditable, so no editor ever opens outside the select-first model. Removed as always-true or always-false: theselectFirstconjunct ineditsBelow; in the host-injected editor's key handler, theselectFirst &&guards on Ctrl/Cmd+Enter in a textarea, on Tab, and oncommitMoves;focusSelectionRef.current = selectFirstin the injected editor'scommitand Escape paths (nowtrue);!selectFirst ||in the injected-editor caret effect. The comment describing Tab "outside the select-first model" is replaced by the invariant. The non-editselectFirstbranches (selection, the read-only table's arrow navigation,onRowClick's pointer cursor) are live and untouched, andCellOverlay'scoverplacement stays (plain editors use it).describeUnsavableEditable(dataTableBindDiagnostic.ts) namedGridCellSelection, the context's value type, as the thing to mount. It now namesGridCellSelectionProviderin both places, and in its docblock.handlerKeyRefusal(tombstone.zod.ts, internal to@object-ui/types, not exported) takes an optional fourth argument: a'retired'key's own remedy, which replaces the node-type remedy. Omitted, the message is byte-for-byte unchanged. Passed for a'runtime-slot'key, it throws at declaration.DataTableSchema.onBatchSavepasses "onBatchSave→onRowSaveonobject-grid…", ending "Delete the key." The key is refused exactly as before (customat its own path, a live function too).data-table-edit-column-headertest id (autosave and select-first harnesses; both tests keep their live assertions, and the autosave test name drops "no edit column");inlineEditPermissionGate.test.tsxcase e and itsheaderCellCounthelper;defaultBatchSavefrom theaffordanceGrantMap-12082comment.patchchangeset for@object-ui/fields,@object-ui/components,@object-ui/types.Why
#35827 retired the staged editing model. Shipped text (the fields README is in the package's
files[]) still described it, and the warning told hosts to mount a type. Contract record 7189751333 on PR #37437 named all of it.Verification
Tests added or tightened, each ablated on the committed fix (put back, run, restored from
HEAD, tree clean):data-table-autosave-35685.test.tsx"without the provider: …": the warning names`GridCellSelectionProvider`twice and never`GridCellSelection`. Ablation (both names back):1 failed | 23 passed (24).handler-keys-json-refusal-6124.test.ts: the per-site guidance test now takes anOWN_RETIREMENT_REMEDYtable (onBatchSave→ its FROM → TO,GridCellSelectionProvider, "Delete the key.", and noaction:button); a new top-level describe pins the helper itself (default text byte-exact, the remedy replaces only the remedy sentence, a runtime slot refuses one, every own-remedy key is a retired ledger site). Ablations:onBatchSaveback to the generic call,1 failed | 343 passed (344); the helper ignoring the argument,2 failed | 342 passed (344).data-table-select-first-35684.test.tsx, new describe "an injected editor keeps the model's keys": a host-injected textarea editor commits on Tab and moves right, keeps Enter as a new line and commits on Ctrl/Cmd+Enter with the cell still selected. These hold the two arms whoseselectFirst &&guard was removed. Ablations: Tab arm removed,1 failed | 38 passed (39); the textarea Ctrl/Cmd+Enter arm removed,1 failed | 38 passed (39).data-table-autosave-35685.test.tsxand "no edit-only column, ever" indata-table-select-first-35684.test.tsxpin at the table itself that an editable table draws no save column; case e compared three header counts that can no longer differ.data-table-autosave-35685.test.tsx(no editor opens, no save bar, one warning).Readings at c6bf4f6 (base origin/main 815e882)
Test Files 6 passed (6),Tests 499 passed (499).vitest run packages/components/ packages/types/ packages/fields/ packages/plugin-grid/ packages/plugin-form/after anOS_SKIP_DTS=1build:1796 passed | 6 failed | 2 skipped. The six are spec-parity tests that readpackages/spec/dist/*.d.mts, which that build does not write ("no module symbol for …/spec/dist/system/index.d.mts"). After a dts build of@object-ui/plugin-grid^...and@object-ui/plugin-form^..., those six:Test Files 6 passed (6),Tests 145 passed (145).type-checkexit 0 for@object-ui/types,components,fields,plugin-grid,plugin-form.eslinton the ten changed.ts/.tsxfiles: 0 errors (warnings pre-existing).check:doc-authoringexit 0;check:new-line-citations0 new;check-changeset-claims,check-changeset-no-major,check-adr-0087-registration,check-changeset-fixedexit 0.dispatch-gates --tier --repo objectstack-ai/objectstackon the surface: no path-derived tier mandate; no governed path.Acceptance notes
.changeset/pre/35827-…file and the five published CHANGELOG entries (spec, app-shell, components, plugin-grid, types) still saymount GridCellSelection/inside a GridCellSelection host. Seat ruling: a dedicated docs-only PR after this one merges, which thenFixes #37521.renderSelectFirstTabledocblock inui/packages/components/src/__tests__/test-utils.tsxsays "a select-first host (GridCellSelection)", naming the model, not the thing to mount.handler-keys-json-refusal-6124.test.tsis the shared harness forhandlerKeyRefusal; its per-site guidance assertion had to learn the own-remedy case, which is why it is in the diff.Human Minimum
packages/specholds no runtime logic.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 with Claude Code
https://claude.ai/code/session_01L9qibxEbSk19qJRPHrm3v9
Generated by Claude Code