Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/toad/widgets/prepared_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ def reconstructible_children(self) -> tuple[Widget, ...]:

def _initialize_document(self, markdown: str | None) -> AwaitComplete:
# Mount admits the body; its materialization worker owns prepared
# content. Observe the original initialization on this body's pump,
# after mount, rather than holding the conversation's mount receipt.
# The native implementation retains source consumption and TOC order.
self.call_later(super()._initialize_document(markdown))
# content. Observe that original receipt after completion; waiting on
# this pump would hold wheel delivery behind background preparation.
# Native source consumption and TOC completion remain unchanged.
super()._initialize_document(markdown).call_when_ready(self)
return AwaitComplete.nothing()

def retire_body_resources(self) -> None:
Expand Down
10 changes: 5 additions & 5 deletions src/toad/widgets/transcript_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def set_categories(self, selected: frozenset[type[MessageCategory]]) -> None:
self.selected_categories = selected
apply_block_filter(self, selected)
if self.is_attached and not visible and self.message_category in selected and not self.children:
self.publish_body(self.materialize_native_body).call_next(self)
self.publish_body(self.materialize_native_body).call_when_ready(self)

def compose(self) -> ComposeResult:
# A filtered source slot retains identity/coverage, not hidden native
Expand Down Expand Up @@ -409,14 +409,14 @@ def _follow_source_tail(self) -> bool:
async def _report_coverage(self, page: TranscriptPage, fragments: tuple[TranscriptFragment, ...]) -> None:
if self._source_state.reports_coverage:
from toad.widgets.conversation import Conversation
# Transfer covered native display inside the page admission. Join
# stream teardown on the original Conversation pump after these
# source/tree locks release, never while mount waits for coverage.
# Transfer covered native display inside the page admission. The
# original retirement receipt owns teardown; observe its completed
# result without holding the Conversation pump or mount admission.
# Standalone saved viewers have no live transcript to transfer.
# Resolve custody from native ancestry, not a second owner field.
for ancestor in self.ancestors:
if isinstance(ancestor, Conversation):
ancestor.transcript.covered(TranscriptCoverage(page.events), self).call_next(ancestor)
ancestor.transcript.covered(TranscriptCoverage(page.events), self).call_when_ready(ancestor)
break

def publish_committed(self) -> None:
Expand Down
Loading