@@ -257,10 +257,10 @@ async def test_slash_new_clears_all_logs(mock_llm):
257257 prompt .value = "/new"
258258 await pilot .press ("enter" )
259259
260- # Logs should only have the confirmation message
260+ # Logs should only have the confirmation message (may wrap to 2 lines)
261261 for model_id in MODELS :
262262 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
263- assert len (log .lines ) == 1 # Just confirmation
263+ assert 1 <= len (log .lines ) <= 2 # Just confirmation, possibly wrapped
264264
265265
266266@pytest .mark .asyncio
@@ -289,10 +289,10 @@ async def test_slash_new_shows_confirmation(mock_llm):
289289 prompt .value = "/new"
290290 await pilot .press ("enter" )
291291
292- # Each log should have the confirmation message
292+ # Each log should have the confirmation message (may wrap to 2 lines)
293293 for model_id in MODELS :
294294 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
295- assert len (log .lines ) == 1
295+ assert 1 <= len (log .lines ) <= 2
296296
297297
298298@pytest .mark .asyncio
@@ -719,7 +719,7 @@ async def test_slash_command_case_insensitive(mock_llm):
719719 # Logs should have confirmation message
720720 for model_id in MODELS :
721721 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
722- assert len (log .lines ) == 1
722+ assert 1 <= len (log .lines ) <= 2
723723
724724
725725@pytest .mark .asyncio
@@ -738,7 +738,7 @@ async def test_slash_command_with_leading_space_still_executes(mock_llm):
738738 for model_id in MODELS :
739739 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
740740 # Should have only the confirmation message
741- assert len (log .lines ) == 1
741+ assert 1 <= len (log .lines ) <= 2
742742
743743
744744# --- Additional Coverage: handle_slash_command Edge Cases ---
@@ -755,7 +755,7 @@ async def test_handle_slash_command_with_trailing_whitespace(mock_llm):
755755 # Command should execute, confirmation should appear
756756 for model_id in MODELS :
757757 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
758- assert len (log .lines ) == 1
758+ assert 1 <= len (log .lines ) <= 2
759759
760760
761761@pytest .mark .asyncio
@@ -767,7 +767,7 @@ async def test_handle_slash_command_with_mixed_case(mock_llm):
767767
768768 for model_id in MODELS :
769769 log = app .query_one (f"#log-{ sanitize_id (model_id )} " , RichLog )
770- assert len (log .lines ) == 1
770+ assert 1 <= len (log .lines ) <= 2
771771
772772
773773@pytest .mark .asyncio
0 commit comments