Spaces:
Running
Running
"pos" is no longer optional. Plus a comment.
Browse files
lynxkite-app/src/lynxkite_app/crdt.py
CHANGED
@@ -64,6 +64,8 @@ class WorkspaceWebsocketServer(pycrdt_websocket.WebsocketServer):
|
|
64 |
|
65 |
def on_change(changes):
|
66 |
task = asyncio.create_task(workspace_changed(name, changes, ws))
|
|
|
|
|
67 |
task.add_done_callback(lambda t: t.result())
|
68 |
|
69 |
ws.observe_deep(on_change)
|
|
|
64 |
|
65 |
def on_change(changes):
|
66 |
task = asyncio.create_task(workspace_changed(name, changes, ws))
|
67 |
+
# We have no way to await workspace_changed(). The best we can do is to
|
68 |
+
# dereference its result after it's done, so exceptions are logged normally.
|
69 |
task.add_done_callback(lambda t: t.result())
|
70 |
|
71 |
ws.observe_deep(on_change)
|
lynxkite-app/web/tests/lynxkite.ts
CHANGED
@@ -96,7 +96,7 @@ export class Workspace {
|
|
96 |
return this.page.locator(".react-flow__node");
|
97 |
}
|
98 |
|
99 |
-
getBoxHandle(boxId: string, pos
|
100 |
return this.page.locator(`.connectable[data-nodeid="${boxId}"][data-handlepos="${pos}"]`);
|
101 |
}
|
102 |
|
|
|
96 |
return this.page.locator(".react-flow__node");
|
97 |
}
|
98 |
|
99 |
+
getBoxHandle(boxId: string, pos: string) {
|
100 |
return this.page.locator(`.connectable[data-nodeid="${boxId}"][data-handlepos="${pos}"]`);
|
101 |
}
|
102 |
|