Skip to content

Commit 4f11af5

Browse files
fix(spec): the page-template-closed-region-unplaced-refused entry says what the console shows for a stored row (#24215)
Fixes #24195 Clause-②: no ## What changes `packages/spec/src/migrations/entries/semantic/18.page-template-closed-region-unplaced-refused.ts`: only the last sentence of the entry's `reason`. `acceptanceCriteria`, `surface` and `replacement` are unchanged, and no other entry is touched. Before (published in `@objectstack/spec` 18.0.0-next.2 and next.3): > A page row already stored with an unregistered template or an unplaced region is served unchanged and renders as before, while saving it again is refused until it is renamed. ADR-0087. After: > A page row already stored with an unregistered template or an unplaced region is served unchanged, and saving it again is refused until it is renamed. Until then the console draws a refusal in its place: an unregistered template draws no layout, only a refusal naming the template and the registered templates; on a default, header-sidebar-main or three-column page an unplaced region is not drawn and moves into no other slot, and where it used to stack, under main, a refusal names it and the slots that template places. The exception is a page that names no template: it takes its page type's layout, which still stacks such a region under main. ADR-0087. Plus one changeset, `.changeset/24195-page-template-entry-reason.md` (`@objectstack/spec` patch, `Clause-②: no`). ## Why, and where the new wording comes from The old sentence was true of the console when the entry shipped. objectstack-ai/objectui#12901 (merge commit `044f23193068`, objectui `main`) removes that fallback, per the maintainer ruling on #23610 (record `6190536588`, Q2 A: the renderer keeps no fallback for a shape the spec refuses). The new sentence describes what that commit's `packages/components/src/renderers/layout/page.tsx` draws. It was read at `044f23193068`, and `git diff 044f231 origin/main` on that file is empty in objectui today: - `resolveTemplate`: a template name `TEMPLATE_REGISTRY` does not hold resolves to `UnregisteredTemplateRefusal`, which replaces the whole layout. Its text: "Not drawn: this page's template is not registered", then the template and the four registered names. - `DefaultTemplate` (through `RegionLayout` with `template` set), `HeaderSidebarMainTemplate` and `ThreeColumnTemplate`: each region outside `PAGE_TEMPLATE_SLOTS[template]` is left out of every slot. `UnplacedRegionsRefusal` is drawn under `main`, naming each region and the template's slots. - A page with no `template` takes the `pageType` dispatch (`RecordPageLayout` / `HomePageLayout` / `AppPageLayout` / `UtilityPageLayout`, all calling `RegionLayout` with no `template`), which still stacks such a region under `main`. objectui's own changeset for that PR says the same (`.changeset/12476-page-template-slots.md`, "Unchanged" paragraph). The spec still refuses that page's save, because `checkPageRegionPlacement` judges a missing template as `default`. So the card's Expected wording ("the console draws a refusal in its place") holds for a page that names a template, and the last sentence names the exception. Without it, the sentence would be wrong in the other direction for template-less rows. - "Served unchanged" still holds. The save door keeps a page body verbatim, with no parsed defaults (`packages/metadata-protocol/src/protocol.ts`, the non-view branch after the save-door `safeParse`). No D2 entry rewrites an unregistered name or an unplaced region, and a stored `full-width` row is rewritten to `default` on read, as the entry's earlier sentence already says. The text names no tracker number, per AGENTS.md's runtime-string rule. ## Transition window (not handled here) objectstack's `.objectui-sha` reads `5e15928b46`, 38 commits behind objectui `044f23193068`. `git merge-base --is-ancestor 5e15928 044f231` exits 0, so the pin is older than the change. Until the pin moves to a commit that includes objectstack-ai/objectui#12901, the console this repo serves still lays an unplaced region out under `main`, and still lays an unregistered template out as the page type's layout. The new text describes the console the upgrade guide is written for. This PR does not touch `.objectui-sha`: the pin bump is a single-claim path and belongs to another card. ## Generated artifacts None is committed for this text. The upgrade guide is generated at publish and at docs build into gitignored paths. `packages/spec/src/migrations/registry.ts` is gitignored and was regenerated by the build. `pnpm --filter @objectstack/spec check:generated` exits 0, with all 14 artifacts up to date. A scratch render (`tsx scripts/build-upgrade-guide.ts --out SCRATCH_PATH`) carries the new sentence, and no copy of "renders as before, while saving it again" is left in it. ## Tests and gates (head `fdb41f468`, which merges `origin/main` `a237d7f49`) - `pnpm --filter @objectstack/spec build` (under the verify lock), before and after the merge: `VERDICT command-exit 0`. `check:generated` exits 0 at both heads. - `pnpm --filter @objectstack/spec test` on `fdb41f468`: 691 files, 20962 passed, 1 todo, `SPEC_TEST_EXIT=0`. The pre-merge head `e402d82e7` read the same counts. - `pnpm --filter @objectstack/spec typecheck` on `fdb41f468`: `SPEC_TYPECHECK_EXIT=0`. - No test pinned the old sentence (`git grep "renders as before, while saving it again"` finds only the entry), so no pin moved and none was added. This is prose, and no consumer parses it. - Derived gate families: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` gave 81 commands. Each was run on `fdb41f468` with its exit code captured before any pipe, and the record was reconciled with `--ran`: "81 derived famil(ies) accounted for — 80 run, 1 NOT-MEASURED". The one NOT MEASURED is `pnpm check:dual-build-cjs-loads`, which exited 3 (PREREQUISITE NOT MET). It loads every workspace package's built `dist/`, so it needs a full workspace build. That narrowing is declared here, and `Lint & Repo Gates` runs the gate in CI. `check:doc-formula-expressions` and `check:lean-entry-closure` refused until the `@objectstack/formula`, `@objectstack/lint` and `@objectstack/objectql` closure was built. Re-run after that build, both exit 0. Gates 27 to 56 were run again because their first pass overlapped that build, which rewrote `packages/spec/dist`. All 30 exit 0 on the second pass, and the first-pass readings are discarded as unmeasured, not counted as failures. The last derivation flags a stale tree: `origin/main` moved 3 commits after the merge (rest, service-settings), and the one derivation input that changed is `scripts/check-route-envelope.mjs`. None of those commits touches this entry. - No ablation: no tested behaviour changed. ## Acceptance notes - The same "unplaced region ... renders as before" wording is also in release-owned text, which this PR does not edit: the "Stored metadata keeps loading." paragraph of the 18.0.0-next.3 section in `packages/spec/CHANGELOG.md` and `packages/objectql/CHANGELOG.md`, and the consumed changeset `.changeset/pre/23610-page-isdefault-template-slots.md`. AGENTS.md sends a factual error in a released entry to a dedicated docs-only PR. It is in the report for the seat. - objectui's template-less `pageType` path still stacks an unplaced region that the spec judges against `default`. objectstack-ai/objectui#12901 recorded this in its own acceptance notes and left it as is. If objectui later retires that path, this entry's last sentence needs the same kind of edit. Noted here, not filed. --- _Generated by [Claude Code](https://claude.ai/code/session_01TyRhWbVbbQpQJTDbW8VahJ)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6ec0e12 commit 4f11af5

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
The protocol 18 migration `page-template-closed-region-unplaced-refused` now says what the console shows for a page row stored before the refusal. Its reason used to say such a row "renders as before"; on the console that ships with 18 it does not.
6+
7+
Clause-②: no
8+
9+
A stored page row with an unregistered template or an unplaced region is still served unchanged, and saving it again is still refused until it is renamed. Until then the console draws a refusal in its place. An unregistered template draws no layout, only a refusal that names the template and the registered templates. On a `default`, `header-sidebar-main` or `three-column` page, an unplaced region is not drawn and is not moved into another slot. Where it used to be stacked, under `main`, a refusal names it and the slots that template places. A page that names no template takes its page type's layout, which still stacks such a region under `main`.
10+
11+
The entry's acceptance criteria are unchanged: rename the template or region, and each renamed region draws in its slot.

‎packages/spec/src/migrations/entries/semantic/18.page-template-closed-region-unplaced-refused.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ export const entry: SemanticMigration = {
5656
+ 'page-template-full-width-to-default on read (full-width and default were one layout component in the '
5757
+ 'console, so nothing changes on screen); an unregistered template and an unplaced region have no lossless '
5858
+ 'rewrite and are not converted. '
59-
+ '⚠️ A page row already stored with an unregistered template or an unplaced region is served unchanged '
60-
+ 'and renders as before, while saving it again is refused until it is renamed. ADR-0087.',
59+
+ '⚠️ A page row already stored with an unregistered template or an unplaced region is served unchanged, '
60+
+ 'and saving it again is refused until it is renamed. Until then the console draws a refusal in its place: '
61+
+ 'an unregistered template draws no layout, only a refusal naming the template and the registered '
62+
+ 'templates; on a default, header-sidebar-main or three-column page an unplaced region is not drawn and '
63+
+ 'moves into no other slot, and where it used to stack, under main, a refusal names it and the slots that '
64+
+ 'template places. The exception is a page that names no template: it takes its page type\'s layout, which '
65+
+ 'still stacks such a region under main. ADR-0087.',
6166
acceptanceCriteria:
6267
'Grep every page in defineStack pages sources, exported stacks and every page row in sys_metadata for a '
6368
+ 'template outside default, header-sidebar-main, three-column and dashboard, and, on kind full pages, '

0 commit comments

Comments
 (0)