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
4 changes: 2 additions & 2 deletions src/toad/widgets/comms_sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ def show(self, row: ThreadRowModel, *, pinned: bool = False) -> None:
previous = self.thread_row
self.thread_row, self.pinned, self.action_status = row, pinned, action_status
summary = action_status if action_status is not None else row.summary
self.tooltip = Content("\n".join(str(value) for value in (
row.name, summary, row.unread.detail, "Pinned in this channel" if pinned else None, row.model,
self.tooltip = Content("\n".join(value for value in (
row.name, summary, row.unread.detail, "Pinned in this channel" if pinned else None, *row.model.texts(),
) if value))
badge = f"{row.unread.label} " if row.unread.label else ""
title = self.activity_content(row.title, Content(row.label), self.busy,
Expand Down
15 changes: 15 additions & 0 deletions tests/textual/test_welcome_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,18 @@ async def test_a_launch_that_names_a_session_opens_it(workspace):
await ui.until(lambda: len(ui.tabs()) == 1, why="the named session's tab")
assert ui.selected_tab == ui.tabs()[0].identity
assert not ui.shows(HINT)


async def test_a_thread_row_tooltip_names_its_model_by_text(workspace):
from dataclasses import replace

from agent_comms.thread_model import DeclaredModel
from toad.widgets.comms_sidebar import ThreadStatusRow

thread = Thread("alpha", frozenset({"team"}), str(workspace.project))
workspace.comms.registry.declare(replace(thread, model=DeclaredModel("openai-codex/gpt-6.1-sol")))
async with workspace.app(session=False) as ui:
await ui.until_shows(THREADS)
app, _ = ui.textual
row = next(row for row in app.screen.query(ThreadStatusRow) if row.thread_row.name == "alpha")
assert "openai-codex/gpt-6.1-sol" in str(row.tooltip).splitlines()
Loading