[Feature] Allow Flow action extension runtime_urls to be relative#7715
Open
EliasJRH wants to merge 9 commits into
Open
[Feature] Allow Flow action extension runtime_urls to be relative#7715EliasJRH wants to merge 9 commits into
runtime_urls to be relative#7715EliasJRH wants to merge 9 commits into
Conversation
runtime_urls to be relative
steve-low
reviewed
Jun 4, 2026
| return baseFieldSchema.parse(configField) | ||
| } | ||
|
|
||
| export const startsWithHttps = (url: string) => url.startsWith('https://') |
There was a problem hiding this comment.
Do we still have a validation where if the the url is not relative, we check that it starts with https?
ryanische
reviewed
Jun 4, 2026
Comment on lines
+59
to
+63
| const containsUrlControlCharacter = (value: string) => /[\r\n\t]/.test(value) | ||
|
|
||
| const isFlowActionRelativeUrl = (value: string) => { | ||
| return value.startsWith('/') && !value.startsWith('//') && !containsUrlControlCharacter(value) | ||
| } |
Contributor
There was a problem hiding this comment.
Are these relevant to the validateRelativeUrl function in validation/common.ts as well?
Comment on lines
+67
to
+68
| .refine((value) => !containsUrlControlCharacter(value), {message: 'Invalid URL'}) | ||
| .refine((value) => !value.startsWith('/') || isFlowActionRelativeUrl(value), {message: 'Invalid URL'}) |
Contributor
There was a problem hiding this comment.
These messages could be made more specific to help people understand why the URL is invalid.
| appModuleFeatures: (_) => [], | ||
| deployConfig: async (config, extensionPath) => { | ||
| /** | ||
| * During `app dev`, swap any relative URLs (starting with `/`) for the dev |
Contributor
There was a problem hiding this comment.
Just confirming behaviour - this only happens for app dev, not app deploy?
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 are these changes introduced?
Closes https://github.com/Shopify/flow/issues/21604
To start allowing the usage of URLs relative to an apps
application_urlin Flow action extensions.WHAT is this pull request doing?
This pull request extends the capabilities of Flow action extensions to allow them to start using relative
runtime_urls in their config.How to test your changes?
runtime_urlshopify app dev, install app + Flow on dev store and create workflow using Flow action extensionshopify app deploy, create workflow with deployed Flow action extensionPost-release steps
The existing dev docs for Flow action extensions make no mention of using relative urls or how it would work with a local app dev setup. Documentation will be written to describe this.
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add