mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix(composer): move the mobile dictation button off the floating controls
On mobile the dictation button sat at the right edge of the composer, directly below the floating cluster (Stop, Clear, TTS pill) anchored to the composer's top-right corner, so the two were adjacent touch targets. Render the dictation button ahead of the composer tools menu so it takes the slot one position left. The reorder exposed a latent bug: renderVoiceButton attaches the same voiceButtonContainerRef for both variants, so the last one rendered owns it. The desktop variant is always rendered (CSS-hidden below md), so moving the mobile variant first handed the ref to the desktop container and the outside-press guard stopped recognising the mic, ending the recording on the first tap. Render the desktop variant only at desktop widths so exactly one voice container exists in the DOM.
This commit is contained in:
1 parent
377e3c2784
commit
93faf387d2
1 file changed
+4
-4
@@ -1648,6 +1648,9 @@ return (
|
||||
>
|
||||
<Upload className="w-5 h-5" />
|
||||
</button>
|
||||
{showMobileVoiceButton && (
|
||||
renderVoiceButton('mobile')
|
||||
)}
|
||||
{isMobile && directory && (
|
||||
<ComposerToolsMenu
|
||||
sessionID={sessionID}
|
||||
@@ -1660,12 +1663,9 @@ return (
|
||||
onDictate={canUseMobileVoice && hasPromptContent && !showVoiceFeedback ? () => void startVoiceRecording() : undefined}
|
||||
/>
|
||||
)}
|
||||
{sttEnabled && sttSupported && (
|
||||
{!isMobile && sttEnabled && sttSupported && (
|
||||
renderVoiceButton('desktop')
|
||||
)}
|
||||
{showMobileVoiceButton && (
|
||||
renderVoiceButton('mobile')
|
||||
)}
|
||||
{!showMobileVoiceButton && (
|
||||
<button
|
||||
data-submit-prompt
|
||||
|
||||
Reference in new issue
Block a user