Repository navigation
Commit 4f11af5
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
- .changeset
- packages/spec/src/migrations/entries/semantic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
0 commit comments