Skip to content

Conversation

@VladaHarbour
Copy link
Contributor

Hi @harbournick! The issue with footer overlap appears when one of the footnotes is pushed to the next page with inserted footnote container. I noticed that in second calculation round we get correct results but then we recalculate it one more time and for some reason footnotes reserves result changes back to the result of first round. When removing this final round the issue seems to be fixed

@VladaHarbour VladaHarbour self-assigned this Jan 25, 2026
@linear
Copy link

linear bot commented Jan 25, 2026

Copy link

@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: 2ce863ed68

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 1694 to +1698
const blockById = new Map<string, FlowBlock>();
finalBlocks.forEach((block) => {
blocks.forEach((block) => {
blockById.set(block.id, block);
});
const injected = injectFragments(
layout,
finalPlan,
finalMeasuresById,
reservesAppliedToLayout,
blockById,
finalPageColumns,
);
const injected = injectFragments(layout, plan, measuresById, reserves, blockById, pageColumns);

Choose a reason for hiding this comment

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

P2 Badge Recompute footnote assignments after final relayout

After the final layoutDocument(...) call applies the updated reserves, this code still injects fragments using plan, pageColumns, and measuresById that were computed before that relayout. If pass‑2 reserves change pagination (e.g., a footnote pushes content to the next page), the assignments and plan are stale and injectFragments can place footnotes on the wrong pages or overlap content. The previous logic re‑resolved assignments/measures against the post‑relayout layout to avoid this; consider recomputing those inputs after the final relayout when pagination can change.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants