Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors code by changing several utility functions to return structured objects instead of primitives, adds new server-side utilities for handling request URLs, and fixes a form handling bug.
Changes:
- Changed
createUrlandgetValidationIssueto return structured objects with named properties instead of returning primitives directly - Added three new server utilities:
getRequestUrl,getOriginalRequestUrl, andgetOriginalBaseUrlfor handling request URL transformations - Fixed form handling by replacing
setValueswithsetInitialValuesin the useForm hook
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/src/server/orpc/vars/procedures/vars/test/vars/validate/main.ts | Refactored API response destructuring for better readability |
| src/src/server/generic/lib/get-request-url/* | Added new utility to retrieve request URL from headers or Request object |
| src/src/server/generic/lib/get-original-request-url/* | Added utility to reconstruct original request URL from proxy headers |
| src/src/server/generic/lib/get-original-base-url/* | Added utility to extract base URL from original request |
| src/src/server/generic/constants.ts | Added constants for custom header names |
| src/src/proxy.ts | Added proxy function to handle Next.js request headers |
| src/src/isomorphic/core/hooks/use-form/main.ts | Fixed form reset behavior by using setInitialValues instead of setValues |
| src/src/instrumentation.ts | Updated to use new createUrl return structure |
| src/src/common/orpc/lib/get-validation-issue/* | Changed return type from string to structured object |
| src/src/common/generic/lib/create-url/* | Changed return type from string to structured object |
| src/src/client/test/components/test-widget/main.tsx | Updated to access message property from getValidationIssue |
| src/src/common/localization/locales/*.po.jinja | Updated line number references after code changes |
| src/package-lock.json.jinja | Updated various package dependencies to newer versions |
💡 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.
No description provided.