mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Keep voice mode listening after empty sends and transcription errors, and let failed sends be resent
This commit is contained in:
1 parent
6904cfbc58
commit
99b8d854d4
5 files changed
+522
-40
No files matched your search
@@ -223,18 +223,39 @@ describe('VoiceConversationBar', () => {
|
||||
renderBar(
|
||||
buildController({
|
||||
phase: 'paused',
|
||||
label: 'Microphone access denied. Please allow microphone permissions.',
|
||||
label: 'Microphone problem',
|
||||
notice: 'Microphone access denied. Please allow microphone permissions.',
|
||||
hint: 'Allow microphone access, then tap to retry',
|
||||
orbLabel: 'Resume voice conversation',
|
||||
}),
|
||||
)
|
||||
|
||||
expect(screen.getByText('Microphone problem')).toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByText('Microphone access denied. Please allow microphone permissions.'),
|
||||
).toBeInTheDocument()
|
||||
expect(screen.getByText('Allow microphone access, then tap to retry')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('offers the edit control while paused with a failed message', async () => {
|
||||
const user = userEvent.setup()
|
||||
const controller = buildController({
|
||||
phase: 'paused',
|
||||
label: "Couldn't send your message",
|
||||
hint: 'Tap to resend',
|
||||
notice: "Couldn't send: network down",
|
||||
canEditInTextBox: true,
|
||||
orbLabel: 'Resend message',
|
||||
})
|
||||
renderBar(controller)
|
||||
|
||||
expect(screen.queryByRole('button', { name: 'Exit voice conversation' })).toBeNull()
|
||||
expect(screen.getByRole('button', { name: 'Resend message' })).toBeInTheDocument()
|
||||
await user.click(screen.getByRole('button', { name: 'Edit in text box' }))
|
||||
|
||||
expect(controller.editInTextBox).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it('shows the notice when there is one and keeps the reserved hint line empty', () => {
|
||||
renderBar(
|
||||
buildController({
|
||||
|
||||
Reference in new issue
Block a user