Uh oh!
There was an error while loading. Please reload this page.
docs(spec): pin the derived related-list sort-inheritance rule in relatedList's describe - #13310
Conversation
…atedList's describe Pin the behaviour landed and browser-verified in #11345 as contract text on relatedList's .describe(): a derived related list (relatedList: 'primary') inherits the child object's DEFAULT list view sort (isDefault expanded view, or the first declared list item when none is default; resolver expandViewContainer, ui/view.zod.ts). Wire spelling is the REST shorthand sort=<field> / sort=-<field>, never the OData $orderby token. A child object with no list-view sort emits no ordering parameter, falling back to record-id order. Text-only change -- the relatedList accept-set is byte-identical before and after. Adds a pin test (following the #8704 relatedListFilter precedent) asserting both the inheritance statement and the negative (no-sort => no-ordering-parameter) half of the contract text.
…hange pnpm --filter @objectstack/spec check:generated proved content/docs/references/** stale after the describe edit; regenerated via pnpm --filter @objectstack/spec gen:docs (the only artifact it reported stale). All 14 generated artifacts are up to date after this commit.
📓 Docs Drift CheckThis PR changes 1 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 02571744269145b2e9de57703ceda65347a40388 && git checkout 02571744269145b2e9de57703ceda65347a40388
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8f743076d47638fa29b86cafa772912b67a8d9b6 3865d2c7f977552d60fff153a52114e014260ef2 && git checkout -B drift-repro 8f743076d47638fa29b86cafa772912b67a8d9b6 && git merge --no-ff 3865d2c7f977552d60fff153a52114e014260ef2
node scripts/docs-audit/affected-docs.mjs --json 8f743076d47638fa29b86cafa772912b67a8d9b6
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#13294
What
Pins the derived related-list sort-inheritance rule as contract text on
relatedList's.describe(), the same wayrelatedListFilterwas pinned by #8704. The behaviour is already landed and browser-verified — #11345's 2026-08-29 acceptance run — this PR only makes the rule readable in the spec's own contract text instead of living solely in comments/PR history.The pinned text states:
relatedList: 'primary') inherits its row order from the child object's DEFAULT list viewsort— theisDefaultexpanded view, or the first declared list item when none is marked default (resolverexpandViewContainer,ui/view.zod.ts).sort=FIELD/sort=-FIELD(objectui'sserializeOrderBylowersQueryParams.$orderbyto this on the wire) — never the OData$orderbytoken.Text-only change — the
relatedListaccept-set (z.union([z.boolean(), z.literal('primary')]).optional()) is byte-identical before and after; only the.describe()string and the JSDoc block above it grew.Describe text — before / after
Before:
After (appended sentence, following the #8704
relatedListFilterpattern):Pin test
Added two tests in
packages/spec/src/data/field.test.ts(immediately before therelatedListFilterfamily, same structural spot the #8704 precedent sits in), asserting both halves of the contract text — a one-directional assertion would leave the other half free to drift silently:relatedList contract text states DEFAULT-list-view sort inheritance and its wire spellingrelatedList contract text states the negative half: no list-view sort ⇒ no ordering parameterRegenerated reference pages
pnpm --filter @objectstack/spec check:generatedreportedcontent/docs/references/**stale after the describe edit (1 of 14 artifacts); regenerated withpnpm --filter @objectstack/spec gen:docs(the only stale one — never the whole set). Three pages embed theFieldschema table and all three moved identically (same one-line describe update, no unrelated drift):content/docs/references/data/field.mdx,content/docs/references/data/object.mdx,content/docs/references/system/migration.mdx. Re-rancheck:generatedafter — all 14 generated artifacts up to date.Changeset
.changeset/relatedlist-sort-inheritance-pin.md—@objectstack/spec: patch(text face, per the card's landing note).Tests
At commit
3865d2c7(this branch's HEAD):pnpm --filter @objectstack/spec build— clean, all 34 declared.d.tspresent.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/field.test.ts— 203 passed (203), including the 2 new pin tests.pnpm --filter @objectstack/spec check:generated— all 14 generated artifacts up to date (aftergen:docs).pnpm --filter @objectstack/spec typecheck— clean (tsc --noEmit,check:scripts-typecheck,check:test-typecheckall pass; test-typecheck debt ledger unchanged at 54 files / 262 errors).pnpm check:nul-bytes— OK (7360 text files scanned, no raw ASCII control bytes).Clause-② / draft status
Path limb fires (
packages/spec/src/**) even though the content limb doesn't (pure describe prose, no accept/reject change) — per the card's own landing note, this PR stays draft withneeds:contract-reviewon both the PR and the card; the contract-review chain owns enqueue, not me.Refs: #11345 (verified behaviour + close condition) · #8704 (the pin pattern) · objectui#6088 (the implementation)
Session: https://claude.ai/code/session_01KX8wnyjStaZcuMyAMNsy3N