fix: enable half-question and final-submit buttons during interim ASR text
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
b6f8a522b6
commit
531e7c435e
|
|
@ -49,7 +49,7 @@ export const QueryInput: React.FC<QueryInputProps> = ({ onSubmit, onHalfQuestion
|
|||
}
|
||||
}
|
||||
|
||||
const isDisabled = isLoading || displayValue.trim() === '' || (!hasUserInput && !!partialText)
|
||||
const isDisabled = isLoading || displayValue.trim() === ''
|
||||
|
||||
const textareaClassName = [
|
||||
'w-full rounded border border-gray-300 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed',
|
||||
|
|
|
|||
|
|
@ -151,9 +151,9 @@ describe('QueryInput with partialText (Phase 2.4)', () => {
|
|||
const textarea = screen.getByPlaceholderText('Ask a question about your documents...')
|
||||
const button = screen.getByRole('button', { name: /submit/i })
|
||||
|
||||
// partialText is shown but user hasn't typed, button should be disabled
|
||||
// (partial text is not a real user input — it's just display)
|
||||
expect(button).toBeDisabled()
|
||||
// partialText is shown and user hasn't typed — button should be enabled
|
||||
// (users can now submit during interim ASR text)
|
||||
expect(button).toBeEnabled()
|
||||
})
|
||||
|
||||
it('test_user_can_submit_after_typing_over_partialText', () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue