Skip to content

more cleanup for new help request errors#595

Merged
jon-bell merged 1 commit intostagingfrom
fix-more-help-request
Jan 24, 2026
Merged

more cleanup for new help request errors#595
jon-bell merged 1 commit intostagingfrom
fix-more-help-request

Conversation

@jon-bell
Copy link
Contributor

@jon-bell jon-bell commented Jan 24, 2026

Summary by CodeRabbit

Bug Fixes

  • Fixed form submission button behavior in course office hours—it now only disables when there are genuine validation errors, improving user experience.
  • Prevented duplicate concurrent regrade requests by properly disabling the regrade button during in-flight operations, ensuring reliable submission processing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Two form and concurrency safeguards are implemented: form validation logic refined to ignore React Hook Form's empty root error object when determining button disable state, and regrade operations protected against duplicate concurrent requests through an early guard check.

Changes

Cohort / File(s) Summary
Form Validation Refinement
app/course/[course_id]/office-hours/[queue_id]/new/newRequestForm.tsx
Introduces hasErrors computed value that filters root-level errors from React Hook Form, replacing direct error count check. Submit button disabled state now respects this filtered calculation.
Concurrency Protection
lib/test-insights/RegradeSubmissionsDialog.tsx
Adds guard clause in handleRegrade to return early if regrading already in progress. Extends useCallback dependency array with isRegrading. Regrade button now disabled during active regrading operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Improve test insights ux #592: Directly modifies the same RegradeSubmissionsDialog component with related concurrency and state management concerns.

Poem

Filters bloom where errors grew,
Guards prevent what shouldn't stew,
Form and race both tamed with care,
Bugs begone, we're playing fair! 🛡️

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'more cleanup for new help request errors' is vague and generic, using non-descriptive language like 'cleanup' and 'more' that doesn't clearly convey the specific changes made to the codebase. Consider using a more descriptive title that specifically mentions the key changes, such as 'Fix Submit button disabled state by filtering form errors' or 'Prevent duplicate regrade requests with concurrent operation guard'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link

argos-ci bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 62 changed, 3 removed, 1 failure Jan 24, 2026, 10:27 PM

@jon-bell jon-bell merged commit 44dd4ea into staging Jan 24, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant