diff options
| author | Adam Malczewski <[email protected]> | 2026-06-21 21:47:24 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-21 21:47:24 +0900 |
| commit | 8b467cd9279f53a916a336a54e92780c9cc0a045 (patch) | |
| tree | d73e25225a05701f1e0908b4a0cd4429ec41d44c /src/core/wire/conformance.test.ts | |
| parent | 857762099d458147bcc4ea4097357351164d3910 (diff) | |
| download | dispatch-web-8b467cd9279f53a916a336a54e92780c9cc0a045.tar.gz dispatch-web-8b467cd9279f53a916a336a54e92780c9cc0a045.zip | |
feat(ws): handle conversation.open broadcast — open/focus tab from CLI --open
Consume the conversation.open handoff ([email protected], [email protected]).
Re-pinned file: deps + re-mirrored .dispatch/*.reference.md.
- WS adapter (logic.ts + index.ts): parse + route the new top-level
"conversation.open" WsServerMessage to an onConversationOpen handler
- app store: openConversation(id) opens (or focuses) a tab — creates a chat
store, loads history, subscribes to live turns, creates+selects the tab
- conformance guard + WS adapter tests cover the new type
- backend also shipped conversation metadata endpoints (GET /conversations,
GET /conversations/:id/last, GET/PUT /conversations/:id/title) — mirrored
but not yet consumed by the FE
682 tests green.
Diffstat (limited to 'src/core/wire/conformance.test.ts')
| -rw-r--r-- | src/core/wire/conformance.test.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/wire/conformance.test.ts b/src/core/wire/conformance.test.ts index 2fdd3cb..f5d6608 100644 --- a/src/core/wire/conformance.test.ts +++ b/src/core/wire/conformance.test.ts @@ -139,9 +139,18 @@ describe("classifies every WsServerMessage type", () => { event: { type: "done" as const, conversationId: "c", turnId: "t", reason: "r" }, }, { type: "chat.error" as const, message: "e" }, + { type: "conversation.open" as const, conversationId: "c1" }, ]; const labels = msgs.map(assertWsServerMessageExhaustive); - expect(labels).toEqual(["catalog", "surface", "update", "error", "chat.delta", "chat.error"]); + expect(labels).toEqual([ + "catalog", + "surface", + "update", + "error", + "chat.delta", + "chat.error", + "conversation.open", + ]); }); }); |
