Skip to content

Find the last message body without walking the whole document - #580

Merged
trissim merged 2 commits into
mainfrom
fix/dm-range-publication-20261008
Oct 8, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/dm-range-publication-20261008

Conversation

@trissim

@trissim trissim commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex attempt, since discarded. 0 of 21 code lines it added are still in main.

DocumentViewport.body_roots takes a reverse option, and the tail lookup uses next(body_roots(reverse=True)) instead of building a tuple of all bodies. requires_body now checks visibility before computing the protected set. A test in viewport_body_order_pilot.py covers the tail lookup.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim merged commit 1b5964f into main Oct 8, 2026
2 checks passed
@trissim trissim changed the title Avoid full document-order acquisition for the visible source edge Find the last message body without walking the whole document Oct 11, 2026
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