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
3 changes: 2 additions & 1 deletion src/toad/widgets/sidebar_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from textual.layouts.vertical import VerticalLayout
from textual.reactive import reactive
from textual.widget import Widget
from textual.worker import Worker
from textual.widgets import Static

from toad.core.events import (
Expand Down Expand Up @@ -238,7 +239,7 @@ class SidebarGroup[RowT: "ListedRow"](KeyedRows[str], VerticalGroup):
_rows_pending = False
"""A reconciliation ran out of its step and left rows unmounted."""

_row_mounting = None
_row_mounting: Worker[None] | None = None
"""The worker mounting pending rows after the following frames."""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions tests/app/test_channel_display_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ async def test_shown_messages_are_read_exactly_and_hidden_expansion_stays_unread
comms = workspace.comms
viewer = workspace.viewer
project = str(workspace.project)
hidden = comms.messaging.send_message("bob", "carol", "older hidden DM")
hidden = comms.messaging.send("bob", "carol", "older hidden DM").message
# Every line of a message names it, so a message whose text is partly on screen is recognisable.
messages = [comms.messaging.send_message("alice", "#team", "\n".join(f"channel {i:02d} line" for _ in range(12)))
messages = [comms.messaging.send("alice", "#team", "\n".join(f"channel {i:02d} line" for _ in range(12))).message
for i in range(12)]

def seen():
Expand Down
2 changes: 1 addition & 1 deletion tests/textual/test_channel_partial_paint.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async def test_partial_viewport_marks_only_painted_text_and_scrolling_marks_the_
workspace.thread("peer", "team", running=True)
comms = workspace.comms
viewer = workspace.viewer
rows = [comms.messaging.send_message("peer", "#team", f"row {i}\n" + "body\n" * 10) for i in range(8)]
rows = [comms.messaging.send("peer", "#team", f"row {i}\n" + "body\n" * 10).message for i in range(8)]

def seen():
return comms.bus.reads.seen_sequences(viewer, comms.registry.snapshot())
Expand Down
2 changes: 1 addition & 1 deletion tests/textual/test_divider_only_viewport_stays_unread.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_divider_without_body_leaves_the_message_unread(workspace):
for index in range(7):
comms.messaging.send("peer", "#team", f"earlier {index} " + "body " * 20)
comms.views.mark_user_view_read("#team", worktree=Checkout(project))
last = comms.messaging.send_message("peer", "#team", "LAST " + "body " * 250)
last = comms.messaging.send("peer", "#team", "LAST " + "body " * 250).message

# Hold read marks while arranging the divider-only viewport; the first
# viewport shows the text and may legitimately mark it.
Expand Down
2 changes: 1 addition & 1 deletion tests/textual/test_saved_view_read_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_saved_view_shows_union_history_keeps_its_pin_and_refuses_to_send(
workspace.thread("api-agent", "api", running=True)
workspace.thread("ui-agent", "ui", running=True)
comms = workspace.comms
rows = [comms.messaging.send_message("api-agent", target, body)
rows = [comms.messaging.send("api-agent", target, body).message
for target, body in (("#engineering", "union message"), ("#api", "exact message"),
("#engineering", "another union message"))]
comms.channels.catalog.replace(CatalogDocument(
Expand Down
Loading