Skip to content

refactor(painter): remove body blocks/measures from DomPainterInput#2820

Open
tupizz wants to merge 1 commit intotadeu/sd-2563-06b-remove-body-fallbacksfrom
tadeu/sd-2563-06c-remove-body-input
Open

refactor(painter): remove body blocks/measures from DomPainterInput#2820
tupizz wants to merge 1 commit intotadeu/sd-2563-06b-remove-body-fallbacksfrom
tadeu/sd-2563-06c-remove-body-input

Conversation

@tupizz
Copy link
Copy Markdown
Contributor

@tupizz tupizz commented Apr 15, 2026

PR Stack (SD-2563: Dumb Painter Refactor)

# PR Title Status
1 #2810 Lift page metadata into ResolvedPage
2 #2811 Lift fragment metadata into resolved paint items
3 #2812 Pre-compute SDT container keys in resolved layout
4 #2813 Pre-compute paragraph border data in resolved layout
5 #2814 Move change detection into resolved layout stage
6 #2818 Lift paragraph/list block and measure into resolved items
7 #2819 Extract block/measure resolution helper
8 #2820 Remove body blocks/measures from DomPainterInput 👈 this PR
9 #2826 Add resolveHeaderFooterLayout helper
10 #2827 Deliver resolved items to decoration provider callback
11 #2828 Remove blockLookup — painter reads only resolved data
12 #2829 Delete dead hash helpers after blockLookup removal

Body block and measure data now flows exclusively through the resolved
layout. The painter only builds a blockLookup from header/footer data,
which is the last remaining fallback surface for fragments that do not
yet have a resolved path. Complex-transaction rebuild detection now
walks the resolved layout items directly instead of iterating the body
blockLookup.

The legacy createDomPainter wrapper derives a resolved layout from
its legacyState blocks/measures on the fly so the benchmark path and
direct createDomPainter(options).paint(Layout) callers keep working
without setResolvedLayout.
@linear
Copy link
Copy Markdown

linear bot commented Apr 15, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d49d00f326

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

},
"devDependencies": {
"@superdoc/layout-engine": "workspace:*",
"@superdoc/layout-resolved": "workspace:*",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move layout-resolved into runtime dependencies

@superdoc/painter-dom now imports resolveLayout in src/index.ts during normal execution, but @superdoc/layout-resolved is declared only as a devDependency. In production-style installs (pnpm install --prod) devDependencies are pruned, so consumers that depend on @superdoc/painter-dom without also depending on @superdoc/layout-resolved can fail at module resolution time before paint runs. Please declare this package under dependencies to keep runtime resolution stable.

Useful? React with 👍 / 👎.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant