Uh oh!
There was an error while loading. Please reload this page.
docs(plugin-grid,types): state onNavigate as the documented non-author exception - #6209
Merged
yinlianghui merged 2 commits intoAug 25, 2026
Merged
Conversation
…hor exception Maintainer ruling of 2026-08-19 on objectui#5234, option C. Zero behaviour change: an exemption comment at the `ObjectGrid.tsx` schema read site in the shape objectui#5091 / PR #5241 established, a programmatic-only note on the `@object-ui/types` declaration, the README sentence narrowed to match the docs page, and `gridNonAuthorKeys.test.tsx` extended rather than rewritten. The key is a function value and a schema is a serialisable document, so it can never survive a metadata round-trip whatever declares it. It is deliberately kept (not option A, a breaking public type change for zero measured harm) and deliberately not published to `GRID_QUERY_INPUTS` (not option B, an offer no author can take).
…avigate-documented-exception
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 25, 2026 02:41
Uh oh!
There was an error while loading. Please reload this page.
yinlianghui
deleted the
claude/issue-5234-onnavigate-documented-exception
branch
August 25, 2026 02:53
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 freeto 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.
Fixes#5234
Execution of the maintainer ruling of 2026-08-19 (Option C, verbatim 「全部接受」):
ObjectGridSchema.onNavigatestays declared, stays read, and is now stated as the explicit, documented exception. Zero behaviour change — every line added to a code file is a comment (proof below); the key is neither removed (option A) nor added toGRID_QUERY_INPUTS(option B).All gates below were run at head
f33928ab3with a clean tree.What landed
packages/plugin-grid/src/ObjectGrid.tsx//linespackages/types/src/objectql.tspackages/plugin-grid/src/__tests__/gridNonAuthorKeys.test.tsxpackages/plugin-grid/README.mdcontent/docs/plugins/plugin-grid.mdx.changeset/…mdComment-only, proven mechanically rather than asserted: every
+line in the two code files was matched against^\+\s*//and^\+\s*\*respectively, with zero offenders and zero deletions. The emitted JS and the public type surface are byte-identical, which is why the 43-package downstream direction is uninteresting on the merits and was still swept (below).Re-derived line numbers — the card's own history is why
The card went wrong by carrying a grep range into a decision without re-running it, so every site was re-measured on today's
origin/main:origin/maintodayonNavigatedeclaration,objectql.ts:847:847ObjectGridSchemaspan532–888532–888ObjectGrid.tsx:1187:1334GRID_QUERY_INPUTSinindex.tsxThe two
packages/typesnumbers survived five PRs by coincidence, not by stability. The read-site number did not. On this branch the declaration span becomes532–911and the read lands at:1364.onNavigatealso appears twice more inobjectql.ts(:1509onObjectViewSchema,:1796onListViewRuntimeProps) — different interfaces, untouched. The new tests bound their search to theObjectGridSchemaspan for exactly that reason.Serial-contention check, as asked: the read site is a single hunk at
1331–1364.withSortability(PR #6109, now merged and in this branch's base) is at:2465— about 1,100 lines away. Not adjacent, no overlap.PR #5241's pattern, as found
Its body specifies four elements at a read site: the verdict in the words "deliberately absent from
GRID_QUERY_INPUTS"; the ruling that made it deliberate (maintainer, date, issue); who writes the key, asfile:line; and the contract's own verdict plus a pointer to the test. Read back offmain, thecolumnStateandhideRowHeightTogglecomments carry exactly that, closing on "Both halves — unlisted here, rejected there — are pinned by__tests__/gridNonAuthorKeys.test.tsx… so this exemption cannot decay into a silent drop."That shape is mirrored, not reinvented. One element is adapted, deliberately: element 3 wants the producer as
file:line, and this key has none — nobody writes it, which is the whole ruling. The comment states the honest analogue instead: it is a function value, no document can carry it, and programmatic callers should useObjectGridComponentProps. Afile:linethere would have been fiction.The other difference is stated in the comment itself: the four #5091 keys are cast reads because
@object-ui/typesdoes not declare them; this one is a plain read because it is declared. The comment says out loud that this is not index-signature drift — the withdrawn reading — so a later reader cannot re-derive the error the card made.The docs sentence — the dispatch's assumption was half wrong
The dispatch said the sentence "was already narrowed … if it is already correct, say so and leave it." Measured on
main, that is true of one page and false of the other:content/docs/plugins/plugin-grid.mdx:416— already narrowed to "never reads any of these nine". Left alone.packages/plugin-grid/README.md:516— still carried the un-narrowed universal, "never reads a callback off the schema", which this very key falsifies. Narrowed to match.That README line is the one factual correction in this PR. Both pages now also name the one callback that is read. (
packages/plugin-grid/CHANGELOG.md:415carries the old wording too; changelog history is not edited.)The test — extended, and aimed at the thing that can move
gridNonAuthorKeys.test.tsx: 31 → 41 cases, 36 → 57expect(calls, +264 / −0 lines. Nothing existing was touched except three addednode:imports. Counts are fromvitest list, not from reading the file.Which assertions would still pass on a revert — stated plainly
Seven of the ten new cases would still pass if this PR were reverted, and that is by design: not-published, spec-rejects-by-name, parser-says-
unknown-prop, the type still declares it, the nine siblings are still props-only, and the renderer still reads it were all true before this card. They are the ledger's premises — they stop the exemption decaying — but on their own they would pin nothing about this card.Three cases can tell the two states of the world apart, and they are the deliverable:
(schema as any)读的 4 个键不在GRID_QUERY_INPUTS里 —— #4648 要消除的「渲染器读得到、声明面否认」在这些键上仍然存在 #5091 exemptions are still present — the control that stops 1 and 2 passing vacuously.Because the ruling's deliverable is prose, these read the source, the way
ObjectGrid.exportOptionsKeys.test.tsin the same directory already does. Each is anchored on text that exists in both states (the read line itself, the declaration line itself), so a red means the comment went missing, never that the anchor moved.Ablations — four legs, all predicted before running, all matched
Committed first; each mutation proved on disk by grepping the removed text and a separately injected marker; anchor uniqueness asserted before writing; landing site printed; restored under
trap … EXIT INT TERMwith absolute paths;git diff HEAD --statempty afterwards.onNavigateexemption comment (30 lines → 1 marker)1 failed | 40 passed— exactly that casecolumnStateexemption marker1 failed | 40 passed— exactly that caseonRowClickonObjectGridSchema1 failed | 40 passed— exactly that caseonNavigate: schema.onNavigateread2 failed | 39 passed— exactly those twoNo rebuild leg is owed, and this was verified rather than assumed:
vitest.config.mts:256+aliases@object-ui/*tosrcand the suite imports../ObjectGridrelatively, so nodistis in the resolution path;@objectstack/specis the untouched published build innode_modules. Same finding PR #5241 recorded.Gates — command, exit code, and what a red would have meant
Derived by enumerating each CI job's own step list (
ci.yml,lint.yml,changeset-presence.yml,changeset-guard.yml,control-bytes.yml,doc-component-types.yml), not from top-level script names. Exit codes captured by redirecting first, never after a pipe.pnpm exec vitest run packages/plugin-grid/src/__tests__/gridNonAuthorKeys.test.tsx --maxWorkers=2pnpm exec vitest run packages/plugin-grid/ --maxWorkers=2pnpm --filter @object-ui/types type-checktsconfig.examples.json)pnpm --filter @object-ui/plugin-grid type-checkpnpm --workspace-concurrency=2 --filter '...@object-ui/types' type-checkexamples/*pnpm --filter @object-ui/plugin-grid lint(eslint .)pnpm --filter @object-ui/types lint(eslint .)node scripts/check-changeset-presence.mjsnode scripts/check-changeset-fixed.mjs/-no-major.mjsnode scripts/check-control-bytes.mjsnode scripts/check-doc-component-types.mjsnode scripts/check-lint-coverage.mjsnode scripts/check-type-check-coverage.mjsnode scripts/check-phantom-dependencies.mjsnode:imports were undeclarednode scripts/check-package-self-import.mjsNon-vacuity: every
pnpm --filterrun echoed its script name, and the downstream sweep printed 42type-check: Donelines with zero "No projects matched the filters" — so none of these is the zero-match green that exits 0 having run nothing.@object-ui/typeswas rebuilt before the plugin-grid type-check, so that green is over rebuiltdist/*.d.ts(the note reachesdist/objectql.d.ts), not yesterday's.Direction demonstrated for the downstream sweep: prefix
'...@object-ui/types'resolves to 43 packages (consumers); suffix'@object-ui/types...'resolves to 1 (upstream deps — types has none). Opposite directions; the prefix form is the one run.Declared narrowings
check-doc-snippet-types.mjsnot run locally. It turbo-builds every package the covered snippets import. The docs edits add zero code fences (measured:git diff … | grep -c '^+```'= 0), so no snippet changed. CI runs it.check:published-distnot run locally — it builds every published package and exceeds the budget on a container shared with other agents. The only new file is underpackages/plugin-grid/src/__tests__/, whichpackages/plugin-grid/tsconfig.jsonalready excludes. CI runs it.pnpm lintnarrowed to the two affected packages. The population is eslint's own per-package config, not a hand-picked file list; type-aware linting is not enabled (noprojectService/parserOptions.projectineslint.config.js), so this diff cannot move the verdict on any untouched file.Provenance
The branch's implementation commit was pushed by an earlier run of this same claim that died before opening a PR; nothing was force-pushed and no other agent's work was touched. Everything above was re-measured from scratch on this run.
Neighbouring cards referenced for context only, and left open — #5091 (the four ruled keys), #5240 (
userActions), #4648 (the prior round), PR #5241 (the pattern). None of them is addressed here.Generated by Claude Code