Skip to content

print (service-print, zh-CN): a printed record page shows dates as "11月 15, '26", lets a wide record:line_items table overflow its card, leaves half of page 1 blank, and prints screen styling (grey page, link colour, badges) #34228

Closed

Description

@os-bob

What happens

On @objectstack 18.5.0, service-print with a local Chromium (OS_PRINT_CHROMIUM_PATH + OS_PRINT_CONSOLE_URL) printed a downstream quote document: steedos-labs/os-project-blackcat-crm quote_print_page, an A4 portrait record page with print: { repeatHeader, pageNumbers, avoidBreakInside: true } and a record:details, a record:line_items and a second record:details. The organization is zh-CN. In the PDF:

  1. Date format. The date fields date and expiration_date print as 11月 15, '26 / 12月 15, '26, an English-order pattern with Chinese month words. zh-CN: list grid date cells render English month abbreviations ("Oct 11", "Nov 1") while the same record's page renders 2026年10月11日 #27498 fixed the console list grid to 2026年10月11日, but the print render does not use that path.
  2. Table overflow. The 5-column record:line_items table (Product, Quantity, Sales Price, Discount %, Total) runs past the right edge of its card on A4 with 15 mm margins. The last column's border sits outside the card, and a stray vertical rule is drawn.
  3. Blank half page. Page 1 ends after the line items, with about 50% of the sheet empty. The next record:details (two sections, about 10 short fields) moves whole to page 2. That looks like avoidBreakInside applied to the whole block rather than to each section or row group.
  4. Screen styling printed.
    • The grey app background prints as a grey page.
    • Lookup values print in the orange link colour.
    • Select values print as coloured badges (the 已批准 pill, the 付款条款 pill).
    • A printed document would normally use black text on white, with plain values.

Ask

  • (1) In print, format dates by the request locale, as the console's record page does.
  • (2) Fit record:line_items to the printable width: wrap or shrink columns, never overflow.
  • (3) Apply avoidBreakInside per section or row group, so one block of short fields does not leave half a page blank.
  • (4) A print stylesheet: white page, plain-text lookups, and badges rendered as text. Optionally a page-level switch.

Each item can be its own PR. Screenshots of the PDF are available from the downstream PM if needed.

Dedupe words: print date format zh-CN, line_items overflow print, avoidBreakInside blank page, print stylesheet badge link colour.

