fix: do not send or use stale init dynamic parameter state - #27283
Merged
Conversation
code-asher
force-pushed
the
asher/create-workspace-init
branch
from
July 15, 2026 23:36
64ac33a to
78148ae
Compare
This is the same fix that was applied to the edit page, but on the create page this time. The only difference is that the create page does not need to wait on a build parameters query, instead it has to wait on the first message from the socket (to get defaults). This also makes one change where we would send the defaults in the init message. The server already knows the defaults so there is no need to send them. The advantage here is that we no longer need to wait for the first message, and it also fixes an issue where fields with blank values were getting validation errors because they were not filled out, before the user had a chance to actually fill them out.
code-asher
force-pushed
the
asher/create-workspace-init
branch
from
July 15, 2026 23:50
78148ae to
2699b23
Compare
code-asher
marked this pull request as draft
July 15, 2026 23:55
code-asher
marked this pull request as ready for review
July 15, 2026 23:58
code-asher
marked this pull request as draft
July 16, 2026 00:02
Member
Author
|
Ah completely forgot to update the stories so I moved it back to a draft. The actual change can still be reviewed though. |
Member
Author
|
Turns out the stories did not need updating because unlike the edit parameters page they test the page view, not the page where I actually made the changes. So this should be good to go. |
code-asher
marked this pull request as ready for review
July 16, 2026 19:38
code-asher
force-pushed
the
asher/create-workspace-init
branch
from
July 16, 2026 19:43
aa2c2eb to
49a621a
Compare
jeremyruppel
approved these changes
Jul 16, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In summary, we use the init message if we have no autofill params. If we do, then we ignore the init message, send another message with the autofilled values, and then when we get that response, finally we render the form since we know we have good state. This eliminates the possibility of temporarily rendering with stale state.
This is the same fix that was applied to the edit page, but on the create page this time. The only difference is that the create page does not need to wait on a build parameters query, instead it has to wait on the first message from the socket (to get defaults).
This also makes one change where we would send the defaults in the init message. The server already knows the defaults so there is no need to send them. The advantage here is that we no longer need to wait for the first message, and it also fixes an issue where fields with blank values were getting validation errors because they were not filled out, before the user had a chance to actually fill them out.
Closes https://linear.app/codercom/issue/DEVEX-340/flake-create-workspace-and-overwrite-default-parameters