Keep the start command field, drop the adapter reads behind it - #3157
Keep the start command field, drop the adapter reads behind it#3157HarshMN2345 wants to merge 2 commits into
Conversation
The field stays where it is. What goes is the code reading startCommand off a framework adapter: the SDK never declared it and the API no longer sends it, so the prefill and the placeholder were pointing at nothing, and Reset restored a value that does not exist. Also stop carrying a start command across a framework or adapter change - it names an entrypoint only the previous framework has - and send it only for the ssr adapter, matching the fallbackFile line beside it.
Console (appwrite/console)Project ID: Sites (1)
Tip Our Discord community has grown to 24K developers, and counting |
Greptile SummaryThis PR keeps start-command editing while removing unsupported framework-adapter defaults, clears the value across framework or adapter changes, and limits API submission to SSR sites.
Confidence Score: 4/5The PR is not yet safe to merge because URL-prefilled start commands can survive an SSR framework change and be submitted for the wrong framework. The deploy flow makes hasCustomCommands permanently true when a start parameter is present, bypassing the only framework-change path that clears startCommand and allowing the stale entrypoint to reach sites.create. Files Needing Attention: src/routes/(console)/project-[region]-[project]/sites/create-site/deploy/+page.svelte Important Files Changed
Prompt To Fix All With AI### Issue 1
src/routes/(console)/project-[region]-[project]/sites/create-site/deploy/+page.svelte:117
**Start command survives framework changes**
When a deploy URL supplies a `start` parameter and the user selects a different SSR framework, `hasCustomCommands` prevents the framework-change effect from clearing `startCommand`, causing the previous framework's entrypoint to be submitted for the new framework and the deployment to fail at startup.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (2): Last reviewed commit: "Clear the start command when the framewo..." | Re-trigger Greptile |
The settings form already resets it; the create flows kept the previous framework's entrypoint in state and submitted it, and kept sending it after a switch to a framework that only builds static. Reset it alongside the other adapter-derived fields in both places.
|
|
||
| // Check if custom commands were provided via URL | ||
| hasCustomCommands = !!(installCommand || buildCommand || outputDirectory); | ||
| hasCustomCommands = !!(installCommand || buildCommand || startCommand || outputDirectory); |
There was a problem hiding this comment.
Start command survives framework changes
When a deploy URL supplies a start parameter and the user selects a different SSR framework, hasCustomCommands prevents the framework-change effect from clearing startCommand, causing the previous framework's entrypoint to be submitted for the new framework and the deployment to fail at startup.
Knowledge Base Used: Functions and Sites
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/routes/(console)/project-[region]-[project]/sites/create-site/deploy/+page.svelte
Line: 117
Comment:
**Start command survives framework changes**
When a deploy URL supplies a `start` parameter and the user selects a different SSR framework, `hasCustomCommands` prevents the framework-change effect from clearing `startCommand`, causing the previous framework's entrypoint to be submitted for the new framework and the deployment to fail at startup.
**Knowledge Base Used:** [Functions and Sites](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/console/-/docs/project-functions-sites.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
The field stays where it is. What goes is the code reading startCommand off a framework adapter: the SDK never declared it and the API no longer sends it, so the prefill and the placeholder were pointing at nothing, and Reset restored a value that does not exist.
Also stop carrying a start command across a framework or adapter change - it names an entrypoint only the previous framework has - and send it only for the ssr adapter, matching the fallbackFile line beside it.
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)