refactor floating_domain to structured object-only payload

This commit is contained in:
2026-03-13 16:09:24 +01:00
parent 13fd8677c1
commit 2a0331d7ce
7 changed files with 248 additions and 49 deletions

View File

@@ -50,7 +50,7 @@ async def _mock_home_stream(user_id, message, context):
async def _mock_floating_stream(user_id, message, context):
yield "floating_domain", "tasks"
yield "floating_domain", {"type": "task", "id": None, "section": None}
yield "token", "Here is a summary"
@@ -102,7 +102,7 @@ def test_floating_request_produces_domain_frame(client):
assert types.index(WsFrameType.floating_domain) < types.index(WsFrameType.stream_end)
domain_frame = next(f for f in frames if f["type"] == WsFrameType.floating_domain)
assert domain_frame["domain"] == "tasks"
assert domain_frame["domain"]["type"] == "task"
assert domain_frame["request_id"] == "p1"