test: verify delayed prompt injection
Fix pre-existing ty error in action_new_session by typing the sandbox element as SandboxPolicy | None instead of object. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -12,6 +12,7 @@ from textual.theme import Theme
|
||||
from textual.widgets import Footer
|
||||
|
||||
from hqt import sandbox
|
||||
from hqt.sandbox import SandboxPolicy
|
||||
from hqt.config import get_settings
|
||||
from hqt.git import worktree
|
||||
from hqt.db.engine import ensure_db, get_engine, get_session_factory
|
||||
@@ -270,7 +271,8 @@ class HqtApp(App):
|
||||
project_path = project.path
|
||||
|
||||
def on_dismiss(
|
||||
result: tuple[str, str, str | None, str | None, object] | None,
|
||||
result: tuple[str, str, str | None, str | None, SandboxPolicy | None]
|
||||
| None,
|
||||
) -> None:
|
||||
if result:
|
||||
harness_name, nickname, model, worktree_branch, sandbox_policy = result
|
||||
|
||||
+3
-1
@@ -1782,7 +1782,9 @@ async def test_schedule_prompt_action_calls_service_and_refreshes():
|
||||
with patch.object(app, "notify", side_effect=capture_notify):
|
||||
app.action_schedule_prompt()
|
||||
await pilot.pause()
|
||||
app.screen.dismiss(("continue", __import__("datetime").timedelta(minutes=30)))
|
||||
app.screen.dismiss(
|
||||
("continue", __import__("datetime").timedelta(minutes=30))
|
||||
)
|
||||
await pilot.pause()
|
||||
await app.workers.wait_for_complete()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user