Skip to content

Comments

Fix: help dialog wraps project id to string before request#217

Merged
jankapunkt merged 9 commits intomainfrom
fix/help-dialog
Dec 3, 2025
Merged

Fix: help dialog wraps project id to string before request#217
jankapunkt merged 9 commits intomainfrom
fix/help-dialog

Conversation

@jankapunkt
Copy link
Member

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

@jankapunkt jankapunkt self-assigned this Nov 26, 2025
@jankapunkt jankapunkt added the bug Something isn't working label Nov 26, 2025
@jankapunkt jankapunkt added this to the 1.1.0 milestone Nov 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 projectId to string before sending feedback request (main fix)
  • Adds null-safety checks throughout the codebase using optional chaining (source?.id)
  • Modifies CodingController to allow rendering without a source, returning null instead of throwing 404
  • Adds UI fallback in CodingPage to 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.

@jankapunkt jankapunkt merged commit 9ed6243 into main Dec 3, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant