fix(web): connect the chat to the daemon end-to-end

- ws auth frame now carries the token top-level (docs §3.3); daemon accepts payload.token too
- entries route accepts workspaceId/sessionFile so disk-only sessions page history
- chat registers session metadata and pages history for non-live sessions
- e2e asserts a real ASSISTANT reply (PONG) and waits up to 180s
- visual.sh: real daemon + pairing + Playwright screenshots of the four pages
This commit is contained in:
yuez committed 2026-10-21 14:23:09 +08:00
1 parent 721661177c
commit 854d6d2997
8 files changed
+148 -17

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ describe("PiWsClient", () => {
const socket = sockets[0]!;
socket.open();
expect(states).toEqual(["connecting", "authenticating"]);
expect(socket.sent[0]).toEqual({ v: 1, type: "auth", payload: { token: "pkt_test" } });
expect(socket.sent[0]).toEqual({ v: 1, type: "auth", token: "pkt_test" });
// Queued before authentication.
client.subscribe("s1");