Fix feedback submit: use useCustomMutation via ocotillo data provider#295
Open
jeremyzilar wants to merge 2 commits into
Open
Fix feedback submit: use useCustomMutation via ocotillo data provider#295jeremyzilar wants to merge 2 commits into
jeremyzilar wants to merge 2 commits into
Conversation
…vider
Replaces raw fetch('/api/feedback') with Refine's useCustomMutation so
submissions go through ocotilloDataProvider.custom(). That fixes staging
and production where /api/feedback returned HTML instead of JSON, and
adds auth via the existing axios interceptor plus TanStack Query loading
and error handling.
Preview DeploymentPreview URL: https://preview-fix-feedback-usecustommutation-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
Preview DeploymentPreview URL: https://preview-fix-feedback-usecustommutation-auejgdbofq-uc.a.run.app Note: This preview uses the staging API endpoints. |
jirhiker
approved these changes
Jun 13, 2026
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.
Why
Bug and feature request submissions were failing on staging with:
The panel was calling
fetch('/api/feedback'), which only works in local dev via the Vite proxy. On App Engine, that URL returns the SPA'sindex.html, not the API.What changed
Refactored
handleSubmitinSupportPanelto use Refine'suseCustomMutationwithdataProviderName: 'ocotillo', as suggested in review. Submissions now go throughocotilloDataProvider.custom(), which:VITE_OCOTILLO_API_URL(works on staging and production)isPending) and mutation resetHow to test locally
JIRA_BASE_URL,JIRA_EMAIL,JIRA_API_TOKEN)VITE_OCOTILLO_API_URL=http://localhost:8000in.env.developmentnpm run dev, log in, open Get Help, submit a bugPOST http://localhost:8000/feedbackwithAuthorization: Bearer ...and a JSON response withjira_keyFiles changed
src/components/AppShell.tsxuseCustomMutationfor feedback POST; removed manual fetch and submitState loading logic