Skip to content

Conversation

@devksingh4
Copy link
Member

@devksingh4 devksingh4 commented Oct 26, 2025

Summary by CodeRabbit

  • Improvements
    • After submitting a room request, you are now redirected to the newly created request's detail page instead of the list view for a more seamless experience.
    • Removed the success notification message that previously appeared after submission.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Walkthrough

After 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

Cohort / File(s) Summary
Post-submission Navigation Update
src/ui/pages/roomRequest/NewRoomRequest.tsx
Navigation target after successful submission changed from /roomRequests (list view) to /roomRequests/{semester}/{id} (detailed view). User notification for successful submission removed; flow now relies on navigation to display the submitted item.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the semester value is correctly captured and passed to the navigation path
  • Confirm the response ID is properly extracted and included in the route
  • Validate that no critical user feedback is lost by removing the notification

Poem

🐰 Hopping through requests with semester in paw,
No notification needed, just details to gnaw.
To the specific view, we now make our way,
Where the form's shiny submission will brightly display! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Fix room reservation stuck on submitting bug" directly aligns with the code changes in the summary, which address a submission flow issue in the NewRoomRequest component. The title accurately captures the high-level intent of the changes—fixing a bug where room reservations get stuck during submission—while the implementation details (navigation target adjustment and notification removal) are appropriately abstracted. The title is concise at 44 characters and 7 words, uses specific terminology rather than vague placeholders, and provides enough clarity that a reviewer scanning commit history would understand the primary change relates to fixing a room reservation submission issue.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dsingh14/fix-rr-submission-ui-bug

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

@github-actions
Copy link
Contributor

💰 Infracost report

Monthly estimate generated

This comment will be updated when code changes.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 resetting isSubmitting on successful submission.

The isSubmitting state is set to true at line 334 but is never reset to false after 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

📥 Commits

Reviewing files that changed from the base of the PR and between c697304 and bb335ba.

📒 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/:requestId is properly configured in src/ui/Router.tsx:201 and maps to the ViewRoomRequest component. 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.

@devksingh4
Copy link
Member Author

Coderabbit's comment is false because if there is nav delay then I don't want someone to try to resubmit the request.

@devksingh4 devksingh4 merged commit e860a15 into main Oct 26, 2025
12 of 13 checks passed
@devksingh4 devksingh4 deleted the dsingh14/fix-rr-submission-ui-bug branch October 26, 2025 22:05
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