Skip to content

Build the session details test notifications from Core's declared state - #1178

Merged
trissim merged 1 commit into
mainfrom
fix/session-details-typed-notification
Oct 23, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/session-details-typed-notification

Conversation

@trissim

@trissim trissim commented Oct 23, 2026

Copy link
Copy Markdown

Toad main is red: tests/textual/test_session_details.py::test_details_are_one_row_until_opened_and_then_bounded[rgb/ansi] fails with AttributeError: 'str' object has no attribute 'notification_label'.

The cause is in the test, not the app.

  • The fixture built MessageNotification("owner", "Responded", "", ...) positionally, which puts the str "" into state: DeliveryProgress.
  • ThreadStatusModel.known (Core ui_model/status.py:68) then reads .label, which calls state.notification_label and raises.
  • Core declared these fields typed on 10-16 (83ee78593). The red stayed hidden while toad's stale Core lock broke collection.

App path: nothing in toad src constructs MessageNotification. Core builds it at assignment_states.py:161 with a declared state, and toad's own ThreadStatusModel.known caller (conversation_turn.py:227) passes a typed presentation. The real session details panel doesn't take this path.

Fix: the fixture builds MessageNotification(FrozenRecipient("owner", "owner"), "peer", AcknowledgedProgress(), message=...). Every assertion is unchanged.

Test: test_session_details.py 2 passed; it is 2 failed on main e14a5df.

Not fixed here, also red on main: test_message_notification_title.py:22 builds the same stale shape, including detail and busy fields that no longer exist. Rewriting it needs a decision about which declared state stands for "Responding" and "busy", so it's reported to the commander separately.

🤖 Generated with Claude Code

The fixture passed "owner", "Responded", "" positionally into
MessageNotification, so a str sat in the DeliveryProgress state field and
ThreadStatusModel.known raised on .notification_label. Core declared these
fields typed on 10-16 (83ee78593); only this test kept the old shape. No
toad src constructs MessageNotification; Core builds it at
assignment_states.py:161 with a typed state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:32

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 insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 4618ace into main Oct 23, 2026
3 checks passed
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