Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions frontend/src/contracts/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions frontend/src/dev/fakes/FakeWsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
SessionHello,
SessionReady,
VoiceParseResultMessage,
VoiceStreamCancelCommand,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: Importing VoiceStreamCancelCommand does not restore fake-server cancellation by itself. handleMessage still falls through to default for voice.stream.cancel, even though handleVoiceCancel already exists. Consequently, WsVoiceStreamPort.cancel() receives no acknowledgement and waits for the request timeout whenever the fake transport is used. Please restore a case 'voice.stream.cancel' branch that calls handleVoiceCancel.

VoiceStreamEndCommand,
VoiceStreamStartCommand,
VoiceStreamStartResponse,
Expand Down
Loading