Repository navigation
Commit 23d0bc7
fix(spec): page.print and the flow terminal-toast translations read live in the liveness ledger, so a print page is no longer warned that nothing applies it (#23776)
Fixes #23710
Clause-②: no
The console at the `.objectui-sha` pin (`f96f771140f1`) prints a page
that declares `print` and shows the translated flow terminal toasts. The
liveness ledger still graded both `planned`, so `lintLivenessProperties`
told every author of a print page that printing it prints the screen
layout. This PR flips those verdicts to `live`, citing each objectui
reader at the pin, drops `print`'s `authorWarn`, and rewrites
`PagePrintSchema`'s describes, which said "until it ships, nothing
applies it". The accept set does not change. The `parentDataSource` leg
stays with #23585.
## Evidence per flipped verdict (objectui re-read at `f96f771140f1`, the
pin this lands against)
Each reader's landing commit is an ancestor of the pin: `git merge-base
--is-ancestor 2312bd9 f96f771` gives exit 0 (objectui#11958), and
`git merge-base --is-ancestor 42d8e8d f96f771` gives exit 0
(objectui#12075). Both were read in a full, non-shallow objectui clone.
**`page.json` `props.print`: 13 rows, all read, all flipped.** That is
the container, its 8 keys, and the 4 `margins` sides. The card counted
12 children, because `margins` is both a key and a container. No row
stays `planned`.
| Row | Reader at the pin |
|:---|:---|
| `print` (container) |
`packages/components/src/renderers/layout/page.tsx#PageRenderer` mounts
`buildPagePrintStylesheet(print)` as a `style` element, only when
`schema.print` is an object, and stamps the page root with
`PRINT_PAGE_ATTRIBUTE`. The refusals stay cited as before: the spec's
`checkPagePrintComposition` and lint's `validatePrintPageBlocks`. |
| `paperSize`, `orientation` | `page-print.ts#buildPagePrintStylesheet`
writes `@page { size }` through `pageRule`, and only for an enum member.
|
| `margins` and `margins.top` / `.right` / `.bottom` / `.left` |
`pageRule` writes one `margin-SIDE: Nmm` for each declared finite,
non-negative side. |
| `pageNumbers` | `pageRule` writes the `@bottom-right` margin box with
`counter(page)` / `counter(pages)`. |
| `repeatHeader`, `repeatFooter` | `page.tsx#RunningRegions` puts the
region in a real `thead` / `tfoot`. `runningRegionRules` turns that
table back into a table on paper. |
| `repeatTableHeaders` | `thead { display: table-header-group }`, or
`table-row-group` when the key is `false`. |
| `avoidBreakInside` | `break-inside: avoid` on every block of a region.
|
**`translation.json` `flows.successMessage` / `flows.errorMessage`.**
`packages/app-shell/src/utils/flowResponse.ts#translatedFlowMessage`
calls the spec's `translateFlow` for `flows.FLOW.KEY` and falls back to
the served string. `interpretFlowResponse` (the terminal-success arm)
and `flowFailureMessage` call it. `views/FlowRunner.tsx#FlowRunner`
passes the run's flow name and bundle. The spec-side evidence in each
row is unchanged.
`authorWarn` / `authorHint` are dropped from `print` in the same edit,
because `check:liveness` refuses them on a `live` row. With that, **no
shipped ledger row opts into `authorWarn` any more**: `print` was the
last one.
## Describes (`packages/spec/src/ui/page.zod.ts`)
Only text changed: the 8 key describes, `PageSchema.print`'s describe,
the `PagePrintSchema` docblock, the `print` property's docblock, and the
section comment above the printable subset. Each one now names the
console's browser print rendering as the consumer that applies the key.
The server-side PDF renderer (card ③) is still "to follow". No schema
shape, enum, alias or refinement was touched. `check:authorable-surface`
is in the gate run below.
## Pins
- `packages/lint/src/lint-liveness-properties.test.ts`
- **Reversed.** The #21127 control used `page.print` as its "warned
`planned` row". A new `#23710` block pins the issue's criterion on the
real ledger: a page declaring `print` gets no
`liveness-planned-property`. The anti-vacuity check is that the same
call still raises the `externalSharingModel` dead row.
- **Moved to the planted ledger.** The "a warned `planned` row still
warns" control now uses the planted translation group that the file
already uses for exactly this shape.
- **Re-anchored.** The hint-leak pin's anti-vacuity line asserted that
at least one shipped opt-in row exists. That row was `print`. The line
is removed, and its comment now says that both opt-in classes are held
by the SYNTHETIC case right below it.
- `packages/spec/scripts/liveness/check-liveness.test.ts`: the census
control asserted that the shipped walk reaches at least one warned row,
which was `print`. The reach is now proved on a copy with one shipped
`planned` row marked `authorWarn`: the gate stays green and the census
counts exactly one more row.
## Generated
`content/docs/references/ui/page.mdx`, `liveness/state-counts/page.md`
(planned 11 → 0) and `liveness/state-counts/translation.md` (planned 2 →
0) were regenerated with `gen:docs` and `gen:liveness-counts`. Those are
the two that `check:generated` proved stale. Nothing was hand-written in
them.
## Verification (head `6375c0cb15`)
- `pnpm --filter @objectstack/spec test`: 679 files, 20,756 passed, 1
todo, exit 0. Run under `os-verify-lock` on head `6375c0cb15`.
- `pnpm --filter @objectstack/lint test`: 139 files, 6,767 passed, 5
skipped, exit 0. Run on `d03703eb`. The lint package has not changed
since; the only later commit edits a spec script test.
- `typecheck` exit 0 for `@objectstack/lint` (`tsc --noEmit` +
`check:test-typecheck`) and `@objectstack/spec` (`tsc --noEmit` +
`check:scripts-typecheck` + `check:test-typecheck`).
- `check:generated` on the built spec: the first run named exactly two
stale artifacts (`content/docs/references/**`,
`liveness/state-counts/`), both regenerated. It is in the derived run
below at exit 0.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (no paths) gives 110 commands. Each was run
with its exit code captured before any pipe, on head `6375c0cb15` after
a full workspace build: **110 exit 0**. The `--ran` reconciliation over
the `COMMAND :: exit N` record reports "110 derived, 110 run, 0
NOT-MEASURED, 0 UNRUN (a DERIVED zero)". An earlier pass on `9c9f0a3e`
returned 7 `PREREQUISITE NOT MET` exit 3s (unbuilt `dist/` and a shallow
clone). Those are not measurements; they cleared after `git fetch
--unshallow` and the build.
- Local-only families: `check:dev-prereqs` exit 0,
`check:skill-frame-freshness` exit 0.
- CI owns everything else (the artifact rosters, wide-population
families, path-scheduled jobs and type-check lanes that `dispatch-gates`
lists outside the derived total).
- No ablation: no runtime behaviour changed. What the ledger flip did
change was observed directly: against the flipped ledger, the two
anti-vacuity pins that counted on a shipped opt-in row went red
(`lint-liveness-properties.test.ts` hint-leak pin, "expected 0 to be
greater than 0"; `check-liveness.test.ts` census, "a walk reaching zero
warned rows is a degraded walk"). Both were re-anchored as described
above. I rewrote the `print` control before running it against the new
ledger, so its red was not observed.
## Acceptance notes
- `packages/spec/liveness/README.md`: the `page` and `translation` prose
cells described the old verdicts, so I updated them. These two cells are
outside the claim's listed file surface, but leaving them would keep a
published statement this PR makes false.
`packages/spec/scripts/liveness/check-liveness.test.ts` is outside the
listed surface for the same reason: its pin asserted the old census.
- `.changeset/pre/22158-print-page-spec.md` still says nothing applies
`print`. That file is pre-mode release state, so this PR leaves it
alone.
- `check-liveness.mts` has a comment recording an old count ("3 opt in
with `authorWarn`"). It is a dated measurement, not a claim about the
current tree, and is left as is.
- PR #23708 edits other regions of `page.zod.ts` and
`liveness/page.json` and also regenerates `page.mdx`. It was not on
`main` when this was pushed, so whichever lands second merges `main` and
regenerates through `scripts/pm/os-regen-merge.sh`, keeping both
changes.
- Changeset: `@objectstack/spec` patch. The ledger (`files[]` includes
`liveness`) and the describes ship in the package, and
`@objectstack/lint` reads the ledger from it. `@objectstack/lint`'s
published code is unchanged; only its tests changed.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QVkaSahaBPN9mkBRwLJ44o)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9d4fb3c commit 23d0bc7
10 files changed
Lines changed: 215 additions & 118 deletions
File tree
- .changeset
- content/docs/references/ui
- packages
- lint/src
- spec
- liveness
- state-counts
- scripts/liveness
- src/ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
| |||
0 commit comments