From dffba92929b50396264f29662664d0293f6221b3 Mon Sep 17 00:00:00 2001 From: geasd <15225349+gexs04812@user.noreply.gitee.com> Date: Sat, 1 Aug 2026 14:51:50 +0800 Subject: [PATCH 1/2] fix(frontend): restore voice stream cancel contract types CI typecheck failed after the MVP merge dropped VoiceStreamCancelCommand/Ack while cancel handling remained in the port and fake server. Co-authored-by: Cursor --- frontend/src/contracts/voice.ts | 12 ++++++++++++ frontend/src/dev/fakes/FakeWsServer.ts | 1 + 2 files changed, 13 insertions(+) diff --git a/frontend/src/contracts/voice.ts b/frontend/src/contracts/voice.ts index 07c8ad1..730d98e 100644 --- a/frontend/src/contracts/voice.ts +++ b/frontend/src/contracts/voice.ts @@ -17,6 +17,18 @@ export type VoiceStreamEndCommand = WsRequest<'voice.stream.end', VoiceStreamEnd export type VoiceStreamError = WsFailure<'voice.stream.error'>; +export type VoiceStreamCancelPayload = { + stream_id: string; + job_id: string | null; +}; + +export type VoiceStreamCancelCommand = WsRequest<'voice.stream.cancel', VoiceStreamCancelPayload>; + +export type VoiceStreamCancelAck = + | WsSuccess<'voice.stream.cancelled', { stream_id: string }> + | VoiceStreamError + | WsFailure<'voice.stream.cancel'>; + export type VoiceStreamStarted = WsSuccess< 'voice.stream.started', { stream_id: string; job_id: string } diff --git a/frontend/src/dev/fakes/FakeWsServer.ts b/frontend/src/dev/fakes/FakeWsServer.ts index 1b0d82e..5512e7c 100644 --- a/frontend/src/dev/fakes/FakeWsServer.ts +++ b/frontend/src/dev/fakes/FakeWsServer.ts @@ -13,6 +13,7 @@ import type { SessionHello, SessionReady, VoiceParseResultMessage, + VoiceStreamCancelCommand, VoiceStreamEndCommand, VoiceStreamStartCommand, VoiceStreamStartResponse, From ed77cb984d094eff7242e9bffb236ba35a7d3d45 Mon Sep 17 00:00:00 2001 From: geasd <15225349+gexs04812@user.noreply.gitee.com> Date: Sat, 1 Aug 2026 14:56:03 +0800 Subject: [PATCH 2/2] chore: nudge PR sync after cancel-type fix Co-authored-by: Cursor