Repository navigation
fix: resolve chapter dropdown in notes & ask modal, update resource request validation - #487
Conversation
…equest validation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Chapter reference validation app/Http/Requests/Resource/UpdateResourceRequest.php |
The request accepts an optional nullable chapter_id that must exist in chapters.id. The node_id rule now checks chapters.id. |
Subject chapter options resources/js/components/forum/AskQuestionModal.vue, resources/js/pages/Notes/Index.vue |
Both subject types accept an optional chapters list. The forum modal and Notes page use that list when present and otherwise fall back to nodes. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk: 
Minimal · previous review d6a6c
-
The reviewed changes have no established merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
Summary of Changes
chapter_idand updatednode_idto validate againstexists:chapters,idinstead of the droppednodestable, fixing the 500 error onPATCH /resources/{id}.availableChaptersto readsubj?.chapters || subj?.nodes || []so that chapters populate correctly when a subject is selected.filteredNodesto readsubj?.chapters || subj?.nodes || []so chapter selections work properly on the Home/Feed modal.Summary by CodeRabbit