feat: show scheduled prompts in session rows
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1032,6 +1032,51 @@ def test_format_session_text_status_colors():
|
||||
) # Overlay0
|
||||
|
||||
|
||||
def _make_scheduled_prompt(due_at):
|
||||
prompt = MagicMock()
|
||||
prompt.due_at = due_at
|
||||
prompt.status = "pending"
|
||||
return prompt
|
||||
|
||||
|
||||
def test_format_session_text_shows_scheduled_prompt_countdown():
|
||||
from datetime import datetime, timedelta
|
||||
from hqt.tui.widgets.session_list import format_session_text
|
||||
|
||||
now = datetime(2026, 6, 11, 14, 0, 0)
|
||||
scheduled = _make_scheduled_prompt(now + timedelta(minutes=12, seconds=1))
|
||||
|
||||
text = format_session_text(
|
||||
"mywork",
|
||||
"claude",
|
||||
"idle",
|
||||
"●",
|
||||
scheduled_prompt=scheduled,
|
||||
now=now,
|
||||
)
|
||||
|
||||
assert "@ 13m" in text
|
||||
|
||||
|
||||
def test_format_session_text_shows_scheduled_prompt_clock_time():
|
||||
from datetime import datetime, timedelta
|
||||
from hqt.tui.widgets.session_list import format_session_text
|
||||
|
||||
now = datetime(2026, 6, 11, 14, 0, 0)
|
||||
scheduled = _make_scheduled_prompt(now + timedelta(hours=2, minutes=30))
|
||||
|
||||
text = format_session_text(
|
||||
"mywork",
|
||||
"claude",
|
||||
"idle",
|
||||
"●",
|
||||
scheduled_prompt=scheduled,
|
||||
now=now,
|
||||
)
|
||||
|
||||
assert "@ 16:30" in text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_session_list_renders_harness_name_brackets():
|
||||
"""Regression: '[claude]' must be visible, not swallowed as a markup tag."""
|
||||
|
||||
Reference in New Issue
Block a user