refactor(webui): isolate websocket application orchestration (#5548)

* refactor(webui): extract session attach projection

* refactor(webui): isolate websocket application orchestration

* refactor(webui): tighten websocket application boundary

* test(webui): assert module logger for fork failures
This commit is contained in:
chengyongru authored and GitHub committed 2026-08-26 18:04:38 +08:00
1 parent a618e80887
commit f9d449ef6c
21 files changed
+1920 -1211

No files matched your search

+3 -2
View File
@@ -103,6 +103,7 @@ from nanobot.webui.session_automations import (
session_automations_payload,
)
from nanobot.webui.session_context import session_context_payload
from nanobot.webui.session_identity import is_webui_session_key
from nanobot.webui.session_list_index import (
WEBUI_SESSION_INDEX_INTERNAL_FIELDS,
indexed_workspace_scope,
@@ -774,7 +775,7 @@ class GatewayHTTPHandler:
default_scope: WorkspaceScope | None = None
for s in sessions:
key = s.get("key")
if not (isinstance(key, str) and key.startswith("websocket:")):
if not (isinstance(key, str) and is_webui_session_key(key)):
continue
row = {
k: v
@@ -1619,4 +1620,4 @@ def _positive_int(value: Any) -> int | None:
def _is_websocket_channel_session_key(key: str) -> bool:
return key.startswith("websocket:")
return is_webui_session_key(key)