Skip to content

Commit ea28882

Browse files
docs(ui,skills): print pages author one record:details block per section (#34436)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XRT27U1unc64yMdYqqPWFjw)_ Part of #34228 Clause-②: no Metadata-protocol: none Ruling-ref: 6922479414 (item 3, letter C: 「规则不动,拆开报价单模板」) This is the text half of the card. PR #34422 carries its code half; this PR changes no code, no spec and no test. ## 维护者速读 - **改了什么**:打印页文档 `content/docs/ui/print-pages.mdx` 与已发布技能 `skills/objectstack-ui/rules/pages.md` 各加一句:分节可能跨页的打印页,每一节单独写一个 `record:details` 块。 - **为什么改**:`avoidBreakInside` 让每个块整块落在一张纸上,装了多节的一个大块会整块挪到下一张纸,第一张留下大片空白;维护者裁决 6922479414 保留规则含义不变,改为拆开模板。 - **风险与回滚**:只改文档与技能文字,不动代码、规格与测试;回滚即 revert 本 PR。技能文件为守住 token 上限(上限未动),删掉了一句已过时的「控制台打印渲染尚未上线」说法、一处重复的「, in full」,以及 Docs「Routing model」段里一个重复短语;react 页 Safety / availability 段保持与 main 逐字一致。 - **先看**:① `skills/objectstack-ui/rules/pages.md` 的 Print pages 段(新增句 + 删掉的过时句)与 Routing model 段一处删减;② `content/docs/ui/print-pages.mdx` 键表下方的新段;③ `.changeset/34228-print-section-per-block.md`。 - **两分钟验证**:运行 `node scripts/check-skills-token-ratchet.mjs`,预期 `✓ … 57 authored bundle file(s) within their ceilings`(pages.md 5666 / 上限 5669,上限未动)。 - **需要你做的**:席位按 Tier H(`skills/**`)移交维护者审批合并。 ## What changes - `content/docs/ui/print-pages.mdx`: one sentence under the print key table. On a print page whose sections may break between sheets, author one `record:details` block per section, because `avoidBreakInside` keeps each block whole on one sheet when it fits, so a block holding several sections moves to the next sheet as one piece. "When it fits" matches the describe of `print.avoidBreakInside` in `packages/spec/src/ui/page.zod.ts`. The rule itself is unchanged (`break-inside: avoid` on every block). - `skills/objectstack-ui/rules/pages.md`, § Print pages: the same guidance in one sentence after the page-break hints, in the file's compact voice. The `avoidBreakInside` gloss now reads "keep each block whole on one sheet when it fits", the spec describe's qualifier, because a block taller than one sheet still breaks inside itself. - The skill file sits on a token ceiling with zero headroom (`scripts/check-skills-token-ratchet.mjs`: 5669, measured 5668 on `main`), so the sentence is paid for by deleting content, the ceiling is not raised: - dropped the sentence "Validated today; the console's print rendering that applies it follows, so `os validate` warns the layout is not yet applied." It no longer holds: every `print.*` describe in `page.zod.ts` says "Applied by the console's browser print rendering", and `packages/spec/liveness/page.json` records every `print` key as `live`; - dropped the words ", in full" from "must draw all it declares, in full,". They only repeated "all it declares", and the "draws a window of its rows" refusal in the same paragraph still covers a block that draws part of its rows; - § Routing model: the sentence on the one global docs route ("… resolves any doc regardless of which app you came from") loses "regardless of which app you came from". The same paragraph already says the viewer is **platform-level** and the URL is single-coordinate with no package or app prefix, so no meaning is lost. This pays for the "when it fits" qualifier. The react page § Safety / availability section is byte-identical to `main` (no hunk there). - `.changeset/34228-print-section-per-block.md`: `@objectstack/skills` patch, because `skills/**` ships in that package. It also carries the two declaration lines. Skill size readings (taken against `origin/main` 9e6fee19e0 and head 5d97ca8): | Reading | Before | After | |:---|---:|---:| | `skills/objectstack-ui/rules/pages.md` lines | 432 | 433 | | `skills/objectstack-ui/rules/pages.md` tokens (ceil bytes / 4) | 5668 | 5666 (ceiling 5669, unchanged) | | All 11 `skills/**/SKILL.md` lines | 4594 | 4594 | ## Tests No test change. The diff is prose only: no code block, no spec key, no runtime path. ## Acceptance notes - Premise measurement (dev report 6923091449): with the quote template split into one `record:details` block per section, an A4 zh-CN print leaves 4% of page 1 blank at 3 line rows and 18% at 6 rows; the unsplit template leaves 35% and 18%. - The seat has posted the reporter reply on #34228. The template follow-up in HotCRM is hotcrm#2553 (p1). A long `record:line_items` table that moves whole to the next sheet is a separate card, #34427, which this ruling does not cover and this PR does not touch. - Lands as Tier H: one `skills/**` path makes the PR Tier H. ## Verification Round 3, head `5d97ca84f9`. `git diff origin/main -- skills/objectstack-ui/rules/pages.md` has three hunks: lines 76, 92 and 347 (print section ×2, Routing model). None is inside § Safety / availability. Token reading by the ratchet's own convention (`ceil(bytes / 4)`): 22663 bytes, so 5666 tokens against a ceiling of 5669, which is unchanged. CI at `5d97ca84f9`: `Lint & Repo Gates` success, and it runs `node scripts/check-skills-token-ratchet.mjs --self-test` and `node scripts/check-skills-token-ratchet.mjs` (lint.yml step `published-skills-token-ratchet-its-self-test`). Also success: Check Changeset, Check Documentation Links, every `Lint ·` lane, Test Core, Build Core, Build Docs, Governed Surface Queue Guard. Not green: `Type Check · workspace` (and its roll-up `TypeScript Type Check`) failed at the `Checkout repository` step (run 43935702379, CI infrastructure, before any repository code ran); it needs a re-run, which the relay cannot send for a lint.yml run. <details><summary>Round 3 local gates: NOT MEASURED (verify lock held by another run)</summary> `dispatch-gates --commands` at `5d97ca84f9` derives the same 70 commands as rounds 1 and 2. Three foreground attempts under `scripts/pm/os-verify-lock.sh` (slot `issue-34228-docs`) each ended `VERDICT queue-timeout (exit 99)`: the token ratchet alone once, then the whole derived set. The holder, pid 10445, is another card's run. Its dogfood build finished, and its `pnpm --filter @objectstack/dogfood test` had then sat at 0% CPU for about 20 minutes. Round 2's locked run at `31b3ea032b` (67 exit 0, 3 exit 3) is the last local reading. Round 3's diff from it touches prose only, in this one file and the changeset. </details> Merge-tree against the open PRs that touch print or this skill (#34422, #34433, #34390, #34267): all clean (exit 0). #34267 was read again after deepening the shallow checkout, because its merge base was outside the shallow window. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5pNoRjsgMJKr5utN33)_ <!-- signed: repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33 --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent e26e7be commit ea28882

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(ui, skills): a print page whose sections may break between sheets authors one `record:details` block per section
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ui/rules/pages.md`, § Print pages: one sentence after the page-break hints says that where sections may break between sheets, the author writes one `record:details` block per section, because `avoidBreakInside` keeps each block whole on one sheet when it fits (the qualifier the spec describe carries: a block taller than one sheet still breaks inside itself) and a multi-section block moves to the next sheet whole. The file pays for it within its token ceiling, which is not raised. It drops the sentence that said the console's print rendering was still to follow and that `os validate` warns the layout is not applied, which no longer holds: the console applies every `print` key. It also drops the words ", in full" from "must draw all it declares", which they only repeated; the "draws a window of its rows" refusal still covers a block that draws part of its rows. And § Routing model drops "regardless of which app you came from" after "one global `/docs/<name>` route resolves any doc": the same paragraph already says the viewer is platform-level and the URL has no package or app prefix. The docs page `content/docs/ui/print-pages.mdx` carries the same guidance under its key table. `avoidBreakInside` keeps its meaning; no schema or runtime change.

‎content/docs/ui/print-pages.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ panels are hidden, and the page runs onto as many sheets as it needs.
7474
| `repeatTableHeaders` | A table's column headings repeated on every sheet it runs onto; on when omitted |
7575
| `avoidBreakInside` | `break-inside: avoid` on each block of a region |
7676

77+
On a print page whose sections may break between sheets, author one `record:details` block
78+
per section: `avoidBreakInside` keeps each block whole on one sheet when it fits, so a block
79+
holding several sections moves to the next sheet as one piece.
80+
7781
Blocks print whole:
7882

7983
- `record:line_items` loads at most its row cap (`limit`, 500 when unset). On a print page,

‎skills/objectstack-ui/rules/pages.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ page and a `slotted` / `html` / `react` page.
7676
`repeatFooter` repeat the page's own `header` / `footer` region on every sheet
7777
(refused without that region; off = printed once); `pageNumbers` prints sheet
7878
number and count; the page-break hints `repeatTableHeaders` (on by default)
79-
and `avoidBreakInside` (keep each block whole).
79+
and `avoidBreakInside` (keep each block whole on one sheet when it fits).
80+
Where sections may break between sheets, author one `record:details` block
81+
per section: a multi-section block moves to the next sheet whole.
8082

81-
Every block, at any depth, must draw all it declares, in full, the same at
82-
any width: the containers `page:section` / `page:card` /
83+
Every block, at any depth, must draw all it declares, the same at any
84+
width: the containers `page:section` / `page:card` /
8385
`page:footer`, the field blocks `record:details` / `record:highlights`, the
8486
all-lines child table `record:line_items`, `element:text` / `element:image` /
8587
`element:divider` / `element:definition-list` / `element:repeater`, and the
@@ -92,9 +94,8 @@ to print** (`record:path`, tabs, buttons, inputs, forms — values print through
9294
`record:details`), or it is **outside the vocabulary** (`flex`, `object-chart`,
9395
a plugin widget), so nothing answers for how it prints.
9496

95-
Validated today; the console's print rendering that applies it follows, so
96-
`os validate` warns the layout is not yet applied. List export has no `'pdf'`;
97-
a list prints as shown via the view's `allowPrinting`.
97+
List export has no `'pdf'`; a list prints as shown via the view's
98+
`allowPrinting`.
9899

99100
<!-- os:check -->
100101
```typescript
@@ -347,7 +348,7 @@ behind the screen is not.
347348
### Routing model — platform-level viewer, opt-in entry
348349

349350
The viewer is **platform-level**: one global `/docs/<name>` route
350-
resolves any doc regardless of which app you came from. The URL is
351+
resolves any doc. The URL is
351352
**single-coordinate** — no package or app prefix — so a doc has exactly
352353
one URL. Do **not** design per-app or per-package doc URLs.
353354

0 commit comments

Comments
 (0)