-
Couldn't load subscription status.
- Fork 0
Fix room reservation stuck on submitting bug #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAfter successful room request submission, the navigation now directs to a detailed semester-scoped view including the new request ID, replacing the generic list view redirect. The submission success notification has been removed from the flow. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Form as NewRoomRequest Form
participant API as API
participant Router as Router
participant DetailView as Detail View
User->>Form: Submit room request
Form->>API: POST request data
API-->>Form: Return {id, ...}
rect rgb(200, 220, 255)
Note over Form,Router: New behavior
Form->>Router: Navigate to<br/>/roomRequests/{semester}/{id}
Router->>DetailView: Route to detail view
DetailView-->>User: Display submitted<br/>room request
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
💰 Infracost reportMonthly estimate generatedThis comment will be updated when code changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/ui/pages/roomRequest/NewRoomRequest.tsx (1)
334-362: Consider resettingisSubmittingon successful submission.The
isSubmittingstate is set totrueat line 334 but is never reset tofalseafter a successful submission (line 351). While this is likely fine since navigation occurs immediately afterward, resetting the state would make the logic more complete and guard against edge cases where navigation might be delayed or interrupted.Apply this diff if you want to add the reset:
const response = await createRoomRequest(values); + setIsSubmitting(false); navigate(`/roomRequests/${values.semester}/${response.id}`);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
src/ui/pages/roomRequest/NewRoomRequest.tsx(1 hunks)
🔇 Additional comments (1)
src/ui/pages/roomRequest/NewRoomRequest.tsx (1)
352-352: Route verified and detail page provides implicit success confirmation.The route
/roomRequests/:semesterId/:requestIdis properly configured insrc/ui/Router.tsx:201and maps to theViewRoomRequestcomponent. When users navigate to the newly created request, the detail page displays:
- Request title
- "CREATED" status badge
- All submitted form data
- Timeline entry confirming creation
This provides implicit success feedback through visual confirmation that the request was created and persisted. No explicit notification appears on page load, but the presence and display of the newly created request serves as confirmation of successful submission.
|
Coderabbit's comment is false because if there is nav delay then I don't want someone to try to resubmit the request. |
Summary by CodeRabbit