Fix: help dialog wraps project id to string before request#217
Merged
jankapunkt merged 9 commits intomainfrom Dec 3, 2025
Merged
Fix: help dialog wraps project id to string before request#217jankapunkt merged 9 commits intomainfrom
jankapunkt merged 9 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the help dialog fails when the project ID is a number instead of a string, and adds defensive programming to handle cases where no source is selected for coding.
Key changes:
- Converts
projectIdto string before sending feedback request (main fix) - Adds null-safety checks throughout the codebase using optional chaining (
source?.id) - Modifies
CodingControllerto allow rendering without a source, returning null instead of throwing 404 - Adds UI fallback in
CodingPageto display helpful message when no source is available
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/resources/js/dialogs/help/HelpDialog.vue | Converts projectId to string for backend validation requirement |
| web/resources/js/domain/codes/useCodes.js | Adds optional chaining for source?.id and source?.selections |
| web/resources/js/Pages/coding/selections/useSelections.js | Adds optional chaining for source?.id |
| web/app/Http/Controllers/CodingController.php | Changes from firstOrFail() to first() to allow null source; reorders logic |
| web/resources/js/Pages/CodingPage.vue | Adds conditional rendering and fallback UI for missing source |
| web/app/Http/Controllers/UserNavigationController.php | Removes debug Log statement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue where project id is not a string (but a number) and not duck typed to string, thus failing the help dialgo