Skip to content

refactor(painter): deliver resolved items to decoration provider callback#2827

Open
tupizz wants to merge 1 commit intotadeu/sd-2563-09-resolve-header-footerfrom
tadeu/sd-2563-10-provider-resolved-items
Open

refactor(painter): deliver resolved items to decoration provider callback#2827
tupizz wants to merge 1 commit intotadeu/sd-2563-09-resolve-header-footerfrom
tadeu/sd-2563-10-provider-resolved-items

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
9 #2826 Add resolveHeaderFooterLayout helper
10 #2827 Deliver resolved items to decoration provider callback 👈 this PR
11 #2828 Remove blockLookup — painter reads only resolved data
12 #2829 Delete dead hash helpers after blockLookup removal

@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: af974ca4d9

ℹ️ 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".

Comment on lines 1724 to +1727

return {
fragments: normalizedFragments,
items: alignedItems,
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 Normalize resolved item coordinates with shifted fragments

When layoutMinY < 0, this branch shifts fragment coordinates (y: f.y - layoutMinY) but returns items unchanged. After this refactor, renderer.renderFragment prefers resolvedItem.y (via applyResolvedFragmentFrame), so non-anchored header/footer fragments are positioned using stale pre-normalization Y values while the rest of the decoration math uses normalized fragment coordinates. In documents where header/footer content extends above y=0, this causes visible vertical misplacement/clipping; the same mismatch is also present in the variant fallback branch.

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