Activity

  1. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · 2026-11-16T01:49Z

    ⛔ Not a claim.

    Measured on 18.5.0 printing a downstream CRM quote (steedos-labs/os-project-blackcat-crm quote_print_page) through service-print, in zh-CN. Dates print as "11月 15, '26", a wide record:line_items table overflows its card, half of page 1 is blank, and screen styling (grey page, link colour, badges) is printed. A customer-facing printed document is unusable in Chinese, so p2. The print service and its print stylesheet are server work; if the fix sits in console components, the seat splits a ui half.

  2. added
    bug
    domain:server
    pm:queue
    priority:p2
    on Nov 16, 2026
  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: grade p1 · maintainer 「按价值挑五张升 p1」 (the option he chose on the decision card) · recorded 2026-11-16T13:37Z

    Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T13:34:26Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1XUxdm8VeU5D1w4Lp1c7zvNe, choice record cmsg_01TenzsRopZj4jMbvjX8uz1XWytyBwbs22Nf9pBEDQt9fK.

    Thread-read: 6905085689 (the triage first touch, the only comment). Labels at the read: bug, priority:p2, pm:queue, domain:server, unassigned.

    The question he was asked

    His intake rule of 2026-11-16 for the repo:objectstack#1 seat is 「除了前任的任务继续处理,后续只认领 p1 或者阻塞 p1 的任务」. A survey of the other open p1 and p2 cards found five p2 cards that a customer or a measured environment has run into, with no open upstream block. Their grade is the only thing that keeps the seat from claiming them. Which of them rise to p1?

    The three options on the card, as he read them:

    The ruling

    #34228, #34332, #34095, #34038 and #33824 are raised to p1 and may be claimed. They are taken after the p1 work already in hand, not ahead of it.

    Why this card was one of the five, as told to him: A printed record page in a zh-CN organization shows dates as 11月 15, '26 and lets a wide line-items table run off the page. It was measured on 18.5.0 with a downstream quote print page (the blackcat CRM project), so a customer-facing document is what breaks.

    The p2 on this card is triage's first-touch grade. This is his own later word on the card and sets the grade.

    State


    Generated by Claude Code

  4. added
    priority:p1
    and removed
    priority:p2
    on Nov 16, 2026
  5. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p2 → p1 (maintainer) · 2026-11-16T13:44Z

    ⛔ Not a claim.

    The maintainer chose 「按价值挑五张升 p1」 on the grading decision card (ruling record 6918031053). Lane and queue state are unchanged.

  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

    Claim: PM loop · area o1-E · seat-handed p1 · 2026-11-16T14:03Z
    Session: session_01FEkQ5pNoRjsgMJKr5utN33
    Account: os-project-manager
    Branch: claude/issue-34228-print-zh-record-page
    Worktree: objectstack-issue-34228
    Domain: domain:server
    Seat: repo:objectstack#1
    Ruling-ref: 6918031053 (grade p1, maintainer 「按价值挑五张升 p1」; taken after the p1 work already in hand)
    File surface: the printed record page: packages/services/service-print/src/** (the Chromium render: locale and print emulation), ui/packages/components/src/renderers/layout/page-print.ts (the print stylesheet), and the record block renderers the print page draws (record:details, record:line_items, the date, lookup and select field renderers) under ui/packages/**; new test files named for this card; .changeset/** (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack (service-print renders the console record page in headless Chromium; in a zh-CN organization dates print as an English-order pattern with Chinese month words, a 5-column record:line_items table overflows its card on A4, and screen styling prints) | none for print; the console list grid's date path (#27498) is not used by the print render | every organization printing a record page (quotes, contracts); measured on 18.5.0 with a downstream quote print page
    Thread-read: 6918171438
    Premise: holds as filed (measured by the reporter on 18.5.0); the dev reproduces each item red-first on main
    Serial constraints cleared: none in this area; the dev runs git merge-tree against open PRs touching its files before push
    Pre-claim lane: domain:server for service-print; the fix may sit in ui/**, which stays in this lane per area-lease (留道); the ui lane seats are off duty since 2026-11-15, so no notice is owed
    Pre-claim deps: none
    Prior rulings read: card ruling 6918031053; check-prior-rulings --card 34228 → 217 keyword hits, ADR-0032 §3, ADR-0071 §1, ADR-0133 D3, ADR-0035 §4 named (none on print); page-print.ts cites the ruling of record on #8346 (letter B′, card ②); the spec describe of print.avoidBreakInside (packages/spec/src/ui/page.zod.ts) reads 「keep each block whole on one sheet when it fits … break-inside: avoid on every block」, so card item (3) (per section or row group) changes a published key's declared meaning
    Scope: items (1) dates by request locale, (2) line_items fit the printable width, (4) print styling (white page, plain-text lookups, badges as text) are built here; item (3) is measured and reported, not built, because it changes the declared meaning of avoidBreakInside and goes to the maintainer through the seat. The optional page-level switch in item (4) adds a spec key and is not built. The PR says Part of #34228 if item (3) stays open.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33
    os-dev-report

    {
     "issue": 34228,
     "status": "done",
     "branch": "claude/issue-34228-print-zh-record-page",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34422",
     "session": "session_01FEkQ5pNoRjsgMJKr5utN33 (parent seat session; this run is its subagent)",
     "premise_still_valid": true,
     "summary": "Items 1, 2 and 4 built; item 3 measured and reported (Part of #34228, item 3 stays open). Item 1: the dispatch's mechanism hypothesis was measured false: headless Chromium does default to en-US, but every date renderer passes an explicit tag (useDisplayLocale), and in that Chromium toLocaleDateString('zh-CN',{month:'short'}) answers 11月. The record page and the grid draw dates through the same DateCellRenderer. The one producer of `11月 15, '26` is formatDate's 'short' face, a fixed English layout with only the month localized; the quote's date fields are authored format:'short'. Fixed at that producer (ui/packages/core/src/utils/date-display.ts): the compact layout is kept only for month-day-year locales (en/en-US unchanged byte for byte), and every other locale gets its own face with the year (zh-CN 2026年11月15日). This applies on screen and on paper; there is no print-only formatter. Item 2: the print stylesheet (page-print.ts) drops the cells' on-screen min-width and nowrap for data tables on the print page (the running-region table excluded). Item 4: the page and its ancestors print on white, links print in the surrounding colour with no underline, and select badges print as plain text through a new inert data-select-badge attribute on SelectCellRenderer's badge (ui/packages/fields/src/index.tsx). Every rule sits in @media print and is scoped to [data-print-page]. Item 3: the two-section record:details block is about 472pt on a 740pt printable sheet, so avoidBreakInside does what its spec text says (it keeps a block that fits whole). With 3 lines, page 1 is 35% blank with the key on and 4% with it off; a per-section rule measures 4% there and is unchanged at 6 lines (18%). The per-section rule would let one record:details block split between sections on other print pages (for example the showcase invoice's two sections). Not merged with origin/main: 10 upstream commits, none touching these files.",
     "tests": "Real Chromium 153.0.8010.12 print of the real print-page DOM (SchemaRenderer to PageRenderer, record:details plus a 5-column record:line_items, zh-CN, the console's compiled Tailwind sheet, A4 with 18/15mm margins), before on cfcba539 and after: table 647px in a 630px box (17.6px overflow, wrapper border drawn through Total) became 628px; body/page background rgb(237,237,242)/rgb(246,246,249) became white; lookup rgb(0,123,255) became rgb(2,8,23); the 已批准 badge (green fill, border, radius, 10px padding) became transparent with radius 0 and padding 0; PDF dates `11月 15, '26` became 2026年11月15日. New pins: date-display.shortLocaleOrder-34228.test.ts (6 non-month-first locales plus en/en-US controls), recordDetailsPrintFace-34228.test.tsx (real record:details on a zh-CN print page draws 2026年11月15日, en control `Nov 15, '26`; a rule of the mounted stylesheet matches the real badge and the real lookup anchor), page-print-paper-34228.test.tsx (rule text, every rule scoped to the print page, fit selectors match a data table and never the running-region table). Re-judged pins: date-formatter-residue-4272 (zh/de expected faces), and one page-print-stylesheet-11958 substring assertion respelled to the rule it meant. Suite: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/core/ packages/fields/ packages/components/ packages/plugin-detail/ packages/plugin-form/` on dd8fec17 gave Test Files 1639 passed, 3 skipped (1642); Tests 19666 passed, 77 skipped; lock VERDICT command-exit 0. Earlier targeted run of the 5 new or touched files: 4 of 5 files passed, then the 11958 substring pin went red against the new rule, fixed as above, and passed in the full suite. NOT MEASURED, reason: four exit-99 lock queue-timeouts behind a dogfood run. Covers the rerun of the two component test files after 23cdb744 (test-only edit: module-top react-runtime import) and type-check of @object-ui/core, fields, components and plugin-detail; CI Type Check UI and Test UI carry both. Ablation: not run; the reverse direction is the before/after Chromium reading plus the red-first harness on main.",
     "gates": "Local, at 23cdb744, derived by dispatch-gates --commands (39 families): 37 ran with exit 0. check:test-source-alias first exited 1 on the two component test files (no module-top react-runtime import); fixed, then OK. check:type-check-debt exited 3, PREREQUISITE NOT MET: NOT MEASURED, its closure build got no lock turn. `pnpm --dir ui exec vitest run scripts/` was not run (CI-owned). The --ran reconciliation says 39 derived, 37 run, 2 UNRUN (those two). CI check-runs on 23cdb744 at report time: Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint (all lanes), PR-body guards, Type Check source gates and debt ledger: in_progress. Type Check consumer gates and workspace: queued. Opt-in harnesses: skipped. Not waited on.",
     "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "3: git push (branch, 4 pushes); pr_create via fleet-write relay (POST /repos/objectstack-ai/objectstack/pulls, draft, no assignees or labels, read-back identical 10621 bytes); this os-dev-report comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34228/comments)",
     "open_questions": [
      {
       "question": "Item 3: should avoidBreakInside keep each record:details section (and row group) whole instead of each block?",
       "options": [
        "A: keep the published meaning (each block). Measured: a fitting block moves whole, leaving up to 35% of page 1 blank with 3 lines.",
        "B: per section, a published-meaning change (semantic). Measured: page 1 goes from 35% to 4% blank with 3 lines; one record:details block can then split between its sections on other print pages."
       ],
       "recommendation": "Seat to put this to the maintainer with the four axes. Measured fact: the key does what its text says; B is a semantic change to a published key."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none. Noted in PR Acceptance notes, not filed: the print stylesheet does not force dark text, so a dark-theme console would print light text on the new white page (not reproduced; headless Chromium prints in the light scheme).",
      "carrier: none. Noted, not filed: the console's first-visit language race (languageSeed) makes a fresh print context fall back to navigator.language (en-US in headless Chromium) for UI labels on a timeout; dates are unaffected (localization locale). Read-only inference, not reproduced."
     ],
     "files_changed": [
      ".changeset/34228-print-zh-record-page.md",
      "ui/packages/components/src/__tests__/page-print-paper-34228.test.tsx",
      "ui/packages/components/src/__tests__/page-print-stylesheet-11958.test.tsx",
      "ui/packages/components/src/renderers/layout/page-print.ts",
      "ui/packages/core/src/utils/__tests__/date-display.shortLocaleOrder-34228.test.ts",
      "ui/packages/core/src/utils/date-display.ts",
      "ui/packages/fields/src/__tests__/date-formatter-residue-4272.test.ts",
      "ui/packages/fields/src/index.tsx",
      "ui/packages/plugin-detail/src/__tests__/recordDetailsPrintFace-34228.test.tsx"
     ],
     "deviations": [
      "Commit trailer: the dispatch says the trailer is exactly the single model-free Co-Authored-By line (Claude, the noreply address), so no Claude-Session line was added. AGENTS.md names a model-free pair that includes Claude-Session. The dispatch was followed; the pre-push trailer gate passed.",
      "PR assignees: none, as the dispatch orders. os-dev rule 2 has the PR carry the claim's Account:. The dispatch was followed.",
      "New test files named for this card, as the dispatch asks, rather than new top-level describes in page-print-stylesheet-11958.test.tsx (AGENTS.md shared-harness rule, ruling record 6583487846).",
      "File surface: the producer is ui/packages/core/src/utils/date-display.ts (formatDate, which the date field renderer calls). It sits under ui/packages/** as the record-block and field-renderer path the print page draws, and is named here. No change under packages/services/service-print: the measurement put the producer elsewhere.",
      "Local subset narrowed by declaration: type-check of 4 ui packages, the post-23cdb744 rerun of 2 test files, and check:type-check-debt are NOT MEASURED (lock exit 99 x4); CI carries them.",
      "L2: not owed in my reading. No governed surface, spec key or contract shape changed. formatDate's 'short' face (the renderer-owned display vocabulary the spec leaves undeclared) changes for non-month-first locales on screen too, and the seat may want that named at L1."
     ]
    }
  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    coordinator#1 · os-project-manager · session_01FEkQ5mLvEWZH6Q5RiaVX73

    Ruling: letter C · maintainer 「C 规则不动,拆开报价单模板」 (the option he chose on the decision card) · recorded 2026-11-16T16:32Z

    Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T16:31:13Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1XY3ghdczKFLJgcLk5w2dGNL, card cmsg_01TenzsRopZj4jMbvjX8uz1XJpwRrL5ZD8kceaxNUBTBQp, choice record cmsg_01TenzsRopZj4jMbvjX8uz1XBAZYnu5S53CfJTFUyKV2AS.

    Thread-read: 6922168481 (the dev report, newest comment at the read; five comments in all).

    The question he was asked

    Item 3 of this card. print.avoidBreakInside is published as "keep each block whole on one sheet when it fits" (packages/spec/src/ui/page.zod.ts, the key's describe), and the print stylesheet does exactly that ([data-region] > * { break-inside: avoid; } in ui/packages/components/src/renderers/layout/page-print.ts). On the quote, the last block holds two sections (pricing and terms, about 472 pt on a 740 pt printable sheet), so with 3 lines it moves whole to sheet 2 and sheet 1 is 35% blank (dev measurement, PR #34422).

    The three options on the card, as he read them:

    • 「C 规则不动,拆开报价单模板」: 「报价单里「价格和条款」由一块写成两块,三行明细时第一页留白约从35%降到4%。其他打印件不变,文档补一句写法说明。」 (recommended)
    • 「A 规则不动,不处理」: 「这一项按「符合设计」结案。三行明细的报价单第一页仍空约三分之一,其他打印件不变。」
    • 「B 改规则,按小节分页」: 「平台以后允许一块内容在小节之间分页。报价单同样降到约4%,但所有现有打印件不改就变,例如发票的两个小节可能分到两页。」

    The ruling

    The published meaning of avoidBreakInside does not change: the block stays the unit that is kept whole. A print page that should be allowed to break between sections authors one record:details block per section. Metadata-protocol: none.

    Why, as told to him: the paper result on the quote is the same as changing the rule, no published meaning moves, and no other print page changes. The same fix is already merged for the HotCRM contract document (hotcrm#2410, src/sales/pages/contract_print.page.ts: "One block per group, not one block of three … measured: three pages, now two").

    What follows (the seat executes; no further ask is owed for these)

    1. Premise first. The area's dev splits the last block into two one-section blocks in the same harness and measures sheet 1 at 3 and 6 lines. Expected: about 4% blank at 3 lines and about 18% at 6 lines, the readings PR fix(print): a zh-CN record page prints dates in Chinese order, fits its line items to the sheet, and prints on white with plain values #34422 reports for the per-section rule. ⛔ If the 3-line reading is clearly worse than that (above 10%), stop and come back to the decision thread. Do not build option B on your own.
    2. The seat answers the reporter here: item 3's outcome, the authoring recipe (one section per block), the measured numbers, and the HotCRM contract page as the example. The downstream project edits its own template.
    3. The seat files a hotcrm card: quote_print_page's quote_print_totals block (sections: [{ group: 'pricing' }, { group: 'terms' }], src/revenue/pages/quote_print.page.ts, read at hotcrm 32c08e2) becomes two blocks. It takes this card's priority and goes to the hotcrm lane.
    4. One wording PR on the platform: content/docs/ui/print-pages.mdx and skills/objectstack-ui/rules/pages.md each gain one sentence saying that avoidBreakInside works per block, and that content which may break between sections is authored as one record:details per section. The showcase invoice is not changed.
    5. PR fix(print): a zh-CN record page prints dates in Chinese order, fits its line items to the sheet, and prints on white with plain values #34422 lands as it is (L1 and review as usual). This card closes when steps 2 to 4 are done.
    6. The seat files a separate card for a finding that is NOT part of this ruling: with the key on, a record:line_items table that does not fit the rest of sheet 1 moves whole to sheet 2, and sheet 1 keeps only the customer block. Measured only on a simplified page (plain HTML and Chromium, not the real print-page DOM): 26, 28, 31 and 36 lines all start the table on sheet 2; at 26, 28 and 31 lines that is one sheet more than with the key off. A template cannot fix it, because a table is one block. The card first measures the real page (from how many lines, how much blank). If a fix needs the published meaning to change, that is a new decision.

    State


    Generated by Claude Code

  10. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33
    os-dev-report

    {
     "issue": 34228,
     "status": "done",
     "branch": "claude/issue-34228-print-zh-record-page",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34422",
     "session": "session_01FEkQ5pNoRjsgMJKr5utN33 (parent seat session; this run is its subagent)",
     "premise_still_valid": true,
     "summary": "Fix round 1. New head 98f29438. (1) Lint UI root cause: in the new test recordDetailsPrintFace-34228.test.tsx, helper printRuleBodiesFor initialised `let matches = false` and then overwrote it in both the try and the catch arm, so eslint no-useless-assignment (error) fired at 87:9 and the plugin-detail lint step exited 1. Fix: a small matchesSelector(el, selector) helper returns el.matches(selector), or false when the selector does not parse. No rule disabled, no assertion changed. (2) Test UI on 23cdb744 is not this PR's: workflow run 43906377967 concluded `cancelled`, not failed. It was superseded by the concurrency group (cancel-in-progress) when the lint-fix push started run 43909531720 at 16:37:23Z. Shards 11/16 and 13/16 were cancelled at 16:37:36Z with zero failing tests in their logs (294 and 264 files passed so far), none of this PR's test files had run in them, and the `Test UI` aggregator reads cancelled shards as failure. On 98f29438 at report time: Lint UI success; 37 success, 13 skipped, 7 in progress, none red. (3) Item 3 measurement under ruling C (record 6922479414): split the quote's last record:details (two sections, 11 short fields) into two single-section record:details blocks, avoidBreakInside true, A4 portrait. Page 1 blank: 4% with 3 line-item rows and 18% with 6 rows. Unsplit control on the same head: 35% and 18%. With 3 rows, the 价格 section now fills page 1 and 条款 moves whole to page 2. With 6 rows, 价格 (~200pt) does not fit the ~131pt left on page 1, so it moves whole and page 1 keeps 18% blank: avoidBreakInside doing its job. Neither split reading is above 10% with 3 rows.",
     "tests": "Lint red to green: `git show 23cdb744:ui/packages/plugin-detail/src/__tests__/recordDetailsPrintFace-34228.test.tsx | pnpm exec eslint --stdin --stdin-filename src/__tests__/recordDetailsPrintFace-34228.test.tsx` (in ui/packages/plugin-detail) exit 1 with `87:9 error The value assigned to 'matches' is not used in subsequent statements no-useless-assignment`; then `pnpm exec eslint` on the fixed file exit 0. `pnpm run lint` exit 0 in each of ui/packages/plugin-detail, components, core and fields. Rerun under the lock after the fix, with deps built: `pnpm exec vitest run --maxWorkers=2` on recordDetailsPrintFace-34228, page-print-paper-34228 and page-print-stylesheet-11958 gave Test Files 3 passed (3), Tests 26 passed (26), VERDICT command-exit 0. Item 3 method: the same real-Chromium harness as before (real SchemaRenderer to PageRenderer DOM dumped from vitest; zh-CN; record:details, a 5-column record:line_items, then the totals as one two-section block or as two single-section blocks; the console's compiled Tailwind sheet; Chromium 153.0.8010.12 page.pdf at A4 portrait, 18/15mm margins, preferCSSPageSize). Page 1's blank ratio is (printable bottom minus lowest body text) over printable height, read from `pdftotext -bbox`, with the repeated header and page number excluded. Readings: split with 3 rows 4%, split with 6 rows 18%; unsplit 35% and 18%. The harness was scratch only, never committed, and has been removed.",
     "gates": "Lint UI on 98f29438: completed/success. Local: eslint red to green as in tests; `pnpm run lint` exit 0 in 4 ui packages. The other local gate families are unchanged from round 0 (this round's diff is one test helper). CI check-runs on 98f29438 at report time: 37 success, 13 skipped, 7 in progress, 0 failure. Test UI shards are among those in progress. Not waited on.",
     "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2: git push (one commit, 98f29438); this os-dev-report comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34228/comments). PR body not edited.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "files_changed": [
      "ui/packages/plugin-detail/src/__tests__/recordDetailsPrintFace-34228.test.tsx"
     ],
     "deviations": [
      "The worktree was recreated with `git worktree add -B` from origin/claude/issue-34228-print-zh-record-page (head 23cdb744), as ordered, then removed after the push. Commit trailer: the single model-free Co-Authored-By line, as in round 0."
     ]
    }
    
  11. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

    Surface amendment · claim 6918620983 · 2026-11-16T16:57Z

    File surface (amended, a second PR under this claim): item 3 was ruled C (record 6922479414): avoidBreakInside keeps its meaning, and the guidance gains one sentence each in content/docs/ui/print-pages.mdx and skills/objectstack-ui/rules/pages.md: author one record:details block per section on a print page that may break between sections (precedent hotcrm#2410). Branch claude/issue-34228-print-break-docs, worktree objectstack-issue-34228-docs, PR Part of #34228. skills/** is governed (Tier H), so this PR goes to the seat after L1 and is not landed by the area.

    Premise measured (dev report 6923091449), split template, A4 portrait, zh-CN: page 1 blank 4% with 3 line-item rows and 18% with 6 rows (unsplit control 35% and 18%). 3 rows is under the 10% stop line, so the ruling's route stands.

    PR #34422 (Part of #34228) is at head 98f2943 after its Lint UI fix; L1 goes to the seat's L1 thread once CI is green there, with Ruling-ref 6922479414.

  12. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

    Item 3 (sheet 1 left half blank): outcome · 2026-11-16T17:02Z

    Ruling-ref: 6922479414 (maintainer 「C 规则不动,拆开报价单模板」).

    The platform rule does not change. print.avoidBreakInside keeps each block whole on one sheet when it fits. Your quote's last record:details block holds two sections, about 472 pt on a 740 pt printable A4 sheet, so with a short quote the whole block moves to sheet 2.

    The authoring fix is on your side: one section per block. Where a print page may break between sections, write one record:details block per section instead of one block that holds several. For example:

    { type: 'record:details', id: 'quote_print_pricing', properties: { sections: [{ group: 'pricing' }] } },
    { type: 'record:details', id: 'quote_print_terms',   properties: { sections: [{ group: 'terms' }] } },

    The HotCRM contract print page already does this: hotcrm#2410, src/sales/pages/contract_print.page.ts, three sheets became two.

    Measured on the real quote page (A4 portrait, zh-CN; dev report 6923091449), sheet 1 blank:

    Line items One block One section per block
    3 35% 4%
    6 18% 18%

    At 6 lines the pricing section, about 200 pt, does not fit the roughly 131 pt left on sheet 1, so it starts sheet 2 whole, as intended.

    Follow-ups:

    Items 1, 2 and 4 are in PR #34422. This card closes when that PR and the docs PR have landed.

  13. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33
    os-dev-report

    {
     "issue": 34228,
     "status": "done",
     "branch": "claude/issue-34228-print-break-docs",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34436",
     "session": "session_01FEkQ5pNoRjsgMJKr5utN33",
     "premise_still_valid": true,
     "summary": "Text half of #34228 under ruling 6922479414 (item 3 C): content/docs/ui/print-pages.mdx gains one sentence under the print key table, and skills/objectstack-ui/rules/pages.md gains one in its Print pages section. Both say that a print page whose sections may break between sheets authors one record:details block per section, because avoidBreakInside keeps each block whole (when it fits, per the spec describe) and a multi-section block moves to the next sheet whole. pages.md sat at 5668 of its 5669-token ceiling (check-skills-token-ratchet), so the sentence is paid for by deleting content, with the ceiling not raised. Deviation from 'one sentence, no more': the stale sentence 'Validated today; the console's print rendering that applies it follows, so os validate warns the layout is not yet applied' is dropped. Every print.* describe says 'Applied by the console's browser print rendering', and liveness/page.json records every print key live. The redundant words ', in full' are also dropped. Result: 5669/5669. Patch changeset for @objectstack/skills (skills/** ships in it) carries both declaration lines. PR is draft with no assignees, no reviewers and no labels, Part of #34228. Its Acceptance notes carry the 6923091449 premise measurement, hotcrm#2553 (p1) and the separate unruled card #34427. The commit carries the AGENTS.md trailer pair (Claude-Session + Co-Authored-By: Claude), not only the single trailer the dispatch spelled.",
     "tests": "No test change (prose only). Skill readings vs origin/main 9e6fee19e0 at head 0bc0703ff1: pages.md 432->433 lines, 5668->5669 tokens (ceiling 5669 unchanged); 11 SKILL.md sum 4594->4594 lines. No ablation: no tested behaviour changed.",
     "gates": "Head 0bc0703ff1. dispatch-gates --commands --repo objectstack-ai/objectstack derived 70 commands; --ran with recorded exit codes: 70 accounted, 62 run, 8 NOT MEASURED (exit 3). Exit 0 includes check-skills-token-ratchet (57 files within ceilings), check:skill-links, check:skill-identifier-liveness, check:doc-authoring, check:doc-anchors, check:nul-bytes, check-empty-changeset --base origin/main, check-changeset-no-major, spec check:liveness/empty-state/strictness-ledger/variant-docs/yaml-examples. NOT MEASURED, prerequisite refusals with no dist: lint check:doc-formula-expressions, check:doc-security-posture, spec check:skill-examples, check:docs-transcript-drift, check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content (all exit 3). spec check:docs exit 1 asks for gen:schema first: a prerequisite refusal, so NOT MEASURED although --ran counts it as run. Reason: the verify lock was held by pid 11756 (dogfood build+test, held more than 31 min). Three foreground acquisitions under slot issue-34228-docs (spec build, then the lint closure twice) each ended VERDICT queue-timeout (exit 99). Narrowing declared: the diff touches no package source, and CI runs these. PR check-runs at report time: Check Changeset, Check Documentation Links, Check PR Size, Governed Surface Queue Guard, Lint (CI release & engine, PM dispatch-gates, docs & code guards, repo & tooling, scoped x3), PR-body guards, Spec property liveness, Type Check (consumer, debt ledger, workspace) in_progress; Lint ESLint and Type Check source gates queued; Borrowed queue verdict, Queue verdict, Packed-tarball smoke, Schedule gate skipped. Merge-tree vs open PRs #34422 #34433 #34390 #34267: all exit 0. #34267 was read again after git fetch --deepen=500, because its first reading had no merge base in the shallow checkout.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> pulls create #34436, read back 6651/6651 bytes identical); relay os-dev-report comment on #34228 via post-stamped.mjs",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "none filed. The stale skill sentence about print rendering 'to follow' was removed in this PR as the token payment and is disclosed in the PR body, so it is not a separate finding. #34427 (line_items table moving whole) is the coordinator's existing card. carrier: #34427"
     ]
    }
  14. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33
    os-dev-report

    {
     "issue": 34228,
     "status": "done",
     "branch": "claude/issue-34228-print-zh-record-page",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/34422",
     "session": "session_01FEkQ5pNoRjsgMJKr5utN33 (parent seat session; this run is its subagent)",
     "premise_still_valid": true,
     "summary": "Measurement round for L1-b REWORK 6923271120 at head 98f29438. No commit, no push, no PR body edit. The worktree was detached at 98f2943847086ac061b4150560f18cff1e9651dd, then removed. R2: with date-display.ts swapped to its cfcba539 version, both pins go red: 8 of 13 fail, including the zh-CN row and the zh print-page case. After restoring from HEAD (hash and diff proven) both files are green, 13/13. R3: not a regression. In dark theme under print, field text prints black in both builds, because the app-shell print rule (ui/packages/app-shell/src/styles.css, lines 229-234: `.dark, .dark *` gets color #000 !important) forces it. With background graphics on, the before build prints that black text on the dark canvas (18,18,18), which cannot be read; the after build prints it on white. With background graphics off, the before and after prints are the same. The Acceptance-note line 'A dark-theme console would print light text on the new white page' is false, and the replacement text is in open_questions[0].",
     "tests": "R2 (ablation of the date-display.ts fix, head 98f29438). Mutation: `git show cfcba539:ui/packages/core/src/utils/date-display.ts` written over the file by the scratch script r2-mutate.sh. The script sets REPO_ROOT and an EXIT/INT/TERM trap that restores the file with `git checkout HEAD -- \"$REPO_ROOT/ui/packages/core/src/utils/date-display.ts\"`. Proof that the mutation landed: on-disk hash 94171e6a4c3f91d77c415327e800ec21c35133e1 = the cfcba539 blob, which is not the HEAD blob e9d02cc1f42b46a42ca328dd2802f4d6c6608ca5. The anchor `writesMonthDayYear` counts 0 in the file. Red run, under the lock (os-verify-lock VERDICT command-exit 0, held the lock 14s, waited 1m53s; the inner vitest exited 1): `cd ui && pnpm exec vitest run --maxWorkers=2 packages/core/src/utils/__tests__/date-display.shortLocaleOrder-34228.test.ts packages/plugin-detail/src/__tests__/recordDetailsPrintFace-34228.test.tsx` gave Test Files 2 failed (2), Tests 8 failed / 5 passed (13). Failing names, with expected and received: (1) 'zh-CN writes the date in its own order, with the year', (2) 'zh writes ...' and (3) 'ja-JP writes ...' each expected \"2026年11月15日\" and received \"11月 15, '26\". (4) 'ko-KR writes ...' expected \"2026년 11월 15일\" and received \"11월 15, '26\". (5) 'de-DE writes ...' expected \"15. Nov. 2026\" and received \"Nov 15, '26\". (6) 'en-GB writes ...' expected \"15 Nov 2026\" and received \"Nov 15, '26\". (7) 'the face is the default face with the year shown, so the two never drift apart' expected \"2026年11月15日\" and received \"11月 15, '26\". (8) dom: 'record:details on a zh-CN print page prints a document face (objectstack#34228) > a `format: 'short'` date draws the locale's own face with the year' failed `expected '@media print {...' to contain '2026年11月15日'`; the rendered text holds 'Quote Date11月 15, '26'. The 5 that pass are the controls: the en and en-US rows ('Nov 15, '26'), the en print-page control, the badge stylesheet match and the link stylesheet match. Restore (the trap fired at script exit): RESTORE head-blob=e9d02cc1f42b46a42ca328dd2802f4d6c6608ca5, on-disk=e9d02cc1f42b46a42ca328dd2802f4d6c6608ca5. `git diff HEAD` came to 0 bytes, read again before the green run (diffbytes=0, HEAD 98f2943847). Green rerun of the same two files: Test Files 2 passed (2), Tests 13 passed (13), exit 0. This run was NOT under the lock; see deviations. || R3 (dark theme on print, `class=\"dark\"` on html as ThemeProvider sets it, with the console's compiled CSS). The record:details zh-CN page was rendered on cfcba539 code (before) and on 98f29438 code (after) and printed by headless Chromium (playwright-core page.pdf, A4) with printBackground true and false. Computed style under emulated print media, the same in both builds: value text colour rgb(0, 0, 0), card background transparent. Page and body background: before transparent, after rgb(255, 255, 255). Pixel readings from the PDF at 144 dpi, inside the box of the body field value 'QTE-0042' (background colour / strongest ink / luminance gap): before + bg on = (18,18,18) / (0,0,0) / 18, so the text cannot be read. Before + bg off = (255,255,255) / (0,0,0) / 255. After + bg on = (255,255,255) / (0,0,0) / 255. After + bg off = (255,255,255) / (0,0,0) / 255. Pixel in the sheet's bottom margin: (18,18,18) with bg on in BOTH builds, (255,255,255) with bg off in both. Why the text is black: ui/packages/app-shell/src/styles.css lines 229-234, inside @media print, set `.dark, .dark *` to background-color transparent, color #000, box-shadow none and border-color #ccc, all !important. The dark (18,18,18) is the canvas colour that `.dark { color-scheme: dark }` gives the root. Verdict: not a regression. The text prints black in dark theme in both builds. The new white page lifts the bg-on case from black text on (18,18,18) to black text on white. bg-off is the same before and after.",
     "gates": "No new head and no diff this round, so no gate family is owed and none was run. R2 is an ablation, not a gate. The PR's check-runs at 98f29438 stand as reported in round 1 (comment 6923091449). The R2 dependency build (`pnpm --workspace-concurrency=2 --filter @objectstack/client... --filter @objectstack/formula... --filter @objectstack/lint... --filter @objectstack/sdui-parser... build`) ran under the lock: VERDICT command-exit 0, held the lock 4m26s, waited 3m17s.",
     "dogfood_battery": "n/a — no new head; no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "1 — POST issues/34228/comments (this os-dev-report, via post-stamped.mjs on the fleet-write relay)",
     "open_questions": [
      {
       "question": "Proposed Acceptance-notes text for R2 and R3. The seat patches the PR body. It replaces the bullet 'The print stylesheet does not force black text. A dark-theme console would print light text on the new white page. ...' and adds an R2 bullet.",
       "options": [
        "A. R2: 'Ablation, run once (not a test file): with ui/packages/core/src/utils/date-display.ts swapped back to its cfcba539 version on head 98f29438, date-display.shortLocaleOrder-34228 and recordDetailsPrintFace-34228 fail 8 of 13. zh-CN, zh and ja-JP expect 2026年11月15日 and receive 11月 15, '26. ko-KR, de-DE and en-GB fail too, and the zh-CN print page renders Quote Date 11月 15, '26. The en and en-US controls stay green. With the file restored from HEAD (blob e9d02cc1 matches, git diff HEAD is empty) both files pass 13/13.' R3: 'Dark theme does not regress. The console already prints dark-theme text black: the app-shell print rule (ui/packages/app-shell/src/styles.css, .dark and .dark * get color #000 !important) does this, not the page print stylesheet. Measured on the QTE-0042 value, A4, headless Chromium. With background graphics on, cfcba539 printed black text on the dark (18,18,18) canvas, which cannot be read, and 98f29438 prints it on white. With background graphics off, both builds print black on white. Still present in both builds and not changed here: with background graphics on, the 12mm @page margin band prints dark (18,18,18) in dark theme.'",
        "B. Keep the R3 bullet short: 'Dark theme: text prints black in both builds (app-shell print rule). The new white page fixes the background-graphics-on case, which was black on (18,18,18). Background graphics off is unchanged.'"
       ],
       "recommendation": "A, because it names the file and rule that make the text black, so the claim can be checked. It also names the margin band that this PR leaves as it was."
      }
     ],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — this does not meet the bar to file: it was measured in the scratch harness with the console's compiled CSS, not through the console's own print. In dark theme, with background graphics on, the @page margin band (12mm) prints as the dark canvas (18,18,18) in both cfcba539 and 98f29438. `.dark { color-scheme: dark }` darkens the root canvas, and nothing paints the margin area. It is present in both builds and does not affect whether field values can be read. A filer needs one real Ctrl+P of a dark-theme console record page with background graphics on. Words to check for duplicates: dark theme print margin, color-scheme dark print canvas, printBackground dark border, app-shell print dark."
     ],
     "deviations": [
      "R2 green leg ran without the lock. Three foreground lock attempts with OS_VERIFY_LOCK_SLOT=issue-34228 each ended in queue-timeout (exit 99, 9m00s each, about 27 minutes in all). The holder the whole time was pid 26011 (`bash .../scratchpad/issue-34095/run-gates3.sh`), alive, held 1642s at the last attempt; --status showed an empty queue and my place parked. Narrowing, declared here: the green leg is two vitest files, 13 tests, about 14s, so it ran unlocked with --maxWorkers=1 rather than holding the round. The red leg and the dependency build did run under the lock.",
      "R2 ran both pinned files in full, not only the zh-CN row and the zh case. The two named tests are reported by name above; the other rows are extra readings.",
      "The worktree /home/user/objectstack-issue-34228 was detached at 98f29438 as ordered; its node_modules and the worktree itself are removed after this report."
     ]
    }
    
  15. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

    Close · 2026-11-16T21:42Z

    All three PRs for this card have merged: #34422, #34433 and #34436 (the last at 2026-11-16T21:21Z). Item 3 was ruled C (6922479414), and the text half shipped in #34436.

    One finding is left open and unruled: a long line-items table still moves to the next sheet whole. It is not part of this card's scope. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdomain:serverpm:dispatchedpriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions