fix(ui): fix the disable-report-problem to submit#3002
Conversation
|
Thanks for contributing to Agent Orchestrator. This PR is being picked up by the current external contributor on-call pair: If someone is already working on this, please continue as usual. For faster context or live questions, you can also join the AO Discord. Join the session here: Come by if you want to see what is being built, ask questions, or just hang around with the community. |
88a8e44 to
c6dbf5a
Compare
|
I have resolved the merge conflicts with
Could you please take a look and re-review when you get a chance? Thanks! |
|
Hi @Pulkit7070, I have added the regression unit test in It asserts that:
All unit tests pass cleanly locally. Could you please re-review when free? Thanks! |
sham-jadhav03
left a comment
There was a problem hiding this comment.
Hi team/reviewers,
I have updated the PR to ensure proper submit button state handling in ReportProblemDialog.tsx.
Summary of Changes:
- Button State Logic: The submit button in
ReportProblemDialogis now correctly disabled when required fields (like problem description/details) are empty or invalid, preventing premature submission. - Unit Tests Added: Added/updated unit tests in
ReportProblemDialog.test.tsxto cover edge cases, verifying that the submit button properly toggles its disabled state based on input validation. - Verification: Ran
npx tsc --noEmitand component tests locally; all tests pass cleanly with 0 errors.
Please take a look and re-review when you get a chance. Thanks!
|
I have updated the PR to ensure proper submit button state handling in Summary of Updates:
Please take a look and re-review when you get a chance. Thanks! |
|
The new For example, in
With this change, The production validation does not need to be weakened. The test should instead:
It would also be useful for the focused dialog test to include whitespace-only values, since the intended boundary is based on |
What
Fixed the disable-report-problem to submit dialog submit button behavior in the settings UI so that users cannot submit empty problem reports.
Why
Fixes #2938
How
summary.trim().length > 0 && details.trim().length > 0to determinecanSubmit.disabled={!canSubmit}) when required fields are empty.if (!canSubmit) return;) to prevent accidental or forced form submission.Testing
npx tsc -p frontend/tsconfig.json --noEmitand confirmed zero TypeScript errors.Checklist
